Hopefully completely fix up the issues with the wiimote auto reconnect option not turning on/off properly.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5252 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
85a1b2af45
commit
f56ce07c8b
|
@ -31,6 +31,8 @@ SConfig::SConfig()
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
//Make sure we load settings
|
//Make sure we load settings
|
||||||
LoadSettingsHLE();
|
LoadSettingsHLE();
|
||||||
|
LoadSettingsWii()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SConfig::Init()
|
void SConfig::Init()
|
||||||
|
@ -248,13 +250,6 @@ void SConfig::LoadSettings()
|
||||||
ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0);
|
ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0);
|
||||||
ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default
|
ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default
|
||||||
|
|
||||||
//Wiimote configs
|
|
||||||
for (int i = 0; i < 4; i++)
|
|
||||||
{
|
|
||||||
char SectionName[32];
|
|
||||||
sprintf(SectionName, "Wiimote%i", i + 1);
|
|
||||||
ini.Get(SectionName, "AutoReconnectRealWiimote", &m_WiiAutoReconnect, false);
|
|
||||||
}
|
|
||||||
// Plugins
|
// Plugins
|
||||||
ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, m_DefaultGFXPlugin.c_str());
|
ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, m_DefaultGFXPlugin.c_str());
|
||||||
ini.Get("Core", "DSPPlugin", &m_LocalCoreStartupParameter.m_strDSPPlugin, m_DefaultDSPPlugin.c_str());
|
ini.Get("Core", "DSPPlugin", &m_LocalCoreStartupParameter.m_strDSPPlugin, m_DefaultDSPPlugin.c_str());
|
||||||
|
@ -266,6 +261,18 @@ void SConfig::LoadSettings()
|
||||||
|
|
||||||
m_SYSCONF = new SysConf();
|
m_SYSCONF = new SysConf();
|
||||||
}
|
}
|
||||||
|
void SConfig::LoadSettingsWii()
|
||||||
|
{
|
||||||
|
IniFile ini;
|
||||||
|
//Wiimote configs
|
||||||
|
ini.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "Dolphin.ini").c_str());
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
char SectionName[32];
|
||||||
|
sprintf(SectionName, "Wiimote%i", i + 1);
|
||||||
|
ini.Get(SectionName, "AutoReconnectRealWiimote", &m_WiiAutoReconnect[i], false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Is this still even needed????
|
// Is this still even needed????
|
||||||
void SConfig::LoadSettingsHLE()
|
void SConfig::LoadSettingsHLE()
|
||||||
|
|
|
@ -44,7 +44,7 @@ struct SConfig
|
||||||
// Wii Devices
|
// Wii Devices
|
||||||
bool m_WiiSDCard;
|
bool m_WiiSDCard;
|
||||||
bool m_WiiKeyboard;
|
bool m_WiiKeyboard;
|
||||||
bool m_WiiAutoReconnect;
|
bool m_WiiAutoReconnect[4];
|
||||||
|
|
||||||
// DSP HLE Audio fix
|
// DSP HLE Audio fix
|
||||||
bool m_EnableRE0Fix;
|
bool m_EnableRE0Fix;
|
||||||
|
@ -102,6 +102,7 @@ struct SConfig
|
||||||
|
|
||||||
//Special load settings
|
//Special load settings
|
||||||
void LoadSettingsHLE();
|
void LoadSettingsHLE();
|
||||||
|
void LoadSettingsWii();
|
||||||
|
|
||||||
// Return the permanent and somewhat globally used instance of this struct
|
// Return the permanent and somewhat globally used instance of this struct
|
||||||
static SConfig& GetInstance() {return(*m_Instance);}
|
static SConfig& GetInstance() {return(*m_Instance);}
|
||||||
|
|
|
@ -175,7 +175,8 @@ CPanel::CPanel(
|
||||||
{
|
{
|
||||||
//Auto reconnect if option is turned on.
|
//Auto reconnect if option is turned on.
|
||||||
//TODO: Make this only auto reconnect wiimotes that have the option activated.
|
//TODO: Make this only auto reconnect wiimotes that have the option activated.
|
||||||
if (SConfig::GetInstance().m_WiiAutoReconnect)
|
LoadSettingsWii();//Make sure we are using the newest settings.
|
||||||
|
if (SConfig::GetInstance().m_WiiAutoReconnect[1])
|
||||||
{
|
{
|
||||||
GetUsbPointer()->AccessWiiMote(lParam | 0x100)->Activate(true);
|
GetUsbPointer()->AccessWiiMote(lParam | 0x100)->Activate(true);
|
||||||
NOTICE_LOG(WIIMOTE, "Wiimote %i has been auto-reconnected...", lParam + 1);
|
NOTICE_LOG(WIIMOTE, "Wiimote %i has been auto-reconnected...", lParam + 1);
|
||||||
|
|
Loading…
Reference in New Issue