Gamepad (minor) > Fix to last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4549 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
7c1d118913
commit
0837e38c39
|
@ -365,12 +365,12 @@ void WiimotePadConfigDialog::UpdateDeviceList()
|
||||||
m_Joyname[i]->Clear();
|
m_Joyname[i]->Clear();
|
||||||
|
|
||||||
// Search for devices and add them to the device list
|
// Search for devices and add them to the device list
|
||||||
if (WiiMoteEmu::NumPads > 0)
|
if (WiiMoteEmu::joyinfo.size() > 0)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < WiiMoteEmu::NumPads; j++)
|
for (int j = 0; j < WiiMoteEmu::joyinfo.size(); j++)
|
||||||
m_Joyname[i]->Append(wxString::FromAscii(WiiMoteEmu::joyinfo.at(j).Name.c_str()));
|
m_Joyname[i]->Append(wxString::FromAscii(WiiMoteEmu::joyinfo.at(j).Name.c_str()));
|
||||||
// Set selection
|
// Set selection
|
||||||
for (int j = 0; j < WiiMoteEmu::NumPads; j++)
|
for (int j = 0; j < WiiMoteEmu::joyinfo.size(); j++)
|
||||||
if (WiiMoteEmu::joyinfo.at(j).Name == WiiMoteEmu::PadMapping[i].Name) m_Joyname[i]->SetSelection(j);
|
if (WiiMoteEmu::joyinfo.at(j).Name == WiiMoteEmu::PadMapping[i].Name) m_Joyname[i]->SetSelection(j);
|
||||||
if (m_Joyname[i]->GetSelection() == -1) m_Joyname[i]->SetSelection(0);
|
if (m_Joyname[i]->GetSelection() == -1) m_Joyname[i]->SetSelection(0);
|
||||||
// Load settings
|
// Load settings
|
||||||
|
|
|
@ -62,10 +62,8 @@ bool LocalSearchDevicesReset(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo
|
||||||
DEBUG_LOG(CONSOLE, "LocalSearchDevicesReset");
|
DEBUG_LOG(CONSOLE, "LocalSearchDevicesReset");
|
||||||
|
|
||||||
// Turn off device polling while resetting
|
// Turn off device polling while resetting
|
||||||
EnablePolling(false);
|
EnablePolling(false);
|
||||||
|
bool bSuccess = InputCommon::SearchDevicesReset(_joyinfo, _NumPads);
|
||||||
bool bSuccess = InputCommon::SearchDevicesReset(_joyinfo, _NumPads);
|
|
||||||
|
|
||||||
EnablePolling(true);
|
EnablePolling(true);
|
||||||
|
|
||||||
DoLocalSearchDevices(_joyinfo, _NumPads);
|
DoLocalSearchDevices(_joyinfo, _NumPads);
|
||||||
|
|
|
@ -366,13 +366,13 @@ void PADConfigDialognJoy::UpdateDeviceList()
|
||||||
m_Joyname[i]->Clear();
|
m_Joyname[i]->Clear();
|
||||||
|
|
||||||
// Search for devices and add them to the device list
|
// Search for devices and add them to the device list
|
||||||
if (NumPads > 0)
|
if (joyinfo.size() > 0)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < NumPads; j++)
|
for (int j = 0; j < joyinfo.size(); j++)
|
||||||
m_Joyname[i]->Append(wxString::FromAscii(joyinfo.at(j).Name.c_str()));
|
m_Joyname[i]->Append(wxString::FromAscii(joyinfo.at(j).Name.c_str()));
|
||||||
// Set selection
|
// Set selection
|
||||||
//PanicAlert("%s", PadMapping[i].Name.c_str());
|
//PanicAlert("%s", PadMapping[i].Name.c_str());
|
||||||
for (int j = 0; j < NumPads; j++)
|
for (int j = 0; j < joyinfo.size(); j++)
|
||||||
{
|
{
|
||||||
if (joyinfo.at(j).Name == PadMapping[i].Name) m_Joyname[i]->SetSelection(j);
|
if (joyinfo.at(j).Name == PadMapping[i].Name) m_Joyname[i]->SetSelection(j);
|
||||||
}
|
}
|
||||||
|
|
|
@ -445,24 +445,21 @@ void PAD_GetStatus(u8 _numPAD, SPADStatus* _pPADStatus)
|
||||||
|
|
||||||
bool LocalSearchDevices(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, int &_NumPads)
|
bool LocalSearchDevices(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, int &_NumPads)
|
||||||
{
|
{
|
||||||
// Turn off device polling while searching
|
|
||||||
EnablePolling(false);
|
|
||||||
|
|
||||||
//DEBUG_LOG(PAD, "LocalSearchDevices");
|
//DEBUG_LOG(PAD, "LocalSearchDevices");
|
||||||
bool Success = InputCommon::SearchDevices(_joyinfo, _NumPads);
|
bool Success = InputCommon::SearchDevices(_joyinfo, _NumPads);
|
||||||
|
|
||||||
DoLocalSearchDevices(_joyinfo, _NumPads);
|
DoLocalSearchDevices(_joyinfo, _NumPads);
|
||||||
|
|
||||||
EnablePolling(true);
|
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LocalSearchDevicesReset(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, int &_NumPads)
|
bool LocalSearchDevicesReset(std::vector<InputCommon::CONTROLLER_INFO> &_joyinfo, int &_NumPads)
|
||||||
{
|
{
|
||||||
//DEBUG_LOG(PAD, "LocalSearchDevicesUpdate: %i", IsPolling());
|
//DEBUG_LOG(PAD, "LocalSearchDevicesUpdate: %i", IsPolling());
|
||||||
|
// Turn off device polling while resetting
|
||||||
bool Success = InputCommon::SearchDevicesReset(_joyinfo, _NumPads);
|
EnablePolling(false);
|
||||||
|
bool Success = InputCommon::SearchDevicesReset(_joyinfo, _NumPads);
|
||||||
|
EnablePolling(true);
|
||||||
|
|
||||||
DoLocalSearchDevices(_joyinfo, _NumPads);
|
DoLocalSearchDevices(_joyinfo, _NumPads);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue