Skip to content

Commit

Permalink
Don't override key input state from Lua script
Browse files Browse the repository at this point in the history
If the key input is read from the Lua script before this is reached, the
state will be overriden until the script sets a new state. This can make
some tests misbehave as the input isn't reliable.
  • Loading branch information
AntonioND committed Mar 30, 2021
1 parent ba20be3 commit d8a53ce
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/gui/win_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1404,9 +1404,12 @@ int Win_MainCreate(char *rom_path)
}
}

// Initialize state
Input_Update_GB();
Input_Update_GBA();
if (!Script_IsRunning())
{
// Initialize state
Input_Update_GB();
Input_Update_GBA();
}

return 0;
}
Expand Down

0 comments on commit d8a53ce

Please sign in to comment.