mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Remove the __APPLE__ workaround for reading config files from a ctor.
'#' is a fairly accepted comment character for .ini files along with the more official ';', but '//' isn't. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6872 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -24,11 +24,6 @@
|
||||
|
||||
CConfig g_Config;
|
||||
|
||||
CConfig::CConfig()
|
||||
{
|
||||
Load();
|
||||
}
|
||||
|
||||
void CConfig::Load()
|
||||
{
|
||||
// first load defaults
|
||||
|
@ -23,8 +23,6 @@
|
||||
struct CConfig
|
||||
{
|
||||
bool m_EnableHLEAudio;
|
||||
|
||||
CConfig();
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
|
@ -92,11 +92,8 @@ DSPConfigDialogHLE::DSPConfigDialogHLE(wxWindow *parent, wxWindowID id,
|
||||
|
||||
m_FrequencySelection->Append(_("48,000 Hz"));
|
||||
m_FrequencySelection->Append(_("32,000 Hz"));
|
||||
#ifdef __APPLE__
|
||||
int num = m_FrequencySelection->FindString(wxString::FromAscii(ac_Config.sFrequency));
|
||||
#else
|
||||
int num = m_FrequencySelection->FindString(wxString::FromAscii(ac_Config.sFrequency.c_str()));
|
||||
#endif
|
||||
int num = m_FrequencySelection->\
|
||||
FindString(wxString::FromAscii(ac_Config.sFrequency.c_str()));
|
||||
m_FrequencySelection->SetSelection(num);
|
||||
|
||||
sbSettings->Add(sFrequency, 0, wxALL, 7);
|
||||
@ -127,11 +124,8 @@ void DSPConfigDialogHLE::AddBackend(const char* backend)
|
||||
{
|
||||
// Update values
|
||||
m_BackendSelection->Append(wxString::FromAscii(backend));
|
||||
#ifdef __APPLE__
|
||||
int num = m_BackendSelection->FindString(wxString::FromAscii(ac_Config.sBackend));
|
||||
#else
|
||||
int num = m_BackendSelection->FindString(wxString::FromAscii(ac_Config.sBackend.c_str()));
|
||||
#endif
|
||||
int num = m_BackendSelection->\
|
||||
FindString(wxString::FromAscii(ac_Config.sBackend.c_str()));
|
||||
m_BackendSelection->SetSelection(num);
|
||||
}
|
||||
|
||||
@ -158,13 +152,8 @@ void DSPConfigDialogHLE::SettingsChanged(wxCommandEvent& event)
|
||||
ac_Config.m_EnableDTKMusic = m_buttonEnableDTKMusic->GetValue();
|
||||
ac_Config.m_EnableThrottle = m_buttonEnableThrottle->GetValue();
|
||||
|
||||
#ifdef __APPLE__
|
||||
strncpy(ac_Config.sBackend, m_BackendSelection->GetStringSelection().mb_str(), 128);
|
||||
strncpy(ac_Config.sFrequency, m_FrequencySelection->GetStringSelection().mb_str(), 128);
|
||||
#else
|
||||
ac_Config.sBackend = m_BackendSelection->GetStringSelection().mb_str();
|
||||
ac_Config.sFrequency = m_FrequencySelection->GetStringSelection().mb_str();
|
||||
#endif
|
||||
ac_Config.Update();
|
||||
g_Config.Save();
|
||||
|
||||
|
@ -25,11 +25,6 @@
|
||||
|
||||
CConfig g_Config;
|
||||
|
||||
CConfig::CConfig()
|
||||
{
|
||||
Load();
|
||||
}
|
||||
|
||||
void CConfig::Load()
|
||||
{
|
||||
// first load defaults
|
||||
|
@ -22,8 +22,6 @@
|
||||
|
||||
struct CConfig
|
||||
{
|
||||
CConfig();
|
||||
|
||||
void Load();
|
||||
void Save();
|
||||
};
|
||||
|
@ -95,13 +95,10 @@ DSPConfigDialogLLE::DSPConfigDialogLLE(wxWindow *parent, wxWindowID id, const wx
|
||||
void DSPConfigDialogLLE::AddBackend(const char* backend)
|
||||
{
|
||||
// Update value
|
||||
m_BackendSelection->Append(wxString::FromAscii(backend));
|
||||
m_BackendSelection->Append(wxString::FromAscii(backend));
|
||||
|
||||
#ifdef __APPLE__
|
||||
int num = m_BackendSelection->FindString(wxString::FromAscii(ac_Config.sBackend));
|
||||
#else
|
||||
int num = m_BackendSelection->FindString(wxString::FromAscii(ac_Config.sBackend.c_str()));
|
||||
#endif
|
||||
int num = m_BackendSelection->\
|
||||
FindString(wxString::FromAscii(ac_Config.sBackend.c_str()));
|
||||
m_BackendSelection->SetSelection(num);
|
||||
}
|
||||
|
||||
@ -128,11 +125,7 @@ void DSPConfigDialogLLE::SettingsChanged(wxCommandEvent& event)
|
||||
ac_Config.m_EnableThrottle = m_buttonEnableThrottle->GetValue();
|
||||
ac_Config.m_EnableJIT = m_buttonEnableJIT->GetValue();
|
||||
|
||||
#ifdef __APPLE__
|
||||
strncpy(ac_Config.sBackend, m_BackendSelection->GetStringSelection().mb_str(), 128);
|
||||
#else
|
||||
ac_Config.sBackend = m_BackendSelection->GetStringSelection().mb_str();
|
||||
#endif
|
||||
ac_Config.Update();
|
||||
g_Config.Save();
|
||||
|
||||
|
Reference in New Issue
Block a user