From 866995794baaa2a5f0f58662f2b4cccae9685de2 Mon Sep 17 00:00:00 2001 From: relnev Date: Sun, 19 Jan 2003 02:39:55 +0000 Subject: forgot about you (only set keys that actually exist) git-svn-id: svn://svn.icculus.org/blackshades/trunk@90 5198baeb-e213-0410-be47-fc2ff85ca46f --- Source/GameLoop.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Source/GameLoop.cpp') diff --git a/Source/GameLoop.cpp b/Source/GameLoop.cpp index 3f7fada..35bc4fe 100644 --- a/Source/GameLoop.cpp +++ b/Source/GameLoop.cpp @@ -323,10 +323,12 @@ static void DoSDLKey(Game *g, SDL_Event *event) index = mackey / 8; mask = 1 << (mackey % 8); - if (press) { - ourkeys[index] |= mask; - } else { - ourkeys[index] &= ~mask; + if (mackey) { + if (press) { + ourkeys[index] |= mask; + } else { + ourkeys[index] &= ~mask; + } } if (event->key.keysym.unicode && -- cgit v1.2.3