diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index b4a8a27f..f04191db 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -410,6 +410,7 @@ void AiL::HandleUserInput(float fElapsedTime){ bool setIdleAnimation=true; bool heldDownMovementKey=false; //Is true when a movement key has been held down. + if(KEY_MENU.Released()){ Menu::OpenMenu(MenuType::PAUSE); } diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 9c4cf927..f3be767a 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 4 #define VERSION_PATCH 5 -#define VERSION_BUILD 7966 +#define VERSION_BUILD 7967 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/olcPGEX_Gamepad.h b/Adventures in Lestoria/olcPGEX_Gamepad.h index 389a9cb9..2626ae86 100644 --- a/Adventures in Lestoria/olcPGEX_Gamepad.h +++ b/Adventures in Lestoria/olcPGEX_Gamepad.h @@ -236,6 +236,7 @@ namespace olc { int axisCount = GP_AXIS_COUNT; int buttonCount = GP_BUTTON_COUNT; float axes[GP_AXIS_COUNT]{0}; + float prevAxes[GP_AXIS_COUNT]{0}; olc::HWButton buttons[GP_BUTTON_COUNT]; bool ff = false; #ifdef __EMSCRIPTEN__ @@ -1318,6 +1319,9 @@ olc::GamePad *olc::GamePad::selectWithAnyButton() { float olc::GamePad::getAxis(olc::GPAxes a) { float axis = axes[static_cast(a)]; + + if(prevAxes[static_cast(a)]==0.f&&std::abs(prevAxes[static_cast(a)]-axis)>0.9f)return 0.f; + if (std::abs(axis) < deadZone) { axis = 0; } @@ -1329,6 +1333,9 @@ float olc::GamePad::getAxis(olc::GPAxes a) { if (!xInput && (a == GPAxes::TL || a == GPAxes::TR)) return (axis + 1) / 2; #endif + + prevAxes[static_cast(a)]=axis; + return axis; } diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index cbff838d..2b6fbfd4 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ