diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8e4a41674..05322c6c5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,10 @@ -24.11.5.1 +24.11.9 +======= + + Fixed INI parser not returning to the start of the INI to scan for macros + after looking for plug-ins to load. + (i.e. macros in SpecialK.ini or dxgi.ini being ignored) + +24.11.5.1 ========= + Detect local ReShade DLLs as ReShade, and allow pressing the default ReShade UI toggle keybind to work even if SK is blocking keyboard input diff --git a/include/SpecialK/DLL_VERSION.H b/include/SpecialK/DLL_VERSION.H index ce5bf4985..e99d8635f 100644 --- a/include/SpecialK/DLL_VERSION.H +++ b/include/SpecialK/DLL_VERSION.H @@ -2,9 +2,9 @@ #define SK_YEAR 24 #define SK_MONTH 11 -#define SK_DATE 5 -#define SK_REV_N 1 -#define SK_REV 1 +#define SK_DATE 9 +#define SK_REV_N 0 +#define SK_REV 0 #ifndef _A2 #define _A2(a) #a diff --git a/include/SpecialK/config.h b/include/SpecialK/config.h index af3ff7f70..2b80218f0 100644 --- a/include/SpecialK/config.h +++ b/include/SpecialK/config.h @@ -1147,6 +1147,7 @@ struct sk_config_t bool catch_alt_f4 = true; bool override_alt_f4 = false; // For games that have prompts (i.e. DQ XI / Yakuza) int disabled_to_game = 2; //0 = Never, 1 = Always, 2 = In Background + int org_disabled_to_game= 2; volatile UINT64 temporarily_allow = 0; // Up until temporarily_allow + 1 frames, } keyboard; // ignore "disabled_to_game" @@ -1160,6 +1161,7 @@ struct sk_config_t // bool fix_synaptics = false; int disabled_to_game = 0; //0 = Never, 1 = Always, 2 = In Background + int org_disabled_to_game= 0; UINT64 temporarily_allow = 0; // Up until temporarily_allow + 1 frames, // ignore "disabled_to_game" bool ignore_small_clips = false;// Ignore mouse clipping rects < 75% the diff --git a/src/config.cpp b/src/config.cpp index 38a8b1794..353150fb6 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -2224,6 +2224,7 @@ auto DeclKeybind = dll_ini->import_file (custom_name.c_str ()); } + sec = sections.cbegin (); SK_RunOnce ( while (sec != sections.cend ()) @@ -2321,6 +2322,8 @@ auto DeclKeybind = } ); + sec = sections.cbegin (); + while (sec != sections.cend ()) { if (sec->first.find (L"Macro.") != std::wstring::npos) @@ -4631,9 +4634,13 @@ auto DeclKeybind = input.keyboard.catch_alt_f4->load (config.input.keyboard.catch_alt_f4); input.keyboard.bypass_alt_f4->load (config.input.keyboard.override_alt_f4); - input.keyboard.disabled_to_game->load (config.input.keyboard.disabled_to_game); + input.keyboard.disabled_to_game->load (config.input.keyboard.org_disabled_to_game); + config.input.keyboard. + org_disabled_to_game= config.input.keyboard.org_disabled_to_game; input.mouse.disabled_to_game->load (config.input.mouse.disabled_to_game); + config.input.mouse. + org_disabled_to_game = config.input.mouse.disabled_to_game; input.cursor.manage->load (config.input.cursor.manage); input.cursor.keys_activate->load (config.input.cursor.keys_activate); @@ -6093,9 +6100,9 @@ SK_SaveConfig ( std::wstring name, input.keyboard.catch_alt_f4->store (config.input.keyboard.catch_alt_f4); input.keyboard.bypass_alt_f4->store (config.input.keyboard.override_alt_f4); - input.keyboard.disabled_to_game->store (config.input.keyboard.disabled_to_game); + input.keyboard.disabled_to_game->store (config.input.keyboard.org_disabled_to_game); - input.mouse.disabled_to_game->store (config.input.mouse.disabled_to_game); + input.mouse.disabled_to_game->store (config.input.mouse.org_disabled_to_game); input.cursor.manage->store (config.input.cursor.manage); input.cursor.keys_activate->store (config.input.cursor.keys_activate); diff --git a/src/control_panel/cfg_input.cpp b/src/control_panel/cfg_input.cpp index a02d74cc7..f09fb8ec6 100644 --- a/src/control_panel/cfg_input.cpp +++ b/src/control_panel/cfg_input.cpp @@ -2699,11 +2699,21 @@ extern float SK_ImGui_PulseNav_Strength; ImGui::TreePush (""); ImGui::BeginGroup ( ); ImGui::BeginGroup ( ); - ImGui::Combo ("Mouse Input", &config.input.mouse.disabled_to_game, + bool mouse_changed = + ImGui::Combo ("Mouse Input", &config.input.mouse.org_disabled_to_game, "Enabled\0Disabled (Always)\0Disabled (in Background)\0\0"); - ImGui::Combo ("Keyboard Input", &config.input.keyboard.disabled_to_game, + bool keyboard_changed = + ImGui::Combo ("Keyboard Input", &config.input.keyboard.org_disabled_to_game, "Enabled\0Disabled (Always)\0Disabled (in Background)\0\0"); + if (mouse_changed) config.input.mouse. disabled_to_game = + config.input.mouse. org_disabled_to_game; + if (keyboard_changed)config.input.keyboard. disabled_to_game = + config.input.keyboard.org_disabled_to_game; + + if (mouse_changed || keyboard_changed) + config.utility.save_async (); + if (ImGui::IsItemHovered () && config.input.keyboard.disabled_to_game == SK_InputEnablement::DisabledInBackground) ImGui::SetTooltip ("Most games block keyboard input in the background to begin with..."); diff --git a/src/input/keyboard.cpp b/src/input/keyboard.cpp index c8d1c0415..3906a60d2 100644 --- a/src/input/keyboard.cpp +++ b/src/input/keyboard.cpp @@ -191,9 +191,18 @@ SK_ImGui_WantKeyboardCapture (bool update) // Allow keyboard input while ReShade overlay is active if (SK_ReShadeAddOn_IsOverlayActive ()) { + config.input.mouse .disabled_to_game = 2; + config.input.keyboard.disabled_to_game = 2; capture.store (false); return false; } + else + { + config.input.mouse. disabled_to_game = + config.input.mouse. org_disabled_to_game; + config.input.keyboard. disabled_to_game = + config.input.keyboard.org_disabled_to_game; + } // Allow keyboard input while Steam /EOS overlays are active if (SK::SteamAPI::GetOverlayState (true) ||