fix: improve input and fix debug menu crash

This commit is contained in:
NOTPIES
2026-03-02 23:43:15 -03:00
parent 7c4b30d11e
commit 43d20374a4
6 changed files with 76 additions and 44 deletions

View File

@@ -1185,6 +1185,25 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
PIXBeginNamedEvent(0,"Input manager tick");
InputManager.Tick();
// detect input mode
if (InputManager.IsPadConnected(0))
{
bool controllerUsed = InputManager.ButtonPressed(0) ||
InputManager.GetJoypadStick_LX(0, false) != 0.0f ||
InputManager.GetJoypadStick_LY(0, false) != 0.0f ||
InputManager.GetJoypadStick_RX(0, false) != 0.0f ||
InputManager.GetJoypadStick_RY(0, false) != 0.0f;
if (controllerUsed)
g_KBMInput.SetKBMActive(false);
else if (g_KBMInput.HasAnyInput())
g_KBMInput.SetKBMActive(true);
}
else
{
g_KBMInput.SetKBMActive(true);
}
PIXEndNamedEvent();
PIXBeginNamedEvent(0,"Profile manager tick");
// ProfileManager.Tick();