diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-02-21 15:05:17 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-02-21 16:15:47 -0500 |
| commit | 70d336d2a973ff1479453e12f6ef48c0e12f7dd4 (patch) | |
| tree | 15a01c01d606b1f38ceddf15470b537171e91445 /Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp | |
| parent | 95b2b033b025729491d3c22f94f01d4aca38d4f0 (diff) | |
DolphinWX: Eliminate direct usage of the JIT global
Instead, the JitInterface namespace functions should be used instead. This
gets rid of all usages of the JIT global from the wxWidgets UI code.
The null check isn't needed as the JIT core would already need to be
initialized in order to be within a paused state. The null check is just a
remnant from 2011 that existed before the check for a paused state was
added.
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp b/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp index 44e0c51349..6db5c36619 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindowFunctions.cpp @@ -24,10 +24,11 @@ #include "Common/SymbolDB.h" #include "Core/Boot/Boot.h" +#include "Core/ConfigManager.h" #include "Core/Core.h" #include "Core/HLE/HLE.h" #include "Core/Host.h" -#include "Core/PowerPC/JitCommon/JitBase.h" +#include "Core/PowerPC/JitInterface.h" #include "Core/PowerPC/PPCAnalyst.h" #include "Core/PowerPC/PPCSymbolDB.h" #include "Core/PowerPC/PowerPC.h" @@ -124,8 +125,7 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event) { case IDM_PROFILE_BLOCKS: Core::SetState(Core::State::Paused); - if (g_jit != nullptr) - g_jit->ClearCache(); + JitInterface::ClearCache(); Profiler::g_ProfileBlocks = GetParentMenuBar()->IsChecked(IDM_PROFILE_BLOCKS); Core::SetState(Core::State::Running); break; @@ -135,25 +135,21 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event) if (Core::GetState() == Core::State::Paused && PowerPC::GetMode() == PowerPC::CoreMode::JIT) { - if (g_jit != nullptr) + std::string filename = File::GetUserPath(D_DUMP_IDX) + "Debug/profiler.txt"; + File::CreateFullPath(filename); + Profiler::WriteProfileResults(filename); + + wxFileType* filetype = nullptr; + if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromExtension("txt"))) { - std::string filename = File::GetUserPath(D_DUMP_IDX) + "Debug/profiler.txt"; - File::CreateFullPath(filename); - Profiler::WriteProfileResults(filename); - - wxFileType* filetype = nullptr; - if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromExtension("txt"))) - { - // From extension failed, trying with MIME type now - if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType("text/plain"))) - // MIME type failed, aborting mission - break; - } - wxString OpenCommand; - OpenCommand = filetype->GetOpenCommand(StrToWxStr(filename)); - if (!OpenCommand.IsEmpty()) - wxExecute(OpenCommand, wxEXEC_SYNC); + // From extension failed, trying with MIME type now + if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType("text/plain"))) + // MIME type failed, aborting mission + break; } + wxString OpenCommand = filetype->GetOpenCommand(StrToWxStr(filename)); + if (!OpenCommand.IsEmpty()) + wxExecute(OpenCommand, wxEXEC_SYNC); } break; } |
