+/*
+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>
static void sdlEventProc(const SDL_Event &e, Game &game)
{
int val;
+ bool skipkey = false;
SDLMod mod;
switch(e.type)
{
if (e.key.keysym.mod & KMOD_CTRL)
{
+ skipkey = true;
SDL_GrabMode mode = SDL_GRAB_ON;
if ((SDL_GetVideoSurface()->flags & SDL_FULLSCREEN) == 0)
{
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]);