Skip to content

Commit b3c5fad

Browse files
committed
Code edits to ProcessorIdle
* use proper QS_ALLINPUT as it includes QS_RAWINPUT for WinXP+. * set the option enabled by default.
1 parent 7e74abf commit b3c5fad

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

artifacts/ddraw.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ PlayIdleAnimOnReload=0
461461
CorpseDeleteTime=6
462462

463463
;Set to 1 to allow the game to go idle during each input loop, preventing 100% CPU usage
464-
ProcessorIdle=0
464+
ProcessorIdle=1
465465

466466
;Set to 1 if using the hero appearance mod
467467
;Set to 2 for backward compatibility with scripts that manually fix obj_art_fid/art_change_fid_num script functions for dude_obj

sfall/Modules/MiscPatches.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ void MiscPatches::init() {
961961
fo::var::idle_func = reinterpret_cast<void*>(Sleep);
962962
SafeWrite16(0x4C9F12, 0x7D6A); // push 125 (ms)
963963

964-
if (idle <= 0) idle = IniReader::GetConfigInt("Misc", "ProcessorIdle", -1);
964+
if (idle <= 0) idle = IniReader::GetConfigInt("Misc", "ProcessorIdle", 1);
965965
if (idle > 0) MakeJump(0x4C9DA9, GNW95_process_message_hack, 3); // replace hack function from HRP by Mash
966966

967967
BlockCall(0x4425E6); // Patch out ereg call

sfall/WinProc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void __stdcall WinProc::MessageWindow() {
5252

5353
// Implementation from HRP by Mash
5454
void __stdcall WinProc::WaitMessageWindow() {
55-
MsgWaitForMultipleObjectsEx(0, 0, 1, 0xFF, 0);
55+
MsgWaitForMultipleObjectsEx(0, 0, 1, QS_ALLINPUT, 0);
5656
MessageWindow();
5757
}
5858

sfall/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ static void InitModules() {
124124

125125
manager.add<EngineTweaks>();
126126
manager.add<Books>();
127-
manager.add<Criticals>();
128127
manager.add<Elevators>();
129128

130129
manager.add<Animations>();
@@ -142,6 +141,8 @@ static void InitModules() {
142141
manager.add<Unarmed>();
143142
manager.add<DamageMod>();
144143
manager.add<BurstMods>();
144+
manager.add<Combat>();
145+
manager.add<Criticals>();
145146

146147
manager.add<Inventory>();
147148
manager.add<Objects>();
@@ -152,7 +153,6 @@ static void InitModules() {
152153
manager.add<Skills>();
153154
manager.add<Drugs>(); // should be loaded before PartyControl
154155
manager.add<PartyControl>();
155-
manager.add<Combat>();
156156

157157
manager.add<PlayerModel>();
158158
manager.add<Karma>();

0 commit comments

Comments
 (0)