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:
LPFaint99
2009-02-03 06:21:22 +00:00
parent d8f71e0574
commit f999ae94df
6 changed files with 20 additions and 5 deletions

View File

@ -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();