diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 92cf4d5552..4fe7b26732 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -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(); diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index 285c18a772..25685dc9ca 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -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 p = pmainstart; - WRITE(p, "discard;\n"); + WRITE(p, HLSL ? "clip(-1);" : "discard;\n"); + //WRITE(p, "discard;\n"); WRITE(p, "ocol0 = 0;\n"); } else @@ -959,32 +960,31 @@ static void WriteFog(char *&p) //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"); - } - switch (bpmem.fog.c_proj_fsel.fsel) - { + switch (bpmem.fog.c_proj_fsel.fsel) + { case 0: // TODO - No fog? break; - case 2: // linear - // empty - break; - case 4: // exp - WRITE(p, " fog = 1.0f - pow(2, -8.0f * fog);\n"); - break; - case 5: // exp2 - WRITE(p, " fog = 1.0f - pow(2, -8.0f * fog * fog);\n"); - break; - case 6: // backward exp - WRITE(p, " fog = 1.0f - fog;\n"); - WRITE(p, " fog = pow(2, -8.0f * fog);\n"); - break; - case 7: // backward exp2 - WRITE(p, " fog = 1.0f - fog;\n"); - WRITE(p, " fog = pow(2, -8.0f * fog * fog);\n"); - break; + case 2: // linear + // empty + break; + case 4: // exp + WRITE(p, " fog = 1.0f - pow(2, -8.0f * fog);\n"); + break; + case 5: // exp2 + WRITE(p, " fog = 1.0f - pow(2, -8.0f * fog * fog);\n"); + break; + case 6: // backward exp + WRITE(p, " fog = 1.0f - fog;\n"); + WRITE(p, " fog = pow(2, -8.0f * fog);\n"); + break; + case 7: // backward exp2 + WRITE(p, " fog = 1.0f - fog;\n"); + WRITE(p, " fog = pow(2, -8.0f * fog * fog);\n"); + break; 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"); + } } diff --git a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp index b296af535a..9f5cb106fa 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/DlgSettings.cpp @@ -229,7 +229,17 @@ void DlgSettings_Show(HINSTANCE hInstance, HWND _hParent) sheet.Add(new TabDirect3D,(LPCTSTR)IDD_SETTINGS,_T("Direct3D")); sheet.Add(new TabEnhancements,(LPCTSTR)IDD_ENHANCEMENTS,_T("Enhancements")); 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(); if(( tfoe != g_Config.bTexFmtOverlayEnable) || diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h index f8f5b7ea06..c90135eea6 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h @@ -49,7 +49,15 @@ class GFXConfigDialogOGL : public wxDialog { public: 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"), +#else + const wxString &title = wxT("OpenGL (DEBUG) Plugin Configuration"), +#endif +#endif const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE);