mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Make checking for focus optional for njoy input.
So if one wants, on one monitor play Dolphin, and on the other use the keyboard for something else git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2082 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -89,6 +89,7 @@ CONTROLLER_STATE PadState[4];
|
||||
CONTROLLER_MAPPING PadMapping[4];
|
||||
bool emulator_running = false;
|
||||
int NumPads = 0, NumGoodPads = 0;
|
||||
bool bCheckFocus = true;
|
||||
HWND m_hWnd; // Handle to window
|
||||
SPADInitialize *g_PADInitialize = NULL;
|
||||
|
||||
@ -400,7 +401,7 @@ void Shutdown()
|
||||
void PAD_Input(u16 _Key, u8 _UpDown)
|
||||
{
|
||||
// Check that Dolphin is in focus, otherwise don't update the pad status
|
||||
if (!IsFocus()) return;
|
||||
if (bCheckFocus && !IsFocus()) return;
|
||||
|
||||
// Check if the keys are interesting, and then update it
|
||||
for(int i = 0; i < 4; i++)
|
||||
@ -784,7 +785,7 @@ void ReadButton(int controller, int button)
|
||||
void GetJoyState(int controller)
|
||||
{
|
||||
// Check that Dolphin is in focus, otherwise don't update the pad status
|
||||
if (!IsFocus()) return;
|
||||
if (bCheckFocus && !IsFocus()) return;
|
||||
|
||||
// Update the gamepad status
|
||||
SDL_JoystickUpdate();
|
||||
|
Reference in New Issue
Block a user