diff --git a/src/Application/GameKeyboardController.cpp b/src/Application/GameKeyboardController.cpp index 78cd42b359c9..1f259ca11024 100644 --- a/src/Application/GameKeyboardController.cpp +++ b/src/Application/GameKeyboardController.cpp @@ -8,9 +8,9 @@ bool GameKeyboardController::ConsumeKeyPress(PlatformKey key) { if (key == PlatformKey::KEY_NONE) return false; - // TODO(captainurist): this is false if we have received press & release events inside a single frame. - if (!isKeyDown_[key]) - return false; + // Note that we're not checking for isKeyDown_[key] here, and this is intentional. This becomes relevant if both + // key press and key release events happen inside a single frame, and thus even though the player has pressed the + // key, it's not held down when we get around to actually handling it. if (!isKeyDownReportPending_[key]) return false; diff --git a/src/Io/KeyboardInputHandler.cpp b/src/Io/KeyboardInputHandler.cpp index 122dd4cd51eb..4ecf6ffeb7a1 100644 --- a/src/Io/KeyboardInputHandler.cpp +++ b/src/Io/KeyboardInputHandler.cpp @@ -92,6 +92,9 @@ void Io::KeyboardInputHandler::GenerateGameplayActions() { isTriggered = controller->IsKeyDown(key) || controller->IsKeyDown(gamepadkey); break; case KeyToggleType::TOGGLE_DelayContinuous: + // TODO(captainurist): This logic breaks down if we press & release a key every frame. + // Better way to implement this would be to generate the input actions from inside + // the event handler. if (controller->IsKeyDown(key) || controller->IsKeyDown(gamepadkey)) { resettimer = false; if (!this->keydelaytimer) { diff --git a/test/Bin/GameTest/CMakeLists.txt b/test/Bin/GameTest/CMakeLists.txt index fb5f74263a56..6f21ba5883d5 100644 --- a/test/Bin/GameTest/CMakeLists.txt +++ b/test/Bin/GameTest/CMakeLists.txt @@ -21,7 +21,7 @@ if(OE_BUILD_TESTS) ExternalProject_Add(OpenEnroth_TestData PREFIX ${CMAKE_CURRENT_BINARY_DIR}/test_data_tmp GIT_REPOSITORY https://github.com/OpenEnroth/OpenEnroth_TestData.git - GIT_TAG c4d5e3c0368158daeca851182134f3feba92ac0b + GIT_TAG 565993c6d8cc70e7cfc4c6286b5138b9e9e0dd20 SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/test_data CONFIGURE_COMMAND "" BUILD_COMMAND ""