]> git.mxchange.org Git - flightgear.git/commitdiff
Fix brain damage in previous fix.
authorandy <andy>
Tue, 6 Apr 2004 22:17:25 +0000 (22:17 +0000)
committerandy <andy>
Tue, 6 Apr 2004 22:17:25 +0000 (22:17 +0000)
src/Main/fg_os_sdl.cxx

index 9672f20ab3413ea5cdaa0383f111058ab8272645..db97fcf63d186c70da3f1476d6788c4ff7cfd7d8 100644 (file)
@@ -77,7 +77,6 @@ void fgOSOpenWindow(int w, int h, int bpp,
 
     int vidmask = SDL_OPENGL;
     if(fullscreen) {
-        __builtin_printf("FULLSCREEN!\n");
         vidmask |= SDL_FULLSCREEN;
     }
     SDL_SetVideoMode(w, h, 16, vidmask); // FIXME: handle errors
@@ -135,9 +134,13 @@ static void handleKey(int key, int keyup)
     case SDLK_F11:      key = PU_KEY_F11;       break;
     case SDLK_F12:      key = PU_KEY_F12;       break;
     }
-    if(keyup) CurrentModifiers &= ~modmask;
-    else      CurrentModifiers |= modmask;
-    if(keyup) CurrentModifiers |= KEYMOD_RELEASED;
+    if(keyup) {
+        CurrentModifiers &= ~modmask;
+        CurrentModifiers |= KEYMOD_RELEASED;
+    } else {
+        CurrentModifiers |= modmask;
+        CurrentModifiers &= ~KEYMOD_RELEASED;
+    }
     if(modmask == 0 && KeyHandler)
         (*KeyHandler)(key, CurrentModifiers, CurrentMouseX, CurrentMouseY);
 }