Skip to content

Commit

Permalink
Block keyboard input for ReShade while its overlay is active and the …
Browse files Browse the repository at this point in the history
…game window is not
  • Loading branch information
Kaldaien committed Nov 15, 2024
1 parent 2057536 commit e71075e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3761,10 +3761,9 @@ auto DeclKeybind =
config.priority.perf_cores_only = true;
config.window.background_render = true;
config.window.fullscreen_no_saver = true;
config.input.ui.capture_hidden = true;
config.input.keyboard.override_alt_f4 = true; // Oh lord, kill that buggy exit confirmation
config.render.framerate.sleepless_render = false;
config.render.framerate.sleepless_window = false;
config.render.framerate.sleepless_render = true;
config.render.framerate.sleepless_window = true;
config.input.gamepad.xinput.emulate = true; // XInput-only
config.render.hdr.remaster_8bpc_as_unorm = true;
config.render.hdr.remaster_subnative_as_unorm = true;
Expand All @@ -3773,7 +3772,6 @@ auto DeclKeybind =
config.render.dxgi.deferred_isolation = true; // Needed for correct texture caching on staging uploads

config.render.d3d12.force_anisotropic = true;
config.render.d3d12.max_anisotropy = 6UL;
config.render.d3d12.force_lod_bias = 0.0f;

SK_D3D11_DeclHUDShader_Vtx (0x187097b5);
Expand Down
3 changes: 2 additions & 1 deletion src/input/keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ SK_ImGui_WantKeyboardCapture (bool update)
config.input.mouse .disabled_to_game = 2;
config.input.keyboard.disabled_to_game = 2;
capture.store (false);
return false;

return !SK_IsGameWindowActive ();
}
else
{
Expand Down

0 comments on commit e71075e

Please sign in to comment.