mirror of
https://git.minecraftlegacy.com/backups/LCEMP.git
synced 2026-12-02 12:41:31 +00:00
fix: improve input and fix debug menu crash
This commit is contained in:
1 parent
7c4b30d11e
commit
43d20374a4
6 files changed
+76
-44
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user