mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 17:49:48 -06:00
Made GCPadNew load the same defaults as old GCPad if GCPadNew.ini doesn't exist. (haven't tested Linux/OS X)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5654 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -24,12 +24,14 @@ Plugin::~Plugin()
|
||||
delete *i;
|
||||
}
|
||||
|
||||
void Plugin::LoadConfig()
|
||||
bool Plugin::LoadConfig()
|
||||
{
|
||||
IniFile inifile;
|
||||
inifile.Load(std::string(File::GetUserPath(D_CONFIG_IDX)) + ini_name + ".ini");
|
||||
if (false == inifile.Load(std::string(File::GetUserPath(D_CONFIG_IDX)) + ini_name + ".ini"))
|
||||
return false;
|
||||
|
||||
std::vector< ControllerEmu* >::const_iterator i = controllers.begin(),
|
||||
std::vector< ControllerEmu* >::const_iterator
|
||||
i = controllers.begin(),
|
||||
e = controllers.end();
|
||||
for ( ; i!=e; ++i ) {
|
||||
(*i)->LoadConfig(inifile.GetOrCreateSection((*i)->GetName().c_str()));
|
||||
|
@ -20,7 +20,7 @@ public:
|
||||
Plugin( const char* const _ini_name, const char* const _gui_name, const char* const _profile_name );
|
||||
~Plugin();
|
||||
|
||||
void LoadConfig();
|
||||
bool LoadConfig();
|
||||
void SaveConfig();
|
||||
|
||||
std::vector< ControllerEmu* > controllers;
|
||||
|
@ -404,6 +404,8 @@ public:
|
||||
|
||||
virtual std::string GetName() const = 0;
|
||||
|
||||
virtual void LoadDefaults() {}
|
||||
|
||||
void LoadConfig(IniFile::Section *sec, const std::string& base = "");
|
||||
void SaveConfig(IniFile::Section *sec, const std::string& base = "");
|
||||
void UpdateDefaultDevice();
|
||||
|
Reference in New Issue
Block a user