1
0
Fork 0

Fix brain damage in previous fix.

This commit is contained in:
andy 2004-04-06 22:17:25 +00:00
parent 163d2c5105
commit 96afa68cad

View file

@ -77,7 +77,6 @@ void fgOSOpenWindow(int w, int h, int bpp,
int vidmask = SDL_OPENGL; int vidmask = SDL_OPENGL;
if(fullscreen) { if(fullscreen) {
__builtin_printf("FULLSCREEN!\n");
vidmask |= SDL_FULLSCREEN; vidmask |= SDL_FULLSCREEN;
} }
SDL_SetVideoMode(w, h, 16, vidmask); // FIXME: handle errors 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_F11: key = PU_KEY_F11; break;
case SDLK_F12: key = PU_KEY_F12; break; case SDLK_F12: key = PU_KEY_F12; break;
} }
if(keyup) CurrentModifiers &= ~modmask; if(keyup) {
else CurrentModifiers |= modmask; CurrentModifiers &= ~modmask;
if(keyup) CurrentModifiers |= KEYMOD_RELEASED; CurrentModifiers |= KEYMOD_RELEASED;
} else {
CurrentModifiers |= modmask;
CurrentModifiers &= ~KEYMOD_RELEASED;
}
if(modmask == 0 && KeyHandler) if(modmask == 0 && KeyHandler)
(*KeyHandler)(key, CurrentModifiers, CurrentMouseX, CurrentMouseY); (*KeyHandler)(key, CurrentModifiers, CurrentMouseX, CurrentMouseY);
} }