Merge pull request #756 from Frank-74/CN64TimeCritical-Setting
CN64 time critical thread priority setting
This commit is contained in:
commit
d6b124962a
|
@ -375,6 +375,11 @@ void CN64System::StartEmulation(bool NewThread)
|
|||
|
||||
void CN64System::StartEmulationThread(ThreadInfo * Info)
|
||||
{
|
||||
if (g_Settings->LoadBool(Setting_CN64TimeCritical))
|
||||
{
|
||||
SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_TIME_CRITICAL);
|
||||
}
|
||||
|
||||
CoInitialize(NULL);
|
||||
|
||||
EmulationStarting(*Info->ThreadHandle, Info->ThreadID);
|
||||
|
@ -2030,4 +2035,4 @@ void CN64System::TLB_Changed()
|
|||
{
|
||||
g_Debugger->TLBChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,7 +182,11 @@ void CAudioPlugin::DacrateChanged(SYSTEM_TYPE Type)
|
|||
|
||||
void CAudioPlugin::AudioThread(CAudioPlugin * _this) {
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
|
||||
for (;;)
|
||||
if (g_Settings->LoadBool(Setting_CN64TimeCritical))
|
||||
{
|
||||
SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_HIGHEST);
|
||||
}
|
||||
for (;;)
|
||||
{
|
||||
_this->AiUpdate(true);
|
||||
}
|
||||
|
|
|
@ -109,6 +109,7 @@ void CSettings::AddHowToHandleSetting()
|
|||
AddHandler(Setting_ApplicationName, new CSettingTypeTempString(""));
|
||||
AddHandler(Setting_UseFromRegistry, new CSettingTypeApplication("Settings", "Use Registry", (uint32_t)false));
|
||||
AddHandler(Setting_RdbEditor, new CSettingTypeApplication("", "Rdb Editor", false));
|
||||
AddHandler(Setting_CN64TimeCritical,new CSettingTypeApplication("","CN64TimeCritical",false));
|
||||
AddHandler(Setting_PluginPageFirst, new CSettingTypeApplication("", "Plugin Page First", false));
|
||||
AddHandler(Setting_DisableScrSaver, new CSettingTypeApplication("", "Disable Screen Saver", (uint32_t)true));
|
||||
AddHandler(Setting_AutoSleep, new CSettingTypeApplication("", "Auto Sleep", (uint32_t)true));
|
||||
|
@ -1178,4 +1179,4 @@ void CSettings::UnregisterChangeCB(SettingID Type, void * Data, SettingChangedFu
|
|||
{
|
||||
g_Notify->BreakPoint(__FILEW__, __LINE__);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ enum SettingID
|
|||
Setting_ApplicationName,
|
||||
Setting_UseFromRegistry,
|
||||
Setting_RdbEditor,
|
||||
Setting_CN64TimeCritical,
|
||||
Setting_PluginPageFirst,
|
||||
Setting_DisableScrSaver,
|
||||
Setting_AutoSleep,
|
||||
|
|
Loading…
Reference in New Issue