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:
parent
4e1e220e71
commit
0d424e109c
|
@ -206,7 +206,7 @@ void PAD_Initialize(SPADInitialize _PADInitialize)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LoadConfig(); // Load joystick mapping
|
LoadConfig(); // Load joystick mapping
|
||||||
|
Search_Devices();
|
||||||
if (joysticks[0].enabled)
|
if (joysticks[0].enabled)
|
||||||
joystate[0].joy = SDL_JoystickOpen(joysticks[0].ID);
|
joystate[0].joy = SDL_JoystickOpen(joysticks[0].ID);
|
||||||
if (joysticks[1].enabled)
|
if (joysticks[1].enabled)
|
||||||
|
@ -507,7 +507,7 @@ unsigned int PAD_GetAttachedPads()
|
||||||
|
|
||||||
void ReadButton(int controller, int button) {
|
void ReadButton(int controller, int button) {
|
||||||
int ctl_button = joysticks[controller].buttons[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);
|
joystate[controller].buttons[button] = SDL_JoystickGetButton(joystate[controller].joy, ctl_button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue