From d69abeac432c2e8afc530794760c148ebbe5b686 Mon Sep 17 00:00:00 2001 From: "j4ck.fr0st" Date: Tue, 30 Mar 2010 17:57:44 +0000 Subject: [PATCH] buildfix, plus some cleanup to make things a bit more readable git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5253 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/ConfigManager.cpp | 2 +- Source/Core/DolphinWX/Src/Frame.cpp | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp index a20528575f..7bc7984652 100644 --- a/Source/Core/Core/Src/ConfigManager.cpp +++ b/Source/Core/Core/Src/ConfigManager.cpp @@ -31,7 +31,7 @@ SConfig::SConfig() LoadSettings(); //Make sure we load settings LoadSettingsHLE(); - LoadSettingsWii() + LoadSettingsWii(); } diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 45bcab9a28..aebf9d8f24 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -173,13 +173,15 @@ CPanel::CPanel( main_frame->bNoWiimoteMsg = false; else { + int wiimote_idx = lParam; + int wiimote_num = wiimote_idx + 1; //Auto reconnect if option is turned on. //TODO: Make this only auto reconnect wiimotes that have the option activated. - LoadSettingsWii();//Make sure we are using the newest settings. - if (SConfig::GetInstance().m_WiiAutoReconnect[1]) + SConfig::GetInstance().LoadSettingsWii();//Make sure we are using the newest settings. + if (SConfig::GetInstance().m_WiiAutoReconnect[wiimote_idx]) { - GetUsbPointer()->AccessWiiMote(lParam | 0x100)->Activate(true); - NOTICE_LOG(WIIMOTE, "Wiimote %i has been auto-reconnected...", lParam + 1); + GetUsbPointer()->AccessWiiMote(wiimote_idx | 0x100)->Activate(true); + NOTICE_LOG(WIIMOTE, "Wiimote %i has been auto-reconnected...", wiimote_num); } else { @@ -189,13 +191,13 @@ CPanel::CPanel( wxString::Format(wxT("Wiimote %i has been disconnected by system.\n") wxT("Maybe this game doesn't support multi-wiimote,\n") wxT("or maybe it is due to idle time out or other reason.\n\n") - wxT("Do you want to reconnect immediately?"), lParam + 1), + wxT("Do you want to reconnect immediately?"), wiimote_num), wxT("Reconnect Wiimote Confirm"), wxYES_NO | wxSTAY_ON_TOP | wxICON_INFORMATION, //wxICON_QUESTION, wxDefaultPosition); if (dlg->ShowModal() == wxID_YES) - GetUsbPointer()->AccessWiiMote(lParam | 0x100)->Activate(true); + GetUsbPointer()->AccessWiiMote(wiimote_idx | 0x100)->Activate(true); dlg->Destroy(); }