Permalink
Browse files

Windows Port: Related to commit 8d011f8 -- check the flag first to tr…

…y to avoid the more expensive system calls.
  • Loading branch information...
rogerman committed Mar 5, 2018
1 parent 42c0379 commit 92924db13613ad315f4d7ea509eacf48b0a3caf6
Showing with 2 additions and 2 deletions.
  1. +1 −1 desmume/src/frontend/windows/inputdx.cpp
  2. +1 −1 desmume/src/frontend/windows/main.cpp
@@ -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);
@@ -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++)
{

0 comments on commit 92924db

Please sign in to comment.