Windows Port: Related to commit 8d011f8 -- check the flag first to try to avoid the more expensive system calls.

This commit is contained in:
rogerman 2018-03-04 17:39:27 -08:00
parent 42c0379cbb
commit 92924db136
2 changed files with 2 additions and 2 deletions

View File

@ -2716,7 +2716,7 @@ static void RunAntipodalRestriction(const buttonstruct<bool>& pad);
// and updates input-related state that needs to update even while paused.
void input_acquire()
{
const bool willAcceptInput = ( (MainWindow->getHWnd() == GetForegroundWindow()) || allowBackgroundInput );
const bool willAcceptInput = ( allowBackgroundInput || (MainWindow->getHWnd() == GetForegroundWindow()) );
u32 oldInput = joypads[0];
S9xWinScanJoypads(willAcceptInput);

View File

@ -599,7 +599,7 @@ static void InputTimer()
const int nloops = (JOYSTICK) ? 16 : 1;
const HWND mainWindow = MainWindow->getHWnd();
const bool willAcceptInput = ( (mainWindow == GetForegroundWindow()) || allowBackgroundInput );
const bool willAcceptInput = ( allowBackgroundInput || (mainWindow == GetForegroundWindow()) );
for (int j = 0; j < nloops; j++)
{