might fix up nJoy, thanks sl1nk3

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1516 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2008-12-12 20:35:46 +00:00
parent 4e1e220e71
commit 0d424e109c
1 changed files with 2 additions and 2 deletions

View File

@ -206,7 +206,7 @@ void PAD_Initialize(SPADInitialize _PADInitialize)
#endif
LoadConfig(); // Load joystick mapping
Search_Devices();
if (joysticks[0].enabled)
joystate[0].joy = SDL_JoystickOpen(joysticks[0].ID);
if (joysticks[1].enabled)
@ -507,7 +507,7 @@ unsigned int PAD_GetAttachedPads()
void ReadButton(int controller, int button) {
int ctl_button = joysticks[controller].buttons[button];
if (ctl_button < joyinfo[controller].NumButtons) {
if (ctl_button < joyinfo[joysticks[controller].ID].NumButtons) {
joystate[controller].buttons[button] = SDL_JoystickGetButton(joystate[controller].joy, ctl_button);
}
}