diff mbox series

[for-3.1] ui/sdl2: Remove the obsolete SDL_INIT_NOPARACHUTE flag

Message ID 1533721602-15763-1-git-send-email-thuth@redhat.com
State New
Headers show
Series [for-3.1] ui/sdl2: Remove the obsolete SDL_INIT_NOPARACHUTE flag | expand

Commit Message

Thomas Huth Aug. 8, 2018, 9:46 a.m. UTC
SDL_INIT_NOPARACHUTE is not used in SDL2 anymore, and the define is just
a dummy (see https://wiki.libsdl.org/MigrationGuide#Some_general_truths
for example). So we can remove it and get rid of the "flags" variable
nowadays.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 ui/sdl2.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Gerd Hoffmann Aug. 21, 2018, 5:38 a.m. UTC | #1
On Wed, Aug 08, 2018 at 11:46:42AM +0200, Thomas Huth wrote:
> SDL_INIT_NOPARACHUTE is not used in SDL2 anymore, and the define is just
> a dummy (see https://wiki.libsdl.org/MigrationGuide#Some_general_truths
> for example). So we can remove it and get rid of the "flags" variable
> nowadays.

Added to ui queue.

thanks,
  Gerd
diff mbox series

Patch

diff --git a/ui/sdl2.c b/ui/sdl2.c
index 76e5942..755a713 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -761,7 +761,6 @@  static void sdl2_display_early_init(DisplayOptions *o)
 
 static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
 {
-    int flags;
     uint8_t data = 0;
     char *filename;
     int i;
@@ -782,8 +781,7 @@  static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
     setenv("SDL_VIDEODRIVER", "x11", 0);
 #endif
 
-    flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
-    if (SDL_Init(flags)) {
+    if (SDL_Init(SDL_INIT_VIDEO)) {
         fprintf(stderr, "Could not initialize SDL(%s) - exiting\n",
                 SDL_GetError());
         exit(1);