removed support for 'real' (non-desktop) fullscreen mode for SDL2 target
authorHolger Schemel <info@artsoft.org>
Thu, 31 Mar 2016 18:23:01 +0000 (20:23 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 31 Mar 2016 18:23:01 +0000 (20:23 +0200)
src/libgame/sdl.c
src/libgame/sdl.h

index 39920c8350fc739fb2a6a473348512ffce4209ff..5a8277a555663e66e9993d58990cc65b517623ae 100644 (file)
@@ -571,7 +571,7 @@ void SDLInitVideoBuffer(DrawBuffer **backbuffer, DrawWindow **window,
 
   video.fullscreen_available = hardware_fullscreen_available;
 
-#if USE_DESKTOP_FULLSCREEN
+#if defined(TARGET_SDL2)
   // in SDL 2.0, there is always support for desktop fullscreen mode
   // (in SDL 1.2, there is only support for "real" fullscreen mode)
   video.fullscreen_available = TRUE;
@@ -626,12 +626,7 @@ static SDL_Surface *SDLCreateScreen(DrawBuffer **backbuffer,
 
 #if defined(TARGET_SDL2)
   int surface_flags_window = SURFACE_FLAGS | SDL_WINDOW_RESIZABLE;
-#if USE_DESKTOP_FULLSCREEN
   int surface_flags_fullscreen = SURFACE_FLAGS | SDL_WINDOW_FULLSCREEN_DESKTOP;
-#else
-  int surface_flags_fullscreen = SURFACE_FLAGS | SDL_WINDOW_FULLSCREEN;
-#endif
-
 #else
   int surface_flags_window = SURFACE_FLAGS;
   int surface_flags_fullscreen = SURFACE_FLAGS | SDL_FULLSCREEN;
@@ -652,9 +647,6 @@ static SDL_Surface *SDLCreateScreen(DrawBuffer **backbuffer,
   video.fullscreen_initial = fullscreen;
 
   float window_scaling_factor = (float)setup.window_scaling_percent / 100;
-#if !USE_DESKTOP_FULLSCREEN
-  float screen_scaling_factor = (fullscreen ? 1 : window_scaling_factor);
-#endif
 
   video.window_width  = window_scaling_factor * width;
   video.window_height = window_scaling_factor * height;
@@ -704,13 +696,8 @@ static SDL_Surface *SDLCreateScreen(DrawBuffer **backbuffer,
     sdl_window = SDL_CreateWindow(program.window_title,
                                  SDL_WINDOWPOS_CENTERED,
                                  SDL_WINDOWPOS_CENTERED,
-#if USE_DESKTOP_FULLSCREEN
                                  video.window_width,
                                  video.window_height,
-#else
-                                 (int)(screen_scaling_factor * width),
-                                 (int)(screen_scaling_factor * height),
-#endif
                                  surface_flags);
 
   if (sdl_window != NULL)
@@ -998,11 +985,7 @@ void SDLSetWindowFullscreen(boolean fullscreen)
   if (sdl_window == NULL)
     return;
 
-#if USE_DESKTOP_FULLSCREEN
   int flags = (fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
-#else
-  int flags = (fullscreen ? SDL_WINDOW_FULLSCREEN : 0);
-#endif
 
   if (SDL_SetWindowFullscreen(sdl_window, flags) == 0)
     video.fullscreen_enabled = fullscreen_enabled = fullscreen;
index 121b15bf65769f6fad34e2fe02565ea2bfbe0145..7ffb0c25e8dc5281ada68ad2de4a83506eed353e 100644 (file)
 #if defined(PLATFORM_ANDROID)
 #define WINDOW_SCALING_STATUS  WINDOW_SCALING_NOT_AVAILABLE
 #define FULLSCREEN_STATUS      FULLSCREEN_AVAILABLE
-#define USE_DESKTOP_FULLSCREEN TRUE
 #elif defined(TARGET_SDL2)
 #define WINDOW_SCALING_STATUS  WINDOW_SCALING_AVAILABLE
 #define FULLSCREEN_STATUS      FULLSCREEN_AVAILABLE
-#define USE_DESKTOP_FULLSCREEN TRUE
 #else  // SDL 1.2
 #define WINDOW_SCALING_STATUS  WINDOW_SCALING_NOT_AVAILABLE
 #define FULLSCREEN_STATUS      FULLSCREEN_AVAILABLE