Convert GetUserPath to return a std::string instead of a const char *. This simplifies its usage in most cases.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7265 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-02-28 20:40:15 +00:00
parent 1b8f476024
commit ba54fac9eb
82 changed files with 408 additions and 449 deletions

View File

@ -54,12 +54,11 @@ namespace AudioCommon
ac_Config.Update();
if (soundStream->Start())
{
if (ac_Config.m_DumpAudio) {
char audio_file_name[255];
snprintf(audio_file_name, 255, "%saudiodump.wav", File::GetUserPath(D_DUMPAUDIO_IDX));
File::CreateFullPath(audio_file_name);
mixer->StartLogAudio(audio_file_name);
//soundStream->StartLogAudio(audio_file_name);
if (ac_Config.m_DumpAudio)
{
std::string audio_file_name = File::GetUserPath(D_DUMPAUDIO_IDX) + "audiodump.wav";
File::CreateFullPath(audio_file_name.c_str());
mixer->StartLogAudio(audio_file_name.c_str());
}
return soundStream;

View File

@ -28,7 +28,7 @@ SoundStream *soundStream;
void AudioCommonConfig::Load()
{
IniFile file;
file.Load(std::string(File::GetUserPath(F_DSPCONFIG_IDX)).c_str());
file.Load(File::GetUserPath(F_DSPCONFIG_IDX));
file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true);
file.Get("Config", "EnableThrottle", &m_EnableThrottle, true);
@ -51,7 +51,7 @@ void AudioCommonConfig::Load()
void AudioCommonConfig::SaveSettings()
{
IniFile file;
file.Load(std::string(File::GetUserPath(F_DSPCONFIG_IDX)).c_str());
file.Load(File::GetUserPath(F_DSPCONFIG_IDX));
file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic);
file.Set("Config", "EnableThrottle", m_EnableThrottle);
@ -61,7 +61,7 @@ void AudioCommonConfig::SaveSettings()
file.Set("Config", "Frequency", iFrequency);
file.Set("Config", "Volume", m_Volume);
file.Save((std::string(File::GetUserPath(F_DSPCONFIG_IDX)).c_str()));
file.Save(File::GetUserPath(F_DSPCONFIG_IDX));
}
// Update according to the values (stream/mixer)