Merge pull request #4945 from lioncash/jit-global

DolphinWX: Eliminate direct usage of the JIT global
This commit is contained in:
Markus Wick 2017-02-23 10:24:55 +01:00 committed by GitHub
commit 51b654ed00

View File

@ -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;
@ -134,8 +134,6 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
Core::SetState(Core::State::Paused);
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);
@ -149,12 +147,10 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
// MIME type failed, aborting mission
break;
}
wxString OpenCommand;
OpenCommand = filetype->GetOpenCommand(StrToWxStr(filename));
wxString OpenCommand = filetype->GetOpenCommand(StrToWxStr(filename));
if (!OpenCommand.IsEmpty())
wxExecute(OpenCommand, wxEXEC_SYNC);
}
}
break;
}
}