diff options
| author | hrydgard <hrydgard@gmail.com> | 2010-06-12 18:45:39 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2010-06-12 18:45:39 +0000 |
| commit | caab5f62adbc396596907fe555246c586eeb8d00 (patch) | |
| tree | b70d62e368b6280267c7d23e1cec98978e646430 /Source/Core/InputCommon/Src/InputConfig.cpp | |
| parent | 393aa36fc22826d00e4bca6f5ba5a8ae02bc114d (diff) | |
(cleanup) Delete an awful global variable (g_plugin in ConfigDiag). Rename the Plugin class in InputConfig to InputPlugin, which is better but not ideal.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5663 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/InputCommon/Src/InputConfig.cpp')
| -rw-r--r-- | Source/Core/InputCommon/Src/InputConfig.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Core/InputCommon/Src/InputConfig.cpp b/Source/Core/InputCommon/Src/InputConfig.cpp index 410aecb928..b4d8a3b546 100644 --- a/Source/Core/InputCommon/Src/InputConfig.cpp +++ b/Source/Core/InputCommon/Src/InputConfig.cpp @@ -17,7 +17,7 @@ #include "InputConfig.h" -Plugin::Plugin( const char* const _ini_name, const char* const _gui_name, const char* const _profile_name ) +InputPlugin::InputPlugin( const char* const _ini_name, const char* const _gui_name, const char* const _profile_name ) : ini_name(_ini_name) , gui_name(_gui_name) , profile_name(_profile_name) @@ -30,7 +30,7 @@ Plugin::Plugin( const char* const _ini_name, const char* const _gui_name, const // controllers.push_back( new Wiimote( i ) ); }; -Plugin::~Plugin() +InputPlugin::~InputPlugin() { // delete pads std::vector<ControllerEmu*>::const_iterator i = controllers.begin(), @@ -39,7 +39,7 @@ Plugin::~Plugin() delete *i; } -bool Plugin::LoadConfig() +bool InputPlugin::LoadConfig() { IniFile inifile; if (false == inifile.Load(std::string(File::GetUserPath(D_CONFIG_IDX)) + ini_name + ".ini")) @@ -51,9 +51,10 @@ bool Plugin::LoadConfig() for ( ; i!=e; ++i ) { (*i)->LoadConfig(inifile.GetOrCreateSection((*i)->GetName().c_str())); } + return true; } -void Plugin::SaveConfig() +void InputPlugin::SaveConfig() { std::string ini_filename = (std::string(File::GetUserPath(D_CONFIG_IDX)) + ini_name + ".ini" ); |
