From: andy Date: Tue, 6 Apr 2004 22:17:25 +0000 (+0000) Subject: Fix brain damage in previous fix. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=96afa68cad9fd7cd24b8e3bab5512973798f4250;p=flightgear.git Fix brain damage in previous fix. --- 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); }