diff options
| author | hrydgard <hrydgard@gmail.com> | 2010-06-03 18:05:08 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2010-06-03 18:05:08 +0000 |
| commit | a3c96ac42c4c2ce4a4cf2f5ca09a5ae9dd4bd303 (patch) | |
| tree | da7ca1f64fce704934d581c82a9533fe38b103f1 /Source/Core/AudioCommon/Src/AudioCommonConfig.cpp | |
| parent | 3236aa9e73cf6d0bc798cce6f5224cff40eb6955 (diff) | |
Warp back to 5578. Sorry for the lost changes, please re-apply. Reason: 5579 is a complete disaster.
Not only does it change tons of files to switch to a new and non-working (it doesn't parse my ini files, at least) ini parser, it also reshuffles a lot of code and removes a plugin. The latter part is fine, but doing these two major switches in one revision, one of which is broken, is completely unacceptable. I said to merge tiny changes, not massive reworkings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5589 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, 12 insertions, 14 deletions
diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp index 75e4c56c63..f62e4b3863 100644 --- a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp +++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp @@ -20,30 +20,28 @@ AudioCommonConfig ac_Config; // Load from given file void AudioCommonConfig::Load(IniFile &file) { - 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); + 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); #ifdef _WIN32 - config.Get("Backend", &sBackend, BACKEND_DIRECTSOUND); + file.Get("Config", "Backend", &sBackend, BACKEND_DIRECTSOUND); #elif defined(__APPLE__) std::string temp; - config.Get("Backend", &temp, BACKEND_COREAUDIO); + file.Get("Config", "Backend", &temp, BACKEND_COREAUDIO); strncpy(sBackend, temp.c_str(), 128); #else // linux - config.Get("Backend", &sBackend, BACKEND_ALSA); + file.Get("Config", "Backend", &sBackend, BACKEND_ALSA); #endif } // Set the values for the file void AudioCommonConfig::Set(IniFile &file) { - 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); + 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); } // Update according to the values (stream/mixer) |
