From 765d1823fb61220b58462724eb744f4ff85410c6 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sun, 31 Oct 2010 15:32:04 +0000 Subject: [PATCH] Only enable shader dumping in Debug/DebugFast builds since the required information isn't available in Release builds due to performance reasons. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6323 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoDX9/Src/Debugger/Debugger.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/Debugger/Debugger.cpp b/Source/Plugins/Plugin_VideoDX9/Src/Debugger/Debugger.cpp index acedcb23bc..2673977191 100644 --- a/Source/Plugins/Plugin_VideoDX9/Src/Debugger/Debugger.cpp +++ b/Source/Plugins/Plugin_VideoDX9/Src/Debugger/Debugger.cpp @@ -317,19 +317,27 @@ void GFXDebuggerDX9::OnDumpButton(wxCommandEvent& event) { case 0: // Pixel Shader { +#if defined(_DEBUG) || defined(DEBUGFAST) char filename[MAX_PATH]; sprintf(filename, "%s/Debug/%s/dump_ps.txt", File::GetUserPath(D_DUMP_IDX), globals->unique_id); File::CreateEmptyFile(filename); File::WriteStringToFile(true, PixelShaderCache::GetCurrentShaderCode(), filename); +#else + MessageBox(NULL, L"Dumping pixel shaders not supported in Release builds!", L"Error", MB_OK); +#endif break; } case 1: // Vertex Shader { +#if defined(_DEBUG) || defined(DEBUGFAST) char filename[MAX_PATH]; sprintf(filename, "%s/Debug/%s/dump_vs.txt", File::GetUserPath(D_DUMP_IDX), globals->unique_id); File::CreateEmptyFile(filename); File::WriteStringToFile(true, VertexShaderCache::GetCurrentShaderCode(), filename); +#else + MessageBox(NULL, L"Dumping vertex shaders not supported in Release builds!", L"Error", MB_OK); +#endif break; }