From 34692ab826abc8f8faa61bdb2280b742424528f1 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 7 Dec 2013 15:14:29 -0500 Subject: Remove unnecessary Src/ folders --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 346 +++++++++++++++++++++++ 1 file changed, 346 insertions(+) create mode 100644 Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp new file mode 100644 index 0000000000..3eb7d3515b --- /dev/null +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -0,0 +1,346 @@ +// Copyright 2013 Dolphin Emulator Project +// Licensed under GPLv2 +// Refer to the license.txt file included. + +#include "IniFile.h" +#include "DebuggerPanel.h" +#include "FileUtil.h" +#include "../../Core/ConfigManager.h" + +#include "VideoConfig.h" +#include "TextureCacheBase.h" +#include "PixelShaderGen.h" +#include "VertexShaderGen.h" +#include "NativeVertexFormat.h" + +BEGIN_EVENT_TABLE(GFXDebuggerPanel, wxPanel) + EVT_CLOSE(GFXDebuggerPanel::OnClose) + EVT_BUTTON(ID_PAUSE,GFXDebuggerPanel::OnPauseButton) + EVT_BUTTON(ID_PAUSE_AT_NEXT,GFXDebuggerPanel::OnPauseAtNextButton) + EVT_BUTTON(ID_PAUSE_AT_NEXT_FRAME,GFXDebuggerPanel::OnPauseAtNextFrameButton) + EVT_BUTTON(ID_CONT,GFXDebuggerPanel::OnContButton) + EVT_BUTTON(ID_DUMP,GFXDebuggerPanel::OnDumpButton) + EVT_BUTTON(ID_UPDATE_SCREEN,GFXDebuggerPanel::OnUpdateScreenButton) + EVT_BUTTON(ID_CLEAR_SCREEN,GFXDebuggerPanel::OnClearScreenButton) + EVT_BUTTON(ID_CLEAR_TEXTURE_CACHE,GFXDebuggerPanel::OnClearTextureCacheButton) + EVT_BUTTON(ID_CLEAR_VERTEX_SHADER_CACHE,GFXDebuggerPanel::OnClearVertexShaderCacheButton) + EVT_BUTTON(ID_CLEAR_PIXEL_SHADER_CACHE,GFXDebuggerPanel::OnClearPixelShaderCacheButton) +END_EVENT_TABLE() + +// From VideoCommon +extern GFXDebuggerBase *g_pdebugger; +extern volatile bool GFXDebuggerPauseFlag; +extern volatile PauseEvent GFXDebuggerToPauseAtNext; +extern volatile int GFXDebuggerEventToPauseCount; + +GFXDebuggerPanel::GFXDebuggerPanel(wxWindow *parent, wxWindowID id, const wxPoint &position, + const wxSize& size, long style, const wxString &title) + : wxPanel(parent, id, position, size, style, title) +{ + g_pdebugger = this; + + CreateGUIControls(); + + LoadSettings(); +} + +GFXDebuggerPanel::~GFXDebuggerPanel() +{ + g_pdebugger = NULL; + GFXDebuggerPauseFlag = false; +} + +void GFXDebuggerPanel::OnClose(wxCloseEvent& event) +{ + // save the window position when we hide the window + SaveSettings(); + + event.Skip(); +} + +void GFXDebuggerPanel::SaveSettings() const +{ + IniFile file; + file.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX)); + + // TODO: make this work when we close the entire program too, currently on total close we get + // weird values, perhaps because of some conflict with the rendering window + + // TODO: get the screen resolution and make limits from that + if (GetPosition().x < 1000 && GetPosition().y < 1000 + && GetSize().GetWidth() < 1000 + && GetSize().GetHeight() < 1000) + { + file.Set("VideoWindow", "x", GetPosition().x); + file.Set("VideoWindow", "y", GetPosition().y); + file.Set("VideoWindow", "w", GetSize().GetWidth()); + file.Set("VideoWindow", "h", GetSize().GetHeight()); + } + + file.Save(File::GetUserPath(F_DEBUGGERCONFIG_IDX)); +} + +void GFXDebuggerPanel::LoadSettings() +{ + IniFile file; + file.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX)); + + int x = 100, y = 100, w = 100, h = 100; + file.Get("VideoWindow", "x", &x, GetPosition().x); + file.Get("VideoWindow", "y", &y, GetPosition().y); + file.Get("VideoWindow", "w", &w, GetSize().GetWidth()); + file.Get("VideoWindow", "h", &h, GetSize().GetHeight()); + SetSize(x, y, w, h); +} + +struct PauseEventMap +{ + PauseEvent event; + const wxString ListStr; +}; + +static PauseEventMap* pauseEventMap; + +void GFXDebuggerPanel::CreateGUIControls() +{ + static PauseEventMap map[] = { + {NEXT_FRAME, _("Frame")}, + {NEXT_FLUSH, _("Flush")}, + + {NEXT_PIXEL_SHADER_CHANGE, _("Pixel Shader")}, + {NEXT_VERTEX_SHADER_CHANGE, _("Vertex Shader")}, + {NEXT_TEXTURE_CHANGE, _("Texture")}, + {NEXT_NEW_TEXTURE, _("New Texture")}, + + {NEXT_XFB_CMD, _("XFB Cmd")}, + {NEXT_EFB_CMD, _("EFB Cmd")}, + + {NEXT_MATRIX_CMD, _("Matrix Cmd")}, + {NEXT_VERTEX_CMD, _("Vertex Cmd")}, + {NEXT_TEXTURE_CMD, _("Texture Cmd")}, + {NEXT_LIGHT_CMD, _("Light Cmd")}, + {NEXT_FOG_CMD, _("Fog Cmd")}, + + {NEXT_SET_TLUT, _("TLUT Cmd")}, + + {NEXT_ERROR, _("Error")} + }; + pauseEventMap = map; + const int numPauseEventMap = sizeof(map)/sizeof(PauseEventMap); + + // Basic settings + CenterOnParent(); + + m_pButtonPause = new wxButton(this, ID_PAUSE, _("Pause"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Pause")); + m_pButtonPauseAtNext = new wxButton(this, ID_PAUSE_AT_NEXT, _("Pause After"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Pause At Next")); + m_pButtonPauseAtNextFrame = new wxButton(this, ID_PAUSE_AT_NEXT_FRAME, _("Go to Next Frame"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Next Frame")); + m_pButtonCont = new wxButton(this, ID_CONT, _("Continue"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Continue")); + + m_pCount = new wxTextCtrl(this, ID_COUNT, wxT("1"), wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count")); + + m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, NULL,0,wxDefaultValidator, _("PauseAtList")); + for (int i=0; iAppend(pauseEventMap[i].ListStr); + } + m_pPauseAtList->SetSelection(0); + + m_pButtonDump = new wxButton(this, ID_DUMP, _("Dump"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Dump")); + m_pButtonUpdateScreen = new wxButton(this, ID_UPDATE_SCREEN, _("Update Screen"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Update Screen")); + m_pButtonClearScreen = new wxButton(this, ID_CLEAR_SCREEN, _("Clear Screen"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear Screen")); + m_pButtonClearTextureCache = new wxButton(this, ID_CLEAR_TEXTURE_CACHE, _("Clear Textures"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear Textures")); + m_pButtonClearVertexShaderCache = new wxButton(this, ID_CLEAR_VERTEX_SHADER_CACHE, _("Clear V Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear V Shaders")); + m_pButtonClearPixelShaderCache = new wxButton(this, ID_CLEAR_PIXEL_SHADER_CACHE, _("Clear P Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear P Shaders")); + + m_pDumpList = new wxChoice(this, ID_DUMP_LIST, wxDefaultPosition, wxSize(120,25), 0, NULL, 0 ,wxDefaultValidator, _("DumpList")); + m_pDumpList->Insert(_("Pixel Shader"),0); + m_pDumpList->Append(_("Vertex Shader")); + m_pDumpList->Append(_("Pixel Shader Constants")); + m_pDumpList->Append(_("Vertex Shader Constants")); + m_pDumpList->Append(_("Textures")); + m_pDumpList->Append(_("Frame Buffer")); + m_pDumpList->Append(_("Geometry data")); + m_pDumpList->Append(_("Vertex Description")); + m_pDumpList->Append(_("Vertex Matrices")); + m_pDumpList->Append(_("Statistics")); + m_pDumpList->SetSelection(0); + + // Layout everything on m_MainPanel + wxBoxSizer *sMain = new wxBoxSizer(wxVERTICAL); + + wxStaticBoxSizer* const pFlowCtrlBox = new wxStaticBoxSizer(wxVERTICAL, this, _("Flow Control")); + wxBoxSizer* const pPauseAtNextSzr = new wxBoxSizer(wxHORIZONTAL); + pFlowCtrlBox->Add(m_pButtonPause); + pPauseAtNextSzr->Add(m_pButtonPauseAtNext); + pPauseAtNextSzr->Add(m_pCount); + pPauseAtNextSzr->Add(m_pPauseAtList); + pFlowCtrlBox->Add(pPauseAtNextSzr); + pFlowCtrlBox->Add(m_pButtonPauseAtNextFrame); + pFlowCtrlBox->Add(m_pButtonCont); + + wxStaticBoxSizer* const pDebugBox = new wxStaticBoxSizer(wxVERTICAL, this, _("Debugging")); + wxBoxSizer* const pDumpSzr = new wxBoxSizer(wxHORIZONTAL); + pDumpSzr->Add(m_pButtonDump); + pDumpSzr->Add(m_pDumpList); + pDebugBox->Add(pDumpSzr); + wxGridSizer* const pDbgGrid = new wxGridSizer(2, 5, 5); + pDbgGrid->Add(m_pButtonUpdateScreen); + pDbgGrid->Add(m_pButtonClearScreen); + pDbgGrid->Add(m_pButtonClearTextureCache); + pDbgGrid->Add(m_pButtonClearVertexShaderCache); + pDbgGrid->Add(m_pButtonClearPixelShaderCache); + pDebugBox->Add(pDbgGrid); + + sMain->Add(pFlowCtrlBox, 0, 0, 5); + sMain->Add(pDebugBox, 0, 0, 5); + SetSizerAndFit(sMain); + + OnContinue(); +} + +void GFXDebuggerPanel::OnPause() +{ + m_pButtonDump->Enable(true); + m_pDumpList->Enable(true); + m_pButtonUpdateScreen->Enable(true); + m_pButtonClearScreen->Enable(true); + m_pButtonClearTextureCache->Enable(true); + m_pButtonClearVertexShaderCache->Enable(true); + m_pButtonClearPixelShaderCache->Enable(true); +} + +void GFXDebuggerPanel::OnContinue() +{ + m_pButtonDump->Enable(false); + m_pDumpList->Enable(false); + m_pButtonUpdateScreen->Enable(false); + m_pButtonClearScreen->Enable(false); + m_pButtonClearTextureCache->Enable(false); + m_pButtonClearVertexShaderCache->Enable(false); + m_pButtonClearPixelShaderCache->Enable(false); +} + + +// General settings +void GFXDebuggerPanel::GeneralSettings(wxCommandEvent& event) +{ + SaveSettings(); +} + +void GFXDebuggerPanel::OnPauseButton(wxCommandEvent& event) +{ + GFXDebuggerPauseFlag = true; +} + +void GFXDebuggerPanel::OnPauseAtNextButton(wxCommandEvent& event) +{ + GFXDebuggerPauseFlag = false; + GFXDebuggerToPauseAtNext = pauseEventMap[m_pPauseAtList->GetSelection()].event; + wxString val = m_pCount->GetValue(); + long value; + if (val.ToLong(&value)) + GFXDebuggerEventToPauseCount = value; + else + GFXDebuggerEventToPauseCount = 1; +} + +void GFXDebuggerPanel::OnPauseAtNextFrameButton(wxCommandEvent& event) +{ + GFXDebuggerPauseFlag = false; + GFXDebuggerToPauseAtNext = NEXT_FRAME; + GFXDebuggerEventToPauseCount = 1; +} + +void GFXDebuggerPanel::OnDumpButton(wxCommandEvent& event) +{ + std::string dump_path = File::GetUserPath(D_DUMP_IDX) + "Debug/" + + SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID + "/"; + if (!File::CreateFullPath(dump_path)) + return; + + switch (m_pDumpList->GetSelection()) + { + case 0: // Pixel Shader + DumpPixelShader(dump_path.c_str()); + break; + + case 1: // Vertex Shader + DumpVertexShader(dump_path.c_str()); + break; + + case 2: // Pixel Shader Constants + DumpPixelShaderConstants(dump_path.c_str()); + wxMessageBox(_("Not implemented"), _("Error"), wxOK); + break; + + case 3: // Vertex Shader Constants + DumpVertexShaderConstants(dump_path.c_str()); + wxMessageBox(_("Not implemented"), _("Error"), wxOK); + break; + + case 4: // Textures + DumpTextures(dump_path.c_str()); + wxMessageBox(_("Not implemented"), _("Error"), wxOK); + break; + + case 5: // Frame Buffer + DumpFrameBuffer(dump_path.c_str()); + wxMessageBox(_("Not implemented"), _("Error"), wxOK); + break; + + case 6: // Geometry + DumpGeometry(dump_path.c_str()); + wxMessageBox(_("Not implemented"), _("Error"), wxOK); + break; + + case 7: // Vertex Description + DumpVertexDecl(dump_path.c_str()); + wxMessageBox(_("Not implemented"), _("Error"), wxOK); + break; + + case 8: // Vertex Matrices + DumpMatrices(dump_path.c_str()); + wxMessageBox(_("Not implemented"), _("Error"), wxOK); + break; + + case 9: // Statistics + DumpStats(dump_path.c_str()); + wxMessageBox(_("Not implemented"), _("Error"), wxOK); + break; + } +} + +void GFXDebuggerPanel::OnContButton(wxCommandEvent& event) +{ + GFXDebuggerToPauseAtNext = NOT_PAUSE; + GFXDebuggerPauseFlag = false; +} + +void GFXDebuggerPanel::OnClearScreenButton(wxCommandEvent& event) +{ + // TODO + wxMessageBox(_("Not implemented"), _("Error"), wxOK); +} + +void GFXDebuggerPanel::OnClearTextureCacheButton(wxCommandEvent& event) +{ + TextureCache::Invalidate(); +} + +void GFXDebuggerPanel::OnClearVertexShaderCacheButton(wxCommandEvent& event) +{ + // TODO + wxMessageBox(_("Not implemented"), _("Error"), wxOK); +} + +void GFXDebuggerPanel::OnClearPixelShaderCacheButton(wxCommandEvent& event) +{ + // TODO + wxMessageBox(_("Not implemented"), _("Error"), wxOK); +} + +void GFXDebuggerPanel::OnUpdateScreenButton(wxCommandEvent& event) +{ + wxMessageBox(_("Not implemented"), _("Error"), wxOK); + GFXDebuggerUpdateScreen(); +} -- cgit v1.2.3 From 3fd87a7636ff434118a5d7f7334550be8db55c0b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 16 Feb 2014 23:51:41 -0500 Subject: Second and final pass of clearing out tabs. --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 30 ++++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index 3eb7d3515b..d37ca2e6d1 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -104,26 +104,26 @@ static PauseEventMap* pauseEventMap; void GFXDebuggerPanel::CreateGUIControls() { static PauseEventMap map[] = { - {NEXT_FRAME, _("Frame")}, - {NEXT_FLUSH, _("Flush")}, + {NEXT_FRAME, _("Frame")}, + {NEXT_FLUSH, _("Flush")}, - {NEXT_PIXEL_SHADER_CHANGE, _("Pixel Shader")}, - {NEXT_VERTEX_SHADER_CHANGE, _("Vertex Shader")}, - {NEXT_TEXTURE_CHANGE, _("Texture")}, - {NEXT_NEW_TEXTURE, _("New Texture")}, + {NEXT_PIXEL_SHADER_CHANGE, _("Pixel Shader")}, + {NEXT_VERTEX_SHADER_CHANGE, _("Vertex Shader")}, + {NEXT_TEXTURE_CHANGE, _("Texture")}, + {NEXT_NEW_TEXTURE, _("New Texture")}, - {NEXT_XFB_CMD, _("XFB Cmd")}, - {NEXT_EFB_CMD, _("EFB Cmd")}, + {NEXT_XFB_CMD, _("XFB Cmd")}, + {NEXT_EFB_CMD, _("EFB Cmd")}, - {NEXT_MATRIX_CMD, _("Matrix Cmd")}, - {NEXT_VERTEX_CMD, _("Vertex Cmd")}, - {NEXT_TEXTURE_CMD, _("Texture Cmd")}, - {NEXT_LIGHT_CMD, _("Light Cmd")}, - {NEXT_FOG_CMD, _("Fog Cmd")}, + {NEXT_MATRIX_CMD, _("Matrix Cmd")}, + {NEXT_VERTEX_CMD, _("Vertex Cmd")}, + {NEXT_TEXTURE_CMD, _("Texture Cmd")}, + {NEXT_LIGHT_CMD, _("Light Cmd")}, + {NEXT_FOG_CMD, _("Fog Cmd")}, - {NEXT_SET_TLUT, _("TLUT Cmd")}, + {NEXT_SET_TLUT, _("TLUT Cmd")}, - {NEXT_ERROR, _("Error")} + {NEXT_ERROR, _("Error")} }; pauseEventMap = map; const int numPauseEventMap = sizeof(map)/sizeof(PauseEventMap); -- cgit v1.2.3 From 2afe2152712981e21d6bda6f029292ed2b1cf91e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 17 Feb 2014 05:18:15 -0500 Subject: Convert all includes to relative paths. --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index d37ca2e6d1..bc28c6ccfb 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -2,16 +2,15 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -#include "IniFile.h" -#include "DebuggerPanel.h" -#include "FileUtil.h" -#include "../../Core/ConfigManager.h" - -#include "VideoConfig.h" -#include "TextureCacheBase.h" -#include "PixelShaderGen.h" -#include "VertexShaderGen.h" -#include "NativeVertexFormat.h" +#include "Common/FileUtil.h" +#include "Common/IniFile.h" +#include "Core/ConfigManager.h" +#include "DolphinWX/Debugger/DebuggerPanel.h" +#include "VideoCommon/NativeVertexFormat.h" +#include "VideoCommon/PixelShaderGen.h" +#include "VideoCommon/TextureCacheBase.h" +#include "VideoCommon/VertexShaderGen.h" +#include "VideoCommon/VideoConfig.h" BEGIN_EVENT_TABLE(GFXDebuggerPanel, wxPanel) EVT_CLOSE(GFXDebuggerPanel::OnClose) -- cgit v1.2.3 From f344a43657f609343fec125f374e014692e4ca6a Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Sat, 22 Feb 2014 23:36:30 +0100 Subject: Make DolphinWX/ mostly IWYU clean. --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 25 ++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index bc28c6ccfb..16944ba968 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -2,15 +2,32 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "Common/FileUtil.h" #include "Common/IniFile.h" #include "Core/ConfigManager.h" +#include "Core/CoreParameter.h" #include "DolphinWX/Debugger/DebuggerPanel.h" -#include "VideoCommon/NativeVertexFormat.h" -#include "VideoCommon/PixelShaderGen.h" +#include "VideoCommon/Debugger.h" #include "VideoCommon/TextureCacheBase.h" -#include "VideoCommon/VertexShaderGen.h" -#include "VideoCommon/VideoConfig.h" + +class wxWindow; BEGIN_EVENT_TABLE(GFXDebuggerPanel, wxPanel) EVT_CLOSE(GFXDebuggerPanel::OnClose) -- cgit v1.2.3 From d802d392811be44d34ae9cd23f616db93e54c50f Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 9 Mar 2014 21:14:26 +0100 Subject: clang-modernize -use-nullptr and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index 16944ba968..2b16e4baf3 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -62,7 +62,7 @@ GFXDebuggerPanel::GFXDebuggerPanel(wxWindow *parent, wxWindowID id, const wxPoin GFXDebuggerPanel::~GFXDebuggerPanel() { - g_pdebugger = NULL; + g_pdebugger = nullptr; GFXDebuggerPauseFlag = false; } @@ -154,7 +154,7 @@ void GFXDebuggerPanel::CreateGUIControls() m_pCount = new wxTextCtrl(this, ID_COUNT, wxT("1"), wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count")); - m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, NULL,0,wxDefaultValidator, _("PauseAtList")); + m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, nullptr,0,wxDefaultValidator, _("PauseAtList")); for (int i=0; iAppend(pauseEventMap[i].ListStr); @@ -168,7 +168,7 @@ void GFXDebuggerPanel::CreateGUIControls() m_pButtonClearVertexShaderCache = new wxButton(this, ID_CLEAR_VERTEX_SHADER_CACHE, _("Clear V Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear V Shaders")); m_pButtonClearPixelShaderCache = new wxButton(this, ID_CLEAR_PIXEL_SHADER_CACHE, _("Clear P Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear P Shaders")); - m_pDumpList = new wxChoice(this, ID_DUMP_LIST, wxDefaultPosition, wxSize(120,25), 0, NULL, 0 ,wxDefaultValidator, _("DumpList")); + m_pDumpList = new wxChoice(this, ID_DUMP_LIST, wxDefaultPosition, wxSize(120,25), 0, nullptr, 0 ,wxDefaultValidator, _("DumpList")); m_pDumpList->Insert(_("Pixel Shader"),0); m_pDumpList->Append(_("Vertex Shader")); m_pDumpList->Append(_("Pixel Shader Constants")); -- cgit v1.2.3 From 31cfc73a09a8685cbab20502b4bc132e98e2feb5 Mon Sep 17 00:00:00 2001 From: Matthew Parlane Date: Tue, 11 Mar 2014 00:30:55 +1300 Subject: Fixes spacing for "for", "while", "switch" and "if" Also moved && and || to ends of lines instead of start. Fixed misc vertical alignments and some { needed newlining. --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index 2b16e4baf3..333438773d 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -83,9 +83,10 @@ void GFXDebuggerPanel::SaveSettings() const // weird values, perhaps because of some conflict with the rendering window // TODO: get the screen resolution and make limits from that - if (GetPosition().x < 1000 && GetPosition().y < 1000 - && GetSize().GetWidth() < 1000 - && GetSize().GetHeight() < 1000) + if (GetPosition().x < 1000 && + GetPosition().y < 1000 && + GetSize().GetWidth() < 1000 && + GetSize().GetHeight() < 1000) { file.Set("VideoWindow", "x", GetPosition().x); file.Set("VideoWindow", "y", GetPosition().y); -- cgit v1.2.3 From a82675b7d581421fa80d5d5c53253cf1d5c1a26d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 12 Mar 2014 15:33:41 -0400 Subject: Kill off some usages of c_str. Also changes some function params, but this is ok. Some simplifications were also able to be made (ie. killing off strcmps with ==, etc). --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index 333438773d..4ab8b93026 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -278,50 +278,50 @@ void GFXDebuggerPanel::OnDumpButton(wxCommandEvent& event) switch (m_pDumpList->GetSelection()) { case 0: // Pixel Shader - DumpPixelShader(dump_path.c_str()); + DumpPixelShader(dump_path); break; case 1: // Vertex Shader - DumpVertexShader(dump_path.c_str()); + DumpVertexShader(dump_path); break; case 2: // Pixel Shader Constants - DumpPixelShaderConstants(dump_path.c_str()); + DumpPixelShaderConstants(dump_path); wxMessageBox(_("Not implemented"), _("Error"), wxOK); break; case 3: // Vertex Shader Constants - DumpVertexShaderConstants(dump_path.c_str()); + DumpVertexShaderConstants(dump_path); wxMessageBox(_("Not implemented"), _("Error"), wxOK); break; case 4: // Textures - DumpTextures(dump_path.c_str()); + DumpTextures(dump_path); wxMessageBox(_("Not implemented"), _("Error"), wxOK); break; case 5: // Frame Buffer - DumpFrameBuffer(dump_path.c_str()); + DumpFrameBuffer(dump_path); wxMessageBox(_("Not implemented"), _("Error"), wxOK); break; case 6: // Geometry - DumpGeometry(dump_path.c_str()); + DumpGeometry(dump_path); wxMessageBox(_("Not implemented"), _("Error"), wxOK); break; case 7: // Vertex Description - DumpVertexDecl(dump_path.c_str()); + DumpVertexDecl(dump_path); wxMessageBox(_("Not implemented"), _("Error"), wxOK); break; case 8: // Vertex Matrices - DumpMatrices(dump_path.c_str()); + DumpMatrices(dump_path); wxMessageBox(_("Not implemented"), _("Error"), wxOK); break; case 9: // Statistics - DumpStats(dump_path.c_str()); + DumpStats(dump_path); wxMessageBox(_("Not implemented"), _("Error"), wxOK); break; } -- cgit v1.2.3 From e1359382be30bb8f61a779846c9ebc1fa72791d0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 17 May 2014 13:17:28 -0400 Subject: Kill off _T and wxT macros Minor other alterations that relate to above as well. Also added the PanicAlertT version of alerts for some error messages that use PanicAlert. We want the user to actually understand why the error occurred. --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index 4ab8b93026..682a6733a1 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -153,7 +153,7 @@ void GFXDebuggerPanel::CreateGUIControls() m_pButtonPauseAtNextFrame = new wxButton(this, ID_PAUSE_AT_NEXT_FRAME, _("Go to Next Frame"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Next Frame")); m_pButtonCont = new wxButton(this, ID_CONT, _("Continue"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Continue")); - m_pCount = new wxTextCtrl(this, ID_COUNT, wxT("1"), wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count")); + m_pCount = new wxTextCtrl(this, ID_COUNT, "1", wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count")); m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, nullptr,0,wxDefaultValidator, _("PauseAtList")); for (int i=0; i Date: Mon, 16 Jun 2014 01:12:43 -0400 Subject: Use only section-based ini reading. --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 25 +++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index 682a6733a1..fa09024ef3 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -88,10 +88,11 @@ void GFXDebuggerPanel::SaveSettings() const GetSize().GetWidth() < 1000 && GetSize().GetHeight() < 1000) { - file.Set("VideoWindow", "x", GetPosition().x); - file.Set("VideoWindow", "y", GetPosition().y); - file.Set("VideoWindow", "w", GetSize().GetWidth()); - file.Set("VideoWindow", "h", GetSize().GetHeight()); + IniFile::Section* video_window = file.GetOrCreateSection("VideoWindow"); + video_window->Set("x", GetPosition().x); + video_window->Set("y", GetPosition().y); + video_window->Set("w", GetSize().GetWidth()); + video_window->Set("h", GetSize().GetHeight()); } file.Save(File::GetUserPath(F_DEBUGGERCONFIG_IDX)); @@ -102,11 +103,17 @@ void GFXDebuggerPanel::LoadSettings() IniFile file; file.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX)); - int x = 100, y = 100, w = 100, h = 100; - file.Get("VideoWindow", "x", &x, GetPosition().x); - file.Get("VideoWindow", "y", &y, GetPosition().y); - file.Get("VideoWindow", "w", &w, GetSize().GetWidth()); - file.Get("VideoWindow", "h", &h, GetSize().GetHeight()); + int x = 100; + int y = 100; + int w = 100; + int h = 100; + + IniFile::Section* video_window = file.GetOrCreateSection("VideoWindow"); + video_window->Get("x", &x, GetPosition().x); + video_window->Get("y", &y, GetPosition().y); + video_window->Get("w", &w, GetSize().GetWidth()); + video_window->Get("h", &h, GetSize().GetHeight()); + SetSize(x, y, w, h); } -- cgit v1.2.3 From 81ed17be53e7fed93147dc0d334a6c1d45f4e3c8 Mon Sep 17 00:00:00 2001 From: degasus Date: Tue, 8 Jul 2014 16:49:33 +0200 Subject: avoid the extern keyword in .cpp files --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index fa09024ef3..edee4fac64 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -43,12 +43,6 @@ BEGIN_EVENT_TABLE(GFXDebuggerPanel, wxPanel) EVT_BUTTON(ID_CLEAR_PIXEL_SHADER_CACHE,GFXDebuggerPanel::OnClearPixelShaderCacheButton) END_EVENT_TABLE() -// From VideoCommon -extern GFXDebuggerBase *g_pdebugger; -extern volatile bool GFXDebuggerPauseFlag; -extern volatile PauseEvent GFXDebuggerToPauseAtNext; -extern volatile int GFXDebuggerEventToPauseCount; - GFXDebuggerPanel::GFXDebuggerPanel(wxWindow *parent, wxWindowID id, const wxPoint &position, const wxSize& size, long style, const wxString &title) : wxPanel(parent, id, position, size, style, title) -- cgit v1.2.3 From 0ed29e1fac94db18451a233e252976b4201bae24 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 24 Jul 2014 21:46:46 -0400 Subject: DolphinWX: Use a regular wxMessageBox instead of a PanicAlert for non-panic errors. --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 25 ++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index edee4fac64..fe706d0fd5 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -23,6 +23,7 @@ #include "Common/IniFile.h" #include "Core/ConfigManager.h" #include "Core/CoreParameter.h" +#include "DolphinWX/WxUtils.h" #include "DolphinWX/Debugger/DebuggerPanel.h" #include "VideoCommon/Debugger.h" #include "VideoCommon/TextureCacheBase.h" @@ -288,42 +289,42 @@ void GFXDebuggerPanel::OnDumpButton(wxCommandEvent& event) case 2: // Pixel Shader Constants DumpPixelShaderConstants(dump_path); - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); break; case 3: // Vertex Shader Constants DumpVertexShaderConstants(dump_path); - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); break; case 4: // Textures DumpTextures(dump_path); - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); break; case 5: // Frame Buffer DumpFrameBuffer(dump_path); - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); break; case 6: // Geometry DumpGeometry(dump_path); - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); break; case 7: // Vertex Description DumpVertexDecl(dump_path); - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); break; case 8: // Vertex Matrices DumpMatrices(dump_path); - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); break; case 9: // Statistics DumpStats(dump_path); - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); break; } } @@ -337,7 +338,7 @@ void GFXDebuggerPanel::OnContButton(wxCommandEvent& event) void GFXDebuggerPanel::OnClearScreenButton(wxCommandEvent& event) { // TODO - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); } void GFXDebuggerPanel::OnClearTextureCacheButton(wxCommandEvent& event) @@ -348,17 +349,17 @@ void GFXDebuggerPanel::OnClearTextureCacheButton(wxCommandEvent& event) void GFXDebuggerPanel::OnClearVertexShaderCacheButton(wxCommandEvent& event) { // TODO - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); } void GFXDebuggerPanel::OnClearPixelShaderCacheButton(wxCommandEvent& event) { // TODO - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); } void GFXDebuggerPanel::OnUpdateScreenButton(wxCommandEvent& event) { - wxMessageBox(_("Not implemented"), _("Error"), wxOK); + WxUtils::ShowErrorDialog(_("Not implemented")); GFXDebuggerUpdateScreen(); } -- cgit v1.2.3 From 210567a9194af6f218bedd46290975a2ad3df2f9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 7 Nov 2014 22:16:13 -0500 Subject: DolphinWX: Remove unnecessary forward declarations --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index fe706d0fd5..b2dee34b7f 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -28,8 +28,6 @@ #include "VideoCommon/Debugger.h" #include "VideoCommon/TextureCacheBase.h" -class wxWindow; - BEGIN_EVENT_TABLE(GFXDebuggerPanel, wxPanel) EVT_CLOSE(GFXDebuggerPanel::OnClose) EVT_BUTTON(ID_PAUSE,GFXDebuggerPanel::OnPauseButton) -- cgit v1.2.3 From ac387031a4b62baa96935c422c16e54dd0284a1b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 8 Nov 2014 19:26:20 -0500 Subject: DolphinWX: Kill off trivial event tables Also fixes some of the wonky stuff in Main where we would fire an event to do post-init stuff which isn't necessary anymore. --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 60 +++++++++++++----------- 1 file changed, 33 insertions(+), 27 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index b2dee34b7f..bf0744c7ff 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -28,20 +28,6 @@ #include "VideoCommon/Debugger.h" #include "VideoCommon/TextureCacheBase.h" -BEGIN_EVENT_TABLE(GFXDebuggerPanel, wxPanel) - EVT_CLOSE(GFXDebuggerPanel::OnClose) - EVT_BUTTON(ID_PAUSE,GFXDebuggerPanel::OnPauseButton) - EVT_BUTTON(ID_PAUSE_AT_NEXT,GFXDebuggerPanel::OnPauseAtNextButton) - EVT_BUTTON(ID_PAUSE_AT_NEXT_FRAME,GFXDebuggerPanel::OnPauseAtNextFrameButton) - EVT_BUTTON(ID_CONT,GFXDebuggerPanel::OnContButton) - EVT_BUTTON(ID_DUMP,GFXDebuggerPanel::OnDumpButton) - EVT_BUTTON(ID_UPDATE_SCREEN,GFXDebuggerPanel::OnUpdateScreenButton) - EVT_BUTTON(ID_CLEAR_SCREEN,GFXDebuggerPanel::OnClearScreenButton) - EVT_BUTTON(ID_CLEAR_TEXTURE_CACHE,GFXDebuggerPanel::OnClearTextureCacheButton) - EVT_BUTTON(ID_CLEAR_VERTEX_SHADER_CACHE,GFXDebuggerPanel::OnClearVertexShaderCacheButton) - EVT_BUTTON(ID_CLEAR_PIXEL_SHADER_CACHE,GFXDebuggerPanel::OnClearPixelShaderCacheButton) -END_EVENT_TABLE() - GFXDebuggerPanel::GFXDebuggerPanel(wxWindow *parent, wxWindowID id, const wxPoint &position, const wxSize& size, long style, const wxString &title) : wxPanel(parent, id, position, size, style, title) @@ -50,6 +36,8 @@ GFXDebuggerPanel::GFXDebuggerPanel(wxWindow *parent, wxWindowID id, const wxPoin CreateGUIControls(); + Bind(wxEVT_CLOSE_WINDOW, &GFXDebuggerPanel::OnClose, this); + LoadSettings(); } @@ -148,28 +136,46 @@ void GFXDebuggerPanel::CreateGUIControls() // Basic settings CenterOnParent(); - m_pButtonPause = new wxButton(this, ID_PAUSE, _("Pause"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Pause")); - m_pButtonPauseAtNext = new wxButton(this, ID_PAUSE_AT_NEXT, _("Pause After"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Pause At Next")); - m_pButtonPauseAtNextFrame = new wxButton(this, ID_PAUSE_AT_NEXT_FRAME, _("Go to Next Frame"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Next Frame")); - m_pButtonCont = new wxButton(this, ID_CONT, _("Continue"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Continue")); + m_pButtonPause = new wxButton(this, wxID_ANY, _("Pause"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Pause")); + m_pButtonPause->Bind(wxEVT_BUTTON, &GFXDebuggerPanel::OnPauseButton, this); + + m_pButtonPauseAtNext = new wxButton(this, wxID_ANY, _("Pause After"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Pause At Next")); + m_pButtonPauseAtNext->Bind(wxEVT_BUTTON, &GFXDebuggerPanel::OnPauseAtNextButton, this); + + m_pButtonPauseAtNextFrame = new wxButton(this, wxID_ANY, _("Go to Next Frame"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Next Frame")); + m_pButtonPauseAtNextFrame->Bind(wxEVT_BUTTON, &GFXDebuggerPanel::OnPauseAtNextFrameButton, this); + + m_pButtonCont = new wxButton(this, wxID_ANY, _("Continue"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Continue")); + m_pButtonCont->Bind(wxEVT_BUTTON, &GFXDebuggerPanel::OnContButton, this); - m_pCount = new wxTextCtrl(this, ID_COUNT, "1", wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count")); + m_pCount = new wxTextCtrl(this, wxID_ANY, "1", wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count")); - m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, nullptr,0,wxDefaultValidator, _("PauseAtList")); + m_pPauseAtList = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(100,25), 0, nullptr,0,wxDefaultValidator, _("PauseAtList")); for (int i=0; iAppend(pauseEventMap[i].ListStr); } m_pPauseAtList->SetSelection(0); - m_pButtonDump = new wxButton(this, ID_DUMP, _("Dump"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Dump")); - m_pButtonUpdateScreen = new wxButton(this, ID_UPDATE_SCREEN, _("Update Screen"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Update Screen")); - m_pButtonClearScreen = new wxButton(this, ID_CLEAR_SCREEN, _("Clear Screen"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear Screen")); - m_pButtonClearTextureCache = new wxButton(this, ID_CLEAR_TEXTURE_CACHE, _("Clear Textures"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear Textures")); - m_pButtonClearVertexShaderCache = new wxButton(this, ID_CLEAR_VERTEX_SHADER_CACHE, _("Clear V Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear V Shaders")); - m_pButtonClearPixelShaderCache = new wxButton(this, ID_CLEAR_PIXEL_SHADER_CACHE, _("Clear P Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear P Shaders")); + m_pButtonDump = new wxButton(this, wxID_ANY, _("Dump"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Dump")); + m_pButtonDump->Bind(wxEVT_BUTTON, &GFXDebuggerPanel::OnDumpButton, this); + + m_pButtonUpdateScreen = new wxButton(this, wxID_ANY, _("Update Screen"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Update Screen")); + m_pButtonUpdateScreen->Bind(wxEVT_BUTTON, &GFXDebuggerPanel::OnUpdateScreenButton, this); + + m_pButtonClearScreen = new wxButton(this, wxID_ANY, _("Clear Screen"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear Screen")); + m_pButtonClearScreen->Bind(wxEVT_BUTTON, &GFXDebuggerPanel::OnClearScreenButton, this); + + m_pButtonClearTextureCache = new wxButton(this, wxID_ANY, _("Clear Textures"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear Textures")); + m_pButtonClearTextureCache->Bind(wxEVT_BUTTON, &GFXDebuggerPanel::OnClearTextureCacheButton, this); + + m_pButtonClearVertexShaderCache = new wxButton(this, wxID_ANY, _("Clear V Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear V Shaders")); + m_pButtonClearVertexShaderCache->Bind(wxEVT_BUTTON, &GFXDebuggerPanel::OnClearVertexShaderCacheButton, this); + + m_pButtonClearPixelShaderCache = new wxButton(this, wxID_ANY, _("Clear P Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear P Shaders")); + m_pButtonClearPixelShaderCache->Bind(wxEVT_BUTTON, &GFXDebuggerPanel::OnClearPixelShaderCacheButton, this); - m_pDumpList = new wxChoice(this, ID_DUMP_LIST, wxDefaultPosition, wxSize(120,25), 0, nullptr, 0 ,wxDefaultValidator, _("DumpList")); + m_pDumpList = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(120,25), 0, nullptr, 0 ,wxDefaultValidator, _("DumpList")); m_pDumpList->Insert(_("Pixel Shader"),0); m_pDumpList->Append(_("Vertex Shader")); m_pDumpList->Append(_("Pixel Shader Constants")); -- cgit v1.2.3 From 50f600c834b5202a5e7a38fe5d4a6b5ca3bce122 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 14 Feb 2015 16:00:15 -0500 Subject: DolphinWX: Change Enable(false) calls into Disable() where possible --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index bf0744c7ff..0106839c09 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -223,24 +223,24 @@ void GFXDebuggerPanel::CreateGUIControls() void GFXDebuggerPanel::OnPause() { - m_pButtonDump->Enable(true); - m_pDumpList->Enable(true); - m_pButtonUpdateScreen->Enable(true); - m_pButtonClearScreen->Enable(true); - m_pButtonClearTextureCache->Enable(true); - m_pButtonClearVertexShaderCache->Enable(true); - m_pButtonClearPixelShaderCache->Enable(true); + m_pButtonDump->Enable(); + m_pDumpList->Enable(); + m_pButtonUpdateScreen->Enable(); + m_pButtonClearScreen->Enable(); + m_pButtonClearTextureCache->Enable(); + m_pButtonClearVertexShaderCache->Enable(); + m_pButtonClearPixelShaderCache->Enable(); } void GFXDebuggerPanel::OnContinue() { - m_pButtonDump->Enable(false); - m_pDumpList->Enable(false); - m_pButtonUpdateScreen->Enable(false); - m_pButtonClearScreen->Enable(false); - m_pButtonClearTextureCache->Enable(false); - m_pButtonClearVertexShaderCache->Enable(false); - m_pButtonClearPixelShaderCache->Enable(false); + m_pButtonDump->Disable(); + m_pDumpList->Disable(); + m_pButtonUpdateScreen->Disable(); + m_pButtonClearScreen->Disable(); + m_pButtonClearTextureCache->Disable(); + m_pButtonClearVertexShaderCache->Disable(); + m_pButtonClearPixelShaderCache->Disable(); } -- cgit v1.2.3 From a7e9aea7972c0a0af6fc7e9c4126ccda43118a0f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 8 May 2015 10:04:40 -0400 Subject: DolphinWX: Remove unnecessary includes --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index 0106839c09..6216a705d9 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -5,19 +5,11 @@ #include #include #include -#include #include -#include -#include -#include #include #include #include -#include #include -#include -#include -#include #include "Common/FileUtil.h" #include "Common/IniFile.h" -- cgit v1.2.3 From cefcb0ace9d363b3679b4e93bcc9ec05f1e5f4f8 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 18 May 2015 01:08:10 +0200 Subject: Update license headers to GPLv2+ --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index 6216a705d9..58b3c55c5c 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -1,5 +1,5 @@ // Copyright 2013 Dolphin Emulator Project -// Licensed under GPLv2 +// Licensed under GPLv2+ // Refer to the license.txt file included. #include -- cgit v1.2.3 From 30ebb2459eb97ba544547183854775df8460b475 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 24 May 2015 06:55:12 +0200 Subject: Set copyright year to when a file was created --- Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp') diff --git a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp index 58b3c55c5c..095c0f9ebe 100644 --- a/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp +++ b/Source/Core/DolphinWX/Debugger/DebuggerPanel.cpp @@ -1,4 +1,4 @@ -// Copyright 2013 Dolphin Emulator Project +// Copyright 2010 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. -- cgit v1.2.3