1
0
Fork 0

GUI: only execute JIT commands when something actually changed

This commit is contained in:
Mr. eXoDia 2014-08-08 15:40:09 +02:00
parent 1a29c67779
commit 4e432b2af7
2 changed files with 20 additions and 10 deletions

View File

@ -193,6 +193,8 @@ void SettingsDialog::LoadSettings()
}
}
}
bJitOld = settings.eventSetJIT;
bJitAutoOld = settings.eventSetJITAuto;
}
void SettingsDialog::SaveSettings()
@ -235,15 +237,21 @@ void SettingsDialog::SaveSettings()
//Misc tab
if(DbgFunctions()->GetJit)
{
if(settings.eventSetJIT)
DbgCmdExecDirect("setjit");
else
DbgCmdExecDirect("setjit restore");
if(bJitOld != settings.eventSetJIT)
{
if(settings.eventSetJIT)
DbgCmdExecDirect("setjit");
else
DbgCmdExecDirect("setjit restore");
}
if(!settings.eventSetJITAuto)
DbgCmdExecDirect("setjitauto on");
else
DbgCmdExecDirect("setjitauto off");
if(bJitAutoOld != settings.eventSetJITAuto)
{
if(!settings.eventSetJITAuto)
DbgCmdExecDirect("setjitauto on");
else
DbgCmdExecDirect("setjitauto off");
}
}
Config()->load();

View File

@ -117,14 +117,16 @@ private:
bool disasmUppercase;
bool disasmOnlyCipAutoComments;
//Misc Tab
bool eventSetJIT;
bool eventSetJITAuto;
bool miscSetJIT;
bool miscSetJITAuto;
};
//variables
Ui::SettingsDialog* ui;
SettingsStruct settings;
QList<RangeStruct> realExceptionRanges;
bool bJitOld;
bool bJitAutoOld;
//functions
void GetSettingBool(const char* section, const char* name, bool* set);