Add some command line options to directly specify plugins. You can use "dolphin /V Plugins/Plugin_Video???.dll" in the command line to start Dolphin with the ??? plugin. This can be done also for other plugins. There are a couple of reasons to do so. For example, Dolphin compiled in DEBUG would often crash if loaded with non-DEBUG plugins. Therefore, you may want use to DEBUG plugins when running the DEBUG dolphin by giving all the command switches.

Also add some code to show the version of the plugin in the plugin configuration window title, so we can see clearly which version of the plugin we are using.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4208 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
rice1964
2009-09-06 02:55:14 +00:00
parent 8b2d991be4
commit c30ed92e75
4 changed files with 92 additions and 25 deletions

View File

@ -93,7 +93,17 @@ bool DolphinApp::OnInit()
bool UseDebugger = false;
bool UseLogger = false;
bool LoadElf = false;
bool selectVideoPlugin = false;
bool selectAudioPlugin = false;
bool selectPadPlugin = false;
bool selectWiimotePlugin = false;
wxString ElfFile;
wxString videoPluginFilename;
wxString audioPluginFilename;
wxString padPluginFilename;
wxString wiimotePluginFilename;
// Detect CPU info and write it to the cpu_info struct
cpu_info.Detect();
@ -207,6 +217,22 @@ bool DolphinApp::OnInit()
wxCMD_LINE_OPTION, _T("e"), _T("elf"), _T("Loads an elf file"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _T("V"), _T("video_plugin"),_T("Specify a video plugin"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _T("A"), _T("audio_plugin"),_T("Specify an audio plugin"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _T("P"), _T("pad_plugin"),_T("Specify a pad plugin"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, _T("W"), _T("wiimote_plugin"),_T("Specify a wiimote plugin"),
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_NONE
}
@ -270,12 +296,35 @@ bool DolphinApp::OnInit()
if( LoadElf && ElfFile == wxEmptyString )
PanicAlert("You did not specify a file name");
selectVideoPlugin = parser.Found(_T("video_plugin"), &videoPluginFilename);
selectAudioPlugin = parser.Found(_T("audio_plugin"), &audioPluginFilename);
selectPadPlugin = parser.Found(_T("pad_plugin"), &padPluginFilename);
selectWiimotePlugin = parser.Found(_T("wiimote_plugin"), &wiimotePluginFilename);
// ============
#endif
// Load CONFIG_FILE settings
SConfig::GetInstance().LoadSettings();
if (selectVideoPlugin && videoPluginFilename != wxEmptyString)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoPlugin = std::string(videoPluginFilename.mb_str());
}
if (selectAudioPlugin && audioPluginFilename != wxEmptyString)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDSPPlugin = std::string(audioPluginFilename.mb_str());
}
if (selectPadPlugin && padPluginFilename != wxEmptyString)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strPadPlugin[0] = std::string(padPluginFilename.mb_str());
}
if (selectWiimotePlugin && wiimotePluginFilename != wxEmptyString)
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strWiimotePlugin[0] = std::string(wiimotePluginFilename.mb_str());
}
// Enable the PNG image handler
wxInitAllImageHandlers();