Gamepad (minor) > Crashfix in Wiimote plugin
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4554 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
173c16ad41
commit
928dc99874
|
@ -81,8 +81,8 @@ void WiimotePadConfigDialog::SetButtonTextAll(int id, char text[128])
|
|||
void WiimotePadConfigDialog::SaveButtonMappingAll(int Slot)
|
||||
{
|
||||
for (int i = 0; i < MAX_WIIMOTES; i++)
|
||||
{
|
||||
if (WiiMoteEmu::IDToName(WiiMoteEmu::PadMapping[i].ID) == WiiMoteEmu::IDToName(WiiMoteEmu::PadMapping[Slot].ID))
|
||||
{
|
||||
if (WiiMoteEmu::PadMapping[i].Name.length() > 0 && WiiMoteEmu::PadMapping[i].Name == WiiMoteEmu::PadMapping[Slot].Name)
|
||||
SaveButtonMapping(i, false, Slot);
|
||||
}
|
||||
}
|
||||
|
@ -204,6 +204,7 @@ void WiimotePadConfigDialog::SaveButtonMapping(int controller, bool DontChangeId
|
|||
a blank selection. */
|
||||
if (!DontChangeId)
|
||||
{
|
||||
if (m_Joyname[FromSlot]->GetSelection() >= WiiMoteEmu::joyinfo.size()) PanicAlert("Bug in SaveButtonMapping");
|
||||
WiiMoteEmu::PadMapping[controller].ID = WiiMoteEmu::joyinfo.at(m_Joyname[FromSlot]->GetSelection()).ID;
|
||||
WiiMoteEmu::PadMapping[controller].Name = m_Joyname[FromSlot]->GetValue().mb_str();
|
||||
}
|
||||
|
|
|
@ -437,7 +437,7 @@ void PADConfigDialognJoy::SaveButtonMappingAll(int Slot)
|
|||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (IDToName(PadMapping[i].ID) == IDToName(PadMapping[Slot].ID))
|
||||
if (PadMapping[i].Name.length() > 0 && PadMapping[i].Name == PadMapping[Slot].Name)
|
||||
SaveButtonMapping(i, false, Slot);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue