]> git.jsancho.org Git - lugaru.git/blobdiff - Source/OpenGL_Windows.cpp
Added GPL license and headers.
[lugaru.git] / Source / OpenGL_Windows.cpp
index 64fce3903fed9ceee1857e4b16b62a8fb405bf13..b4faa6658a93c66891d652b7198503e657334681 100644 (file)
@@ -1,3 +1,24 @@
+/*
+Copyright (C) 2003, 2010 - Wolfire Games
+
+This file is part of Lugaru.
+
+Lugaru is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+
+See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
 
 #ifdef WIN32
 #include <vld.h>
@@ -470,6 +491,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 +530,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 +544,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]);