DEADSOFTWARE

sdl2: fix building with sdl2 on linux
[flatwaifu.git] / src / sdl / main.c
index 07dccf98f5fee9198b1f4f748165619438e402b3..0b1aada10b2c8886093651c5401a8fbab2eca3e9 100644 (file)
@@ -20,7 +20,7 @@
    51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 */
 
-#include <SDL.h>
+#include "SDL.h"
 #include <stdio.h>
 #include <stdarg.h>
 #include <stdlib.h> // srand exit
@@ -137,9 +137,12 @@ void Y_unset_videomode (void) {
 
 void Y_set_fullscreen (int yes) {
   assert(surf != NULL);
-  Uint32 flags = surf->flags & ~SDL_FULLSCREEN;
+  int flags = 0;
   if ((surf->flags & SDL_FULLSCREEN) == 0) {
-    flags |= SDL_FULLSCREEN;
+    flags |= SYSTEM_USE_FULLSCREEN;
+  }
+  if (surf->flags & SDL_OPENGL) {
+    flags |= SDL_OPENGL;
   }
   Y_set_videomode(surf->w, surf->h, flags);
 }