X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FOpenGL_Windows.cpp;h=a37cdda07b671cc376182fc44b44374f951f3e86;hb=055013bac06c70d04b46bc2e66bde847bdada1d4;hp=64fce3903fed9ceee1857e4b16b62a8fb405bf13;hpb=3c8f67c3c66a86fc9e45469ce2fed4222d486c9f;p=lugaru.git diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 64fce39..a37cdda 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -470,6 +470,7 @@ static inline int clamp_sdl_mouse_button(Uint8 button) static void sdlEventProc(const SDL_Event &e, Game &game) { int val; + bool skipkey = false; SDLMod mod; switch(e.type) @@ -508,6 +509,7 @@ static void sdlEventProc(const SDL_Event &e, Game &game) { if (e.key.keysym.mod & KMOD_CTRL) { + skipkey = true; SDL_GrabMode mode = SDL_GRAB_ON; if ((SDL_GetVideoSurface()->flags & SDL_FULLSCREEN) == 0) { @@ -521,10 +523,13 @@ static void sdlEventProc(const SDL_Event &e, Game &game) else if (e.key.keysym.sym == SDLK_RETURN) { if (e.key.keysym.mod & KMOD_ALT) + { + skipkey = true; SDL_WM_ToggleFullScreen(SDL_GetVideoSurface()); + } } - if (e.key.keysym.sym < SDLK_LAST) + if ((!skipkey) && (e.key.keysym.sym < SDLK_LAST)) { if (KeyTable[e.key.keysym.sym] != 0xffff) SetKey(KeyTable[e.key.keysym.sym]);