Merge pull request #5251 from thedax/crashFix

All platforms: Fix a crash where enabling Debug Statistics before entering a game, then disabling it after exiting a game causes the JIT to try to clear cache, when it's pointless
This commit is contained in:
Henrik Rydgård 2014-01-28 01:40:20 -08:00
commit 27a863a02e
2 changed files with 2 additions and 4 deletions

View File

@ -434,9 +434,7 @@ void GameSettingsScreen::update(InputState &input) {
g_Config.iFpsLimit = alternateSpeedTable[iAlternateSpeedPercent_];
if (g_Config.bShowDebugStats != showDebugStats_) {
// This affects the jit.
if (MIPSComp::jit) {
MIPSComp::jit->ClearCache();
}
NativeMessageReceived("clear jit", "");
g_Config.bShowDebugStats = showDebugStats_;
}
}

View File

@ -101,7 +101,7 @@ void DrawBackground(float alpha) {
void HandleCommonMessages(const char *message, const char *value, ScreenManager *manager) {
if (!strcmp(message, "clear jit")) {
if (MIPSComp::jit) {
if (MIPSComp::jit && PSP_IsInited()) {
MIPSComp::jit->ClearCache();
}
}