mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
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
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user