diff --git a/Source/Core/AudioCommon/Src/AudioCommon.cpp b/Source/Core/AudioCommon/Src/AudioCommon.cpp index c5c8a2a7b8..114599b6cf 100644 --- a/Source/Core/AudioCommon/Src/AudioCommon.cpp +++ b/Source/Core/AudioCommon/Src/AudioCommon.cpp @@ -37,11 +37,11 @@ namespace AudioCommon std::string backend = ac_Config.sBackend; if (backend == BACKEND_OPENAL && OpenALStream::isValid()) soundStream = new OpenALStream(mixer); - else if (backend == BACKEND_NULLSOUND && NullSound::isValid()) + else if (backend == BACKEND_NULLSOUND && NullSound::isValid()) soundStream = new NullSound(mixer, g_dspInitialize.hWnd); else if (backend == BACKEND_DIRECTSOUND && DSound::isValid()) soundStream = new DSound(mixer, g_dspInitialize.hWnd); - else if (backend == BACKEND_XAUDIO2 && XAudio2::isValid()) + else if (backend == BACKEND_XAUDIO2 && XAudio2::isValid()) soundStream = new XAudio2(mixer); else if (backend == BACKEND_AOSOUND && AOSound::isValid()) soundStream = new AOSound(mixer); diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp index 9adaa186f2..20369858ee 100644 --- a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp +++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp @@ -23,23 +23,17 @@ 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, 100); -#ifdef _WIN32 - file.Get("Config", "Backend", &sBackend, BACKEND_DIRECTSOUND); - file.Get("Config", "Frequency", &sFrequency, "48,000 Hz"); -#elif defined __APPLE__ - std::string temp; - file.Get("Config", "Backend", &temp, BACKEND_COREAUDIO); - strncpy(sBackend, temp.c_str(), 128); - file.Get("Config", "Frequency", &temp, "48,000 Hz"); - strncpy(sFrequency, temp.c_str(), 128); -#elif defined __linux__ +#if defined __linux__ && HAVE_ALSA file.Get("Config", "Backend", &sBackend, BACKEND_ALSA); - file.Get("Config", "Frequency", &sFrequency, "48,000 Hz"); +#elif defined __APPLE__ + file.Get("Config", "Backend", &sBackend, BACKEND_COREAUDIO); +#elif defined _WIN32 + file.Get("Config", "Backend", &sBackend, BACKEND_DIRECTSOUND); #else - file.Get("Config", "Backend", &sBackend, BACKEND_OPENAL); - file.Get("Config", "Frequency", &sFrequency, "48,000 Hz"); + file.Get("Config", "Backend", &sBackend, BACKEND_NULLSOUND); #endif + file.Get("Config", "Frequency", &sFrequency, "48,000 Hz"); + file.Get("Config", "Volume", &m_Volume, 100); } // Set the values for the file diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.h b/Source/Core/AudioCommon/Src/AudioCommonConfig.h index 46d9345f4a..ff35fb2229 100644 --- a/Source/Core/AudioCommon/Src/AudioCommonConfig.h +++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.h @@ -23,12 +23,12 @@ // Backend Types #define BACKEND_NULLSOUND "No audio output" -#define BACKEND_COREAUDIO "CoreAudio" -#define BACKEND_DIRECTSOUND "DSound" -#define BACKEND_AOSOUND "AOSound" -#define BACKEND_OPENAL "OpenAL" -#define BACKEND_ALSA "ALSA" -#define BACKEND_PULSEAUDIO "Pulse" +#define BACKEND_ALSA "ALSA" +#define BACKEND_AOSOUND "AOSound" +#define BACKEND_COREAUDIO "CoreAudio" +#define BACKEND_DIRECTSOUND "DSound" +#define BACKEND_OPENAL "OpenAL" +#define BACKEND_PULSEAUDIO "Pulse" #define BACKEND_XAUDIO2 "XAudio2" struct AudioCommonConfig @@ -37,13 +37,8 @@ struct AudioCommonConfig bool m_EnableThrottle; bool m_EnableJIT; int m_Volume; -#ifdef __APPLE__ - char sBackend[128]; - char sFrequency[128]; -#else std::string sBackend; std::string sFrequency; -#endif // Load from given file void Load(IniFile &file); diff --git a/Source/Core/Common/Src/IniFile.cpp b/Source/Core/Common/Src/IniFile.cpp index 83001574de..caccb9636f 100644 --- a/Source/Core/Common/Src/IniFile.cpp +++ b/Source/Core/Common/Src/IniFile.cpp @@ -32,13 +32,16 @@ namespace { static void ParseLine(const std::string& line, std::string* keyOut, std::string* valueOut, std::string* commentOut) { - // int FirstEquals = (int)line.find("=", 0); int FirstCommentChar = -1; + // Comments - //if (FirstCommentChar < 0) {FirstCommentChar = (int)line.find(";", FirstEquals > 0 ? FirstEquals : 0);} - if (FirstCommentChar < 0) {FirstCommentChar = (int)line.find("#", FirstEquals > 0 ? FirstEquals : 0);} - if (FirstCommentChar < 0) {FirstCommentChar = (int)line.find("//", FirstEquals > 0 ? FirstEquals : 0);} + if (FirstCommentChar < 0) + FirstCommentChar = + (int)line.find(";", FirstEquals > 0 ? FirstEquals : 0); + if (FirstCommentChar < 0) + FirstCommentChar = + (int)line.find("#", FirstEquals > 0 ? FirstEquals : 0); // Allow preservation of spacing before comment if (FirstCommentChar > 0) diff --git a/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp b/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp index adeeb49cd4..828f8e41da 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp +++ b/Source/Core/Core/Src/HW/EXI_DeviceGecko.cpp @@ -150,9 +150,6 @@ void CEXIGecko::ImmReadWrite(u32 &_uData, u32 _uSize) if (!GetAvailableSock(client)) return; - // for debug - u32 oldval = _uData; - switch (_uData >> 28) { // maybe do something fun later diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp index 4c3fe0e685..551975fa5f 100644 --- a/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp +++ b/Source/Core/Core/Src/HW/WiimoteEmu/WiimoteEmu.cpp @@ -908,12 +908,10 @@ void Wiimote::LoadDefaults(const ControllerInterface& ciface) set_control(m_shake, i, "Click 2"); // IR -#ifndef __APPLE__ set_control(m_ir, 0, "Cursor Y-"); set_control(m_ir, 1, "Cursor Y+"); set_control(m_ir, 2, "Cursor X-"); set_control(m_ir, 3, "Cursor X+"); -#endif // DPad #ifdef _WIN32 diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp index 7863d55639..be8a126228 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp @@ -1497,7 +1497,6 @@ void Jit64::twx(UGeckoInstruction inst) JITDISABLE(Integer) s32 a = inst.RA; - s32 TO = inst.TO; gpr.Flush(FLUSH_ALL); fpr.Flush(FLUSH_ALL); diff --git a/Source/Core/DolphinWX/Src/InputConfigDiag.cpp b/Source/Core/DolphinWX/Src/InputConfigDiag.cpp index a30ef5154b..a9d1f6ff92 100644 --- a/Source/Core/DolphinWX/Src/InputConfigDiag.cpp +++ b/Source/Core/DolphinWX/Src/InputConfigDiag.cpp @@ -918,10 +918,7 @@ GamepadPage::GamepadPage(wxWindow* parent, InputPlugin& plugin, const unsigned i wxStaticBoxSizer* const device_sbox = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Device")); device_cbox = new wxComboBox(this, -1, wxT(""), wxDefaultPosition, wxSize(64,-1)); -#ifndef __APPLE__ - // causes a crash with some OS X wxWidgets device_cbox->ToggleWindowStyle(wxTE_PROCESS_ENTER); -#endif wxButton* refresh_button = new wxButton(this, -1, _("Refresh"), wxDefaultPosition, wxSize(60,-1)); diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp index a879ace92b..e2e8be2ae8 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Config.cpp @@ -24,11 +24,6 @@ CConfig g_Config; -CConfig::CConfig() -{ - Load(); -} - void CConfig::Load() { // first load defaults diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Config.h b/Source/Plugins/Plugin_DSP_HLE/Src/Config.h index e34ee252a6..23a0abc672 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/Config.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/Config.h @@ -23,8 +23,6 @@ struct CConfig { bool m_EnableHLEAudio; - - CConfig(); void Load(); void Save(); diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.cpp index 96221c6f08..726eda622f 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/ConfigDlg.cpp @@ -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(); diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp index 929b962d2f..9cf01e53c3 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/Config.cpp @@ -25,11 +25,6 @@ CConfig g_Config; -CConfig::CConfig() -{ - Load(); -} - void CConfig::Load() { // first load defaults diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Config.h b/Source/Plugins/Plugin_DSP_LLE/Src/Config.h index ab4567665c..4b78dd99f1 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/Config.h +++ b/Source/Plugins/Plugin_DSP_LLE/Src/Config.h @@ -22,8 +22,6 @@ struct CConfig { - CConfig(); - void Load(); void Save(); }; diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.cpp index 8a982e59a3..1cba538084 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/DSPConfigDlgLLE.cpp @@ -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();