mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
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:
@ -93,7 +93,17 @@ bool DolphinApp::OnInit()
|
|||||||
bool UseDebugger = false;
|
bool UseDebugger = false;
|
||||||
bool UseLogger = false;
|
bool UseLogger = false;
|
||||||
bool LoadElf = false;
|
bool LoadElf = false;
|
||||||
|
bool selectVideoPlugin = false;
|
||||||
|
bool selectAudioPlugin = false;
|
||||||
|
bool selectPadPlugin = false;
|
||||||
|
bool selectWiimotePlugin = false;
|
||||||
|
|
||||||
wxString ElfFile;
|
wxString ElfFile;
|
||||||
|
wxString videoPluginFilename;
|
||||||
|
wxString audioPluginFilename;
|
||||||
|
wxString padPluginFilename;
|
||||||
|
wxString wiimotePluginFilename;
|
||||||
|
|
||||||
|
|
||||||
// Detect CPU info and write it to the cpu_info struct
|
// Detect CPU info and write it to the cpu_info struct
|
||||||
cpu_info.Detect();
|
cpu_info.Detect();
|
||||||
@ -207,6 +217,22 @@ bool DolphinApp::OnInit()
|
|||||||
wxCMD_LINE_OPTION, _T("e"), _T("elf"), _T("Loads an elf file"),
|
wxCMD_LINE_OPTION, _T("e"), _T("elf"), _T("Loads an elf file"),
|
||||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
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
|
wxCMD_LINE_NONE
|
||||||
}
|
}
|
||||||
@ -270,12 +296,35 @@ bool DolphinApp::OnInit()
|
|||||||
if( LoadElf && ElfFile == wxEmptyString )
|
if( LoadElf && ElfFile == wxEmptyString )
|
||||||
PanicAlert("You did not specify a file name");
|
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
|
#endif
|
||||||
|
|
||||||
// Load CONFIG_FILE settings
|
// Load CONFIG_FILE settings
|
||||||
SConfig::GetInstance().LoadSettings();
|
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
|
// Enable the PNG image handler
|
||||||
wxInitAllImageHandlers();
|
wxInitAllImageHandlers();
|
||||||
|
|
||||||
|
@ -529,7 +529,8 @@ const char *GeneratePixelShader(u32 texture_mask, bool dstAlphaEnable, bool HLSL
|
|||||||
{
|
{
|
||||||
// alpha test will always fail, so restart the shader and just make it an empty function
|
// alpha test will always fail, so restart the shader and just make it an empty function
|
||||||
p = pmainstart;
|
p = pmainstart;
|
||||||
WRITE(p, "discard;\n");
|
WRITE(p, HLSL ? "clip(-1);" : "discard;\n");
|
||||||
|
//WRITE(p, "discard;\n");
|
||||||
WRITE(p, "ocol0 = 0;\n");
|
WRITE(p, "ocol0 = 0;\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -959,7 +960,6 @@ static void WriteFog(char *&p)
|
|||||||
|
|
||||||
//WRITE (p, " float fog = clamp(ze - "I_FOG"[1].z, 0.0f, 1.0f);\n");
|
//WRITE (p, " float fog = clamp(ze - "I_FOG"[1].z, 0.0f, 1.0f);\n");
|
||||||
WRITE (p, " float fog = saturate(ze - "I_FOG"[1].z);\n");
|
WRITE (p, " float fog = saturate(ze - "I_FOG"[1].z);\n");
|
||||||
}
|
|
||||||
|
|
||||||
switch (bpmem.fog.c_proj_fsel.fsel)
|
switch (bpmem.fog.c_proj_fsel.fsel)
|
||||||
{
|
{
|
||||||
@ -985,6 +985,6 @@ static void WriteFog(char *&p)
|
|||||||
default: WARN_LOG(VIDEO, "Unknown Fog Type! %08x", bpmem.fog.c_proj_fsel.fsel);
|
default: WARN_LOG(VIDEO, "Unknown Fog Type! %08x", bpmem.fog.c_proj_fsel.fsel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enabled)
|
|
||||||
WRITE(p, " prev.rgb = (1.0f - fog) * prev.rgb + (fog * "I_FOG"[0].rgb);\n");
|
WRITE(p, " prev.rgb = (1.0f - fog) * prev.rgb + (fog * "I_FOG"[0].rgb);\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -229,7 +229,17 @@ void DlgSettings_Show(HINSTANCE hInstance, HWND _hParent)
|
|||||||
sheet.Add(new TabDirect3D,(LPCTSTR)IDD_SETTINGS,_T("Direct3D"));
|
sheet.Add(new TabDirect3D,(LPCTSTR)IDD_SETTINGS,_T("Direct3D"));
|
||||||
sheet.Add(new TabEnhancements,(LPCTSTR)IDD_ENHANCEMENTS,_T("Enhancements"));
|
sheet.Add(new TabEnhancements,(LPCTSTR)IDD_ENHANCEMENTS,_T("Enhancements"));
|
||||||
sheet.Add(new TabAdvanced,(LPCTSTR)IDD_ADVANCED,_T("Advanced"));
|
sheet.Add(new TabAdvanced,(LPCTSTR)IDD_ADVANCED,_T("Advanced"));
|
||||||
sheet.Show(hInstance,_hParent,_T("Graphics Plugin"));
|
|
||||||
|
#ifdef DEBUGFAST
|
||||||
|
sheet.Show(hInstance,_hParent,_T("DX9 Graphics Plugin (DEBUGFAST)"));
|
||||||
|
#else
|
||||||
|
#ifndef _DEBUG
|
||||||
|
sheet.Show(hInstance,_hParent,_T("DX9 Graphics Plugin"));
|
||||||
|
#else
|
||||||
|
sheet.Show(hInstance,_hParent,_T("DX9 Graphics Plugin (DEBUG)"));
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
g_Config.Save();
|
g_Config.Save();
|
||||||
|
|
||||||
if(( tfoe != g_Config.bTexFmtOverlayEnable) ||
|
if(( tfoe != g_Config.bTexFmtOverlayEnable) ||
|
||||||
|
@ -49,7 +49,15 @@ class GFXConfigDialogOGL : public wxDialog
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GFXConfigDialogOGL(wxWindow *parent, wxWindowID id = 1,
|
GFXConfigDialogOGL(wxWindow *parent, wxWindowID id = 1,
|
||||||
|
#ifdef DEBUGFAST
|
||||||
|
const wxString &title = wxT("OpenGL (DEBUGFAST) Plugin Configuration"),
|
||||||
|
#else
|
||||||
|
#ifndef _DEBUG
|
||||||
const wxString &title = wxT("OpenGL Plugin Configuration"),
|
const wxString &title = wxT("OpenGL Plugin Configuration"),
|
||||||
|
#else
|
||||||
|
const wxString &title = wxT("OpenGL (DEBUG) Plugin Configuration"),
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_DIALOG_STYLE);
|
long style = wxDEFAULT_DIALOG_STYLE);
|
||||||
|
Reference in New Issue
Block a user