Windows Port: Related to commit 8d011f8
-- check the flag first to try to avoid the more expensive system calls.
This commit is contained in:
parent
42c0379cbb
commit
92924db136
|
@ -2716,7 +2716,7 @@ static void RunAntipodalRestriction(const buttonstruct<bool>& pad);
|
||||||
// and updates input-related state that needs to update even while paused.
|
// and updates input-related state that needs to update even while paused.
|
||||||
void input_acquire()
|
void input_acquire()
|
||||||
{
|
{
|
||||||
const bool willAcceptInput = ( (MainWindow->getHWnd() == GetForegroundWindow()) || allowBackgroundInput );
|
const bool willAcceptInput = ( allowBackgroundInput || (MainWindow->getHWnd() == GetForegroundWindow()) );
|
||||||
u32 oldInput = joypads[0];
|
u32 oldInput = joypads[0];
|
||||||
|
|
||||||
S9xWinScanJoypads(willAcceptInput);
|
S9xWinScanJoypads(willAcceptInput);
|
||||||
|
|
|
@ -599,7 +599,7 @@ static void InputTimer()
|
||||||
|
|
||||||
const int nloops = (JOYSTICK) ? 16 : 1;
|
const int nloops = (JOYSTICK) ? 16 : 1;
|
||||||
const HWND mainWindow = MainWindow->getHWnd();
|
const HWND mainWindow = MainWindow->getHWnd();
|
||||||
const bool willAcceptInput = ( (mainWindow == GetForegroundWindow()) || allowBackgroundInput );
|
const bool willAcceptInput = ( allowBackgroundInput || (mainWindow == GetForegroundWindow()) );
|
||||||
|
|
||||||
for (int j = 0; j < nloops; j++)
|
for (int j = 0; j < nloops; j++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue