Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement select audio backend CLI option.
Fixes issue 4920.
  • Loading branch information
rog9 committed Dec 22, 2012
1 parent 65f8856 commit d66dd97
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Source/Core/DolphinWX/Src/Main.cpp
Expand Up @@ -105,7 +105,7 @@ bool DolphinApp::OnInit()
bool UseDebugger = false;
bool UseLogger = false;
bool selectVideoBackend = false;
//bool selectAudioEmulation = false;
bool selectAudioEmulation = false;

wxString videoBackendName;
wxString audioEmulationName;
Expand Down Expand Up @@ -166,9 +166,8 @@ bool DolphinApp::OnInit()
BatchMode = parser.Found(wxT("batch"));
selectVideoBackend = parser.Found(wxT("video_backend"),
&videoBackendName);
// TODO: This currently has no effect. Implement or delete.
//selectAudioEmulation = parser.Found(wxT("audio_emulation"),
// &audioEmulationName);
selectAudioEmulation = parser.Found(wxT("audio_emulation"),
&audioEmulationName);
#endif // wxUSE_CMDLINE_PARSER

#if defined _DEBUG && defined _WIN32
Expand Down Expand Up @@ -236,6 +235,12 @@ bool DolphinApp::OnInit()
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend =
std::string(videoBackendName.mb_str());

if (selectAudioEmulation)
if (audioEmulationName == "HLE")
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = true;
else if (audioEmulationName == "LLE")
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = false;

VideoBackend::ActivateBackend(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend);

// Enable the PNG image handler for screenshots
Expand Down

0 comments on commit d66dd97

Please sign in to comment.