Profiler: Migrate global g_ProfileBlocks boolean to JitOptions

This global belongs in the JitOptions structure, as it's a conditional
setting (A.K.A. option) that changes the behavior of what the JIT does.

Plus it keeps the scope of the variable constrained to the general area
it's intended to be used and nothing further.
This commit is contained in:
Lioncash
2018-08-27 11:15:24 -04:00
parent 88a91562b5
commit 7aa305ea35
8 changed files with 24 additions and 11 deletions

View File

@ -498,7 +498,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetProfiling
std::lock_guard<std::mutex> guard(s_host_identity_lock);
Core::SetState(Core::State::Paused);
JitInterface::ClearCache();
Profiler::g_ProfileBlocks = enable;
JitInterface::SetProfilingState(enable ? JitInterface::ProfilingState::Enabled :
JitInterface::ProfilingState::Disabled);
Core::SetState(Core::State::Running);
}