Implement select audio backend CLI option.
Fixes issue 4920.
This commit is contained in:
parent
65f88567b5
commit
d66dd970cd
|
@ -105,7 +105,7 @@ bool DolphinApp::OnInit()
|
||||||
bool UseDebugger = false;
|
bool UseDebugger = false;
|
||||||
bool UseLogger = false;
|
bool UseLogger = false;
|
||||||
bool selectVideoBackend = false;
|
bool selectVideoBackend = false;
|
||||||
//bool selectAudioEmulation = false;
|
bool selectAudioEmulation = false;
|
||||||
|
|
||||||
wxString videoBackendName;
|
wxString videoBackendName;
|
||||||
wxString audioEmulationName;
|
wxString audioEmulationName;
|
||||||
|
@ -166,9 +166,8 @@ bool DolphinApp::OnInit()
|
||||||
BatchMode = parser.Found(wxT("batch"));
|
BatchMode = parser.Found(wxT("batch"));
|
||||||
selectVideoBackend = parser.Found(wxT("video_backend"),
|
selectVideoBackend = parser.Found(wxT("video_backend"),
|
||||||
&videoBackendName);
|
&videoBackendName);
|
||||||
// TODO: This currently has no effect. Implement or delete.
|
selectAudioEmulation = parser.Found(wxT("audio_emulation"),
|
||||||
//selectAudioEmulation = parser.Found(wxT("audio_emulation"),
|
&audioEmulationName);
|
||||||
// &audioEmulationName);
|
|
||||||
#endif // wxUSE_CMDLINE_PARSER
|
#endif // wxUSE_CMDLINE_PARSER
|
||||||
|
|
||||||
#if defined _DEBUG && defined _WIN32
|
#if defined _DEBUG && defined _WIN32
|
||||||
|
@ -236,6 +235,12 @@ bool DolphinApp::OnInit()
|
||||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend =
|
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend =
|
||||||
std::string(videoBackendName.mb_str());
|
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);
|
VideoBackend::ActivateBackend(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend);
|
||||||
|
|
||||||
// Enable the PNG image handler for screenshots
|
// Enable the PNG image handler for screenshots
|
||||||
|
|
Loading…
Reference in New Issue