src/SDL_compat.c
branchSDL-1.3
changeset 1734 f7c667ded87d
parent 1733 0b1070f2f94d
child 1735 8dd28c4ef746
--- a/src/SDL_compat.c	Sun Jul 09 09:02:26 2006 +0000
+++ b/src/SDL_compat.c	Sun Jul 09 18:09:16 2006 +0000
@@ -699,7 +699,18 @@
 int
 SDL_WM_ToggleFullScreen(SDL_Surface * surface)
 {
-    return 0;
+    if (SDL_GetWindowFlags(SDL_VideoWindow) & SDL_WINDOW_FULLSCREEN) {
+        if (SDL_SetWindowFullscreen(SDL_VideoWindow, 0) < 0) {
+            return 0;
+        }
+        SDL_PublicSurface->flags &= ~SDL_FULLSCREEN;
+    } else {
+        if (SDL_SetWindowFullscreen(SDL_VideoWindow, 1) < 0) {
+            return 0;
+        }
+        SDL_PublicSurface->flags |= SDL_FULLSCREEN;
+    }
+    return 1;
 }
 
 SDL_GrabMode
@@ -727,7 +738,7 @@
     if ((flags & SDL_WINDOW_SHOWN) && !(flags & SDL_WINDOW_MINIMIZED)) {
         state |= SDL_APPACTIVE;
     }
-    if (flags & SDL_WINDOW_KEYBOARD_FOCUS) {
+    if (flags & SDL_WINDOW_INPUT_FOCUS) {
         state |= SDL_APPINPUTFOCUS;
     }
     if (flags & SDL_WINDOW_MOUSE_FOCUS) {