Code edits to ProcessorIdle

* use proper QS_ALLINPUT as it includes QS_RAWINPUT for WinXP+.
* set the option enabled by default.
This commit is contained in:
NovaRain
2026-01-15 09:20:17 +08:00
parent 7e74abf78f
commit b3c5fad981
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -461,7 +461,7 @@ PlayIdleAnimOnReload=0
CorpseDeleteTime=6
;Set to 1 to allow the game to go idle during each input loop, preventing 100% CPU usage
ProcessorIdle=0
ProcessorIdle=1
;Set to 1 if using the hero appearance mod
;Set to 2 for backward compatibility with scripts that manually fix obj_art_fid/art_change_fid_num script functions for dude_obj
+1 -1
View File
@@ -961,7 +961,7 @@ void MiscPatches::init() {
fo::var::idle_func = reinterpret_cast<void*>(Sleep);
SafeWrite16(0x4C9F12, 0x7D6A); // push 125 (ms)
if (idle <= 0) idle = IniReader::GetConfigInt("Misc", "ProcessorIdle", -1);
if (idle <= 0) idle = IniReader::GetConfigInt("Misc", "ProcessorIdle", 1);
if (idle > 0) MakeJump(0x4C9DA9, GNW95_process_message_hack, 3); // replace hack function from HRP by Mash
BlockCall(0x4425E6); // Patch out ereg call
+1 -1
View File
@@ -52,7 +52,7 @@ void __stdcall WinProc::MessageWindow() {
// Implementation from HRP by Mash
void __stdcall WinProc::WaitMessageWindow() {
MsgWaitForMultipleObjectsEx(0, 0, 1, 0xFF, 0);
MsgWaitForMultipleObjectsEx(0, 0, 1, QS_ALLINPUT, 0);
MessageWindow();
}
+2 -2
View File
@@ -124,7 +124,6 @@ static void InitModules() {
manager.add<EngineTweaks>();
manager.add<Books>();
manager.add<Criticals>();
manager.add<Elevators>();
manager.add<Animations>();
@@ -142,6 +141,8 @@ static void InitModules() {
manager.add<Unarmed>();
manager.add<DamageMod>();
manager.add<BurstMods>();
manager.add<Combat>();
manager.add<Criticals>();
manager.add<Inventory>();
manager.add<Objects>();
@@ -152,7 +153,6 @@ static void InitModules() {
manager.add<Skills>();
manager.add<Drugs>(); // should be loaded before PartyControl
manager.add<PartyControl>();
manager.add<Combat>();
manager.add<PlayerModel>();
manager.add<Karma>();