osezer patch 003
authorDan Olson <theoddone33@icculus.org>
Wed, 23 Apr 2008 10:21:11 +0000 (03:21 -0700)
committerDan Olson <theoddone33@icculus.org>
Wed, 23 Apr 2008 10:21:11 +0000 (03:21 -0700)
fixed CTRL key handling in I_GetEvent (SDL).

sdl/i_sdl.c
sdl/i_sdlgl.c

index a7ee77b..2844648 100644 (file)
@@ -393,17 +393,18 @@ void I_GetEvent(SDL_Event *Event)
                                SDL_WM_GrabInput (SDL_GRAB_ON);
                        else
                                SDL_WM_GrabInput (SDL_GRAB_OFF);
+                       break;
                }
        } else if (mod & KMOD_RALT || mod & KMOD_LALT) {
                if (Event->key.keysym.sym == SDLK_RETURN) {
                        SDL_WM_ToggleFullScreen(SDL_GetVideoSurface());
+                       break;
                }
-       } else { 
-               event.type = ev_keydown;
-               event.data1 = xlatekey(&Event->key.keysym);
-               H2_PostEvent(&event);
        }
-        break;
+       event.type = ev_keydown;
+       event.data1 = xlatekey(&Event->key.keysym);
+       H2_PostEvent(&event);
+       break;
 
       case SDL_KEYUP:
         event.type = ev_keyup;
index 4ffe09e..86e833a 100644 (file)
@@ -331,17 +331,18 @@ void I_GetEvent(SDL_Event *Event)
                                SDL_WM_GrabInput (SDL_GRAB_ON);
                        else
                                SDL_WM_GrabInput (SDL_GRAB_OFF);
+                       break;
                }
        } else if (mod & KMOD_RALT || mod & KMOD_LALT) {
                if (Event->key.keysym.sym == SDLK_RETURN) {
                        SDL_WM_ToggleFullScreen(SDL_GetVideoSurface());
+                       break;
                }
-       } else { 
-               event.type = ev_keydown;
-               event.data1 = xlatekey(&Event->key.keysym);
-               H2_PostEvent(&event);
        }
-        break;
+       event.type = ev_keydown;
+       event.data1 = xlatekey(&Event->key.keysym);
+       H2_PostEvent(&event);
+       break;
 
       case SDL_KEYUP:
         event.type = ev_keyup;