From 02cf9ac96c7ad8ba47b6ef7c5584b46656f14b8d Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 9 Aug 2015 18:05:39 +0200 Subject: [PATCH] Fix some more fallout from the conversion to SDL2. --- src/CEngine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5