win32: poll joypads in hotkey handler if paused or stopped (#684)

This commit is contained in:
OV2 2021-01-11 20:15:15 +01:00
parent f7c6625d67
commit cc7e028179
1 changed files with 6 additions and 1 deletions

View File

@ -116,6 +116,8 @@ VOID CALLBACK HotkeyTimer( UINT idEvent, UINT uMsg, DWORD dwUser, DWORD dw1, DWO
void S9xDetectJoypads();
void S9xWinScanJoypads();
#define NOTKNOWN "Unknown Company "
#define HEADER_SIZE 512
#define INFO_LEN (0xFF - 0xC0)
@ -2734,6 +2736,10 @@ VOID CALLBACK HotkeyTimer( UINT idEvent, UINT uMsg, DWORD dwUser, DWORD dw1, DWO
if(GUI.JoystickHotkeys)
{
if (Settings.StopEmulation || (Settings.Paused && !Settings.FrameAdvance) || Settings.ForcedPause)
{
S9xWinScanJoypads();
}
static int counter = 0;
static uint32 joyState[6][53];
for(int j = 0 ; j < 6 ; j++)
@ -3273,7 +3279,6 @@ void ControlPadFlagsToS9xPseudoPointer(uint32 p)
static void ProcessInput(void)
{
extern void S9xWinScanJoypads ();
#ifdef NETPLAY_SUPPORT
if (!Settings.NetPlay)
#endif