From 96afa68cad9fd7cd24b8e3bab5512973798f4250 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 6 Apr 2004 22:17:25 +0000 Subject: [PATCH] Fix brain damage in previous fix. --- src/Main/fg_os_sdl.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Main/fg_os_sdl.cxx b/src/Main/fg_os_sdl.cxx index 9672f20ab..db97fcf63 100644 --- a/src/Main/fg_os_sdl.cxx +++ b/src/Main/fg_os_sdl.cxx @@ -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); }