From 0d424e109c254a17671c9aa99a30560ed9f34c16 Mon Sep 17 00:00:00 2001 From: hrydgard Date: Fri, 12 Dec 2008 20:35:46 +0000 Subject: [PATCH] might fix up nJoy, thanks sl1nk3 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1516 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp index 8b84ac3b1f..28158b30ef 100644 --- a/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp +++ b/Source/Plugins/Plugin_nJoy_SDL/Src/nJoy.cpp @@ -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); } }