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);
|
||||
|
|
|
@ -182,6 +182,10 @@ void CAudioPlugin::DacrateChanged(SYSTEM_TYPE Type)
|
|||
|
||||
void CAudioPlugin::AudioThread(CAudioPlugin * _this) {
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
|
||||
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));
|
||||
|
|
|
@ -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