]> git.mxchange.org Git - quix0rs-blobwars.git/commitdiff
Fix some more fallout from the conversion to SDL2.
authorGuus Sliepen <guus@debian.org>
Sun, 9 Aug 2015 16:05:39 +0000 (18:05 +0200)
committerGuus Sliepen <guus@debian.org>
Sun, 9 Aug 2015 16:05:39 +0000 (18:05 +0200)
src/CEngine.cpp

index 5c44b96040178d74e50fc8bb4fb3e3207708e567..ac9bb8ce37cfbef6aa6badf6f3600818b7723640 100644 (file)
@@ -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;