fix crash bug when saving some wiimote config
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3662 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
936225eee4
commit
7ec0a3a5e8
|
@ -118,12 +118,10 @@ void WiimoteConfigDialog::SetButtonTextAll(int id, char text[128])
|
||||||
|
|
||||||
void WiimoteConfigDialog::SaveButtonMappingAll(int Slot)
|
void WiimoteConfigDialog::SaveButtonMappingAll(int Slot)
|
||||||
{
|
{
|
||||||
//INFO_LOG(CONSOLE, "SaveButtonMappingAll()\n");
|
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
// This can occur when no gamepad is detected
|
// This can occur when no gamepad is detected
|
||||||
if ((int)WiiMoteEmu::joyinfo.size() > WiiMoteEmu::PadMapping[i].ID)
|
if ((int)WiiMoteEmu::joyinfo.size() > WiiMoteEmu::PadMapping[i].ID && WiiMoteEmu::PadMapping[i].ID >= 0)
|
||||||
if (WiiMoteEmu::joyinfo[WiiMoteEmu::PadMapping[i].ID].Name == WiiMoteEmu::joyinfo[WiiMoteEmu::PadMapping[Slot].ID].Name)
|
if (WiiMoteEmu::joyinfo[WiiMoteEmu::PadMapping[i].ID].Name == WiiMoteEmu::joyinfo[WiiMoteEmu::PadMapping[Slot].ID].Name)
|
||||||
SaveButtonMapping(i, false, Slot);
|
SaveButtonMapping(i, false, Slot);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue