From: Guus Sliepen Date: Sun, 9 Aug 2015 16:05:39 +0000 (+0200) Subject: Fix some more fallout from the conversion to SDL2. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=02cf9ac96c7ad8ba47b6ef7c5584b46656f14b8d;p=quix0rs-blobwars.git Fix some more fallout from the conversion to SDL2. --- diff --git a/src/CEngine.cpp b/src/CEngine.cpp index 5c44b96..ac9bb8c 100644 --- a/src/CEngine.cpp +++ b/src/CEngine.cpp @@ -111,7 +111,7 @@ void Engine::clearCheatVars() bool Engine::compareLastKeyInputs() { - if (strstr(lastKeyEvents, "lockandload")) + if (strstr(lastKeyEvents, "LOCKANDLOAD")) { cheats = true; return true; @@ -230,7 +230,7 @@ void Engine::getInput() } keyState[event.key.keysym.scancode] = 1; - strlcpy(lastKeyPressed, SDL_GetKeyName(event.key.keysym.scancode), sizeof lastKeyPressed); + strlcpy(lastKeyPressed, SDL_GetKeyName(SDL_GetKeyFromScancode(event.key.keysym.scancode)), sizeof lastKeyPressed); addKeyEvent(); break;