mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
xam: disable keyboard input if left alt is down
This prevents the game from receiving erroneous inputs when trying to do ALT+ENTER.
This commit is contained in:
parent
0613dc6337
commit
b9cffba14d
2 changed files with 4 additions and 4 deletions
|
|
@ -406,10 +406,10 @@ SWA_API uint32_t XamInputGetState(uint32_t userIndex, uint32_t flags, XAMINPUT_S
|
|||
|
||||
uint32_t result = hid::GetState(userIndex, state);
|
||||
|
||||
if (GameWindow::s_isFocused)
|
||||
{
|
||||
auto keyboardState = SDL_GetKeyboardState(NULL);
|
||||
auto keyboardState = SDL_GetKeyboardState(NULL);
|
||||
|
||||
if (GameWindow::s_isFocused && !keyboardState[SDL_SCANCODE_LALT])
|
||||
{
|
||||
if (keyboardState[SDL_SCANCODE_W])
|
||||
state->Gamepad.wButtons |= XAMINPUT_GAMEPAD_Y;
|
||||
if (keyboardState[SDL_SCANCODE_A])
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ void GameWindow::Init(const char* sdlVideoDriver)
|
|||
{
|
||||
// Try matching the current window size with a known configuration.
|
||||
if (def->Value < 0)
|
||||
def->Value = GameWindow::FindNearestDisplayMode();
|
||||
def->Value = FindNearestDisplayMode();
|
||||
};
|
||||
|
||||
Config::WindowSize.ApplyCallback = [](ConfigDef<int32_t>* def)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue