summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJohn Peterson <jpeterson57@gmail.com>2009-02-15 02:26:30 +0000
committerJohn Peterson <jpeterson57@gmail.com>2009-02-15 02:26:30 +0000
commitcf068ebb06f509f650d7397475e99e405c8a123d (patch)
tree6926ff139736a6a043d1d074b98a0b368d59b35d /Source
parent72112584dedcb95c516b248cce0891fa2ac60ea0 (diff)
Emulated Wiimote: Forgot to check that we have a gamepad
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2245 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp
index a62a657f9f..2f1b705cd7 100644
--- a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp
+++ b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp
@@ -558,7 +558,7 @@ void ControlChannel(u16 _channelID, const void* _pData, u32 _Size)
break;
default:
- PanicAlert("HidControlChanel: Unknown type %x and param %x", hidp->type, hidp->param);
+ PanicAlert("HidControlChannel: Unknown type %x and param %x", hidp->type, hidp->param);
break;
}
@@ -576,8 +576,9 @@ void Update()
//Console::Print("Emu Update: %i\n", g_ReportingMode);
// Check if the pad state should be updated
- if (g_Config.Trigger.Type == g_Config.Trigger.TRIGGER || g_Config.Trigger.Type == g_Config.Trigger.ANALOG1 || g_Config.Trigger.Type == g_Config.Trigger.ANALOG2
+ if ((g_Config.Trigger.Type == g_Config.Trigger.TRIGGER || g_Config.Trigger.Type == g_Config.Trigger.ANALOG1 || g_Config.Trigger.Type == g_Config.Trigger.ANALOG2
|| g_Config.Nunchuck.Type == g_Config.Nunchuck.ANALOG1 || g_Config.Nunchuck.Type == g_Config.Nunchuck.ANALOG2)
+ && NumGoodPads > 0 && joyinfo.size() > PadMapping[0].ID)
{
const int Page = 0;
WiiMoteEmu::GetJoyState(PadState[Page], PadMapping[Page], Page, joyinfo[PadMapping[Page].ID].NumButtons);