mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Code edits to ProcessorIdle
* include QS_RAWINPUT (0x400) for WinXP+. * set the option enabled by default.
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user