diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2010-06-03 04:55:39 +0000 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2010-06-03 04:55:39 +0000 |
| commit | e4085f0f049c0f681e3feaa97f7f0842c017ae8e (patch) | |
| tree | b04dce91280d8a771c894fcf8495473fc9e0c45b /Source/Core/AudioCommon/Src/AudioCommonConfig.cpp | |
| parent | d0c65b610c91531ff80298834bc866cf6b016fcd (diff) | |
Merge GCPadNew into Dolphin. This takes place in three segments: Core, InputCommon, and InputUICommon. From now on it can be referred to just as "GCPad".
Switch to Billiard's IniFile implementation throughout Dolphin (it's faster!!).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5579 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/AudioCommon/Src/AudioCommonConfig.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/Src/AudioCommonConfig.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp index f62e4b3863..75e4c56c63 100644 --- a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp +++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp @@ -20,28 +20,30 @@ AudioCommonConfig ac_Config; // Load from given file void AudioCommonConfig::Load(IniFile &file) { - file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true); - file.Get("Config", "EnableThrottle", &m_EnableThrottle, true); - file.Get("Config", "EnableJIT", &m_EnableJIT, true); - file.Get("Config", "Volume", &m_Volume, 75); + Section& config = file["Config"]; + config.Get("EnableDTKMusic", &m_EnableDTKMusic, true); + config.Get("EnableThrottle", &m_EnableThrottle, true); + config.Get("EnableJIT", &m_EnableJIT, true); + config.Get("Volume", &m_Volume, 75); #ifdef _WIN32 - file.Get("Config", "Backend", &sBackend, BACKEND_DIRECTSOUND); + config.Get("Backend", &sBackend, BACKEND_DIRECTSOUND); #elif defined(__APPLE__) std::string temp; - file.Get("Config", "Backend", &temp, BACKEND_COREAUDIO); + config.Get("Backend", &temp, BACKEND_COREAUDIO); strncpy(sBackend, temp.c_str(), 128); #else // linux - file.Get("Config", "Backend", &sBackend, BACKEND_ALSA); + config.Get("Backend", &sBackend, BACKEND_ALSA); #endif } // Set the values for the file void AudioCommonConfig::Set(IniFile &file) { - file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic); - file.Set("Config", "EnableThrottle", m_EnableThrottle); - file.Set("Config", "EnableJIT", m_EnableJIT); - file.Set("Config", "Backend", sBackend); - file.Set("Config", "Volume", m_Volume); + Section& config = file["Config"]; + config.Set("EnableDTKMusic", m_EnableDTKMusic); + config.Set("EnableThrottle", m_EnableThrottle); + config.Set("EnableJIT", m_EnableJIT); + config.Set("Backend", sBackend); + config.Set("Volume", m_Volume); } // Update according to the values (stream/mixer) |
