Code edits to ProcessorIdle

* include QS_RAWINPUT (0x400) for WinXP+.
* set the option enabled by default.
This commit is contained in:
NovaRain
2026-01-15 09:41:13 +08:00
parent ae3a8f85f5
commit 201ecd16f7
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -470,7 +470,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
+2 -2
View File
@@ -40,7 +40,7 @@ bool disableHorrigan = false;
// Implementation from HRP by Mash
static void __stdcall CheckMessages() {
MSG msg;
MsgWaitForMultipleObjectsEx(0, 0, 1, 0xFF, 0);
MsgWaitForMultipleObjectsEx(0, 0, 1, 0x4FF, 0); // QS_ALLINPUT for newer Windows
while (PeekMessageA(&msg, 0, 0, 0, 0)) {
if (GetMessageA(&msg, 0, 0, 0)) {
TranslateMessage(&msg);
@@ -997,7 +997,7 @@ void MiscPatches::init() {
*fo::ptr::idle_func = reinterpret_cast<void*>(Sleep);
SafeWrite16(0x4C9F12, 0x7D6A); // push 125 (ms)
if (IniReader::GetConfigInt("Misc", "ProcessorIdle", -1) > 0) {
if (IniReader::GetConfigInt("Misc", "ProcessorIdle", 1) > 0) {
MakeJump(0x4C9DA9, GNW95_process_message_hack, 3); // replace hack function from HRP by Mash
}
+2 -2
View File
@@ -128,7 +128,6 @@ static void InitModules() {
manager.add<EngineTweaks>();
manager.add<Books>();
manager.add<Criticals>();
manager.add<Elevators>();
manager.add<Animations>();
@@ -146,6 +145,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>();
@@ -153,7 +154,6 @@ static void InitModules() {
manager.add<Perks>();
manager.add<Skills>();
manager.add<PartyControl>();
manager.add<Combat>();
manager.add<PlayerModel>();
manager.add<Karma>();