Skip to content

Commit

Permalink
Revert recent change to foreground window checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaldaien committed Nov 14, 2024
1 parent 3fe2374 commit e505708
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
24.11.14.1
24.11.14.2
==========
+ Revert recent change to foreground window checks.

24.11.14.1
==========
+ When loading ReShade as a Plug-In, automatically load all AddOns in a Game
Profile's ReShade\AddOns\ directory and any in Global\ReShade\AddOns\.
Expand Down
4 changes: 2 additions & 2 deletions include/SpecialK/DLL_VERSION.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#define SK_YEAR 24
#define SK_MONTH 11
#define SK_DATE 14
#define SK_REV_N 1
#define SK_REV 1
#define SK_REV_N 2
#define SK_REV 2

#ifndef _A2
#define _A2(a) #a
Expand Down
2 changes: 1 addition & 1 deletion include/SpecialK/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ SK_IsGameWindowFocused (void);

HWND
WINAPI
SK_GetForegroundWindow (bool flush = false);
SK_GetForegroundWindow (void);

HWND
WINAPI
Expand Down
2 changes: 1 addition & 1 deletion include/imgui/imgui_user.inl
Original file line number Diff line number Diff line change
Expand Up @@ -3130,7 +3130,7 @@ SK_ImGui_User_NewFrame (void)

bool capture_mouse = SK_ImGui_WantMouseCapture ();
bool anything_hovered = SK_ImGui_IsAnythingHovered ();
HWND hWndForeground = SK_GetForegroundWindow (true);
HWND hWndForeground = SK_GetForegroundWindow ();
BOOL bHWCursorVisible = SK_InputUtil_IsHWCursorVisible ();

__SK_EnableSetCursor = true;
Expand Down
4 changes: 2 additions & 2 deletions src/render/d3d11/d3d11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5895,8 +5895,8 @@ D3D11Dev_CreateTexture2DCore_Impl (
static
const bool bIgnorePartialMatches =
( SK_GetCurrentGameID () == SK_GAME_ID::NieRAutomata ) ||
( SK_GetCurrentGameID () == SK_GAME_ID::SonicXShadowGenerations ||
SK_GetCurrentGameID () == SK_GAME_ID::Metaphor );
( SK_GetCurrentGameID () == SK_GAME_ID::SonicXShadowGenerations ) ||
( SK_GetCurrentGameID () == SK_GAME_ID::Metaphor );

const bool game_specific_reqs_met = false;
if ( game_specific_reqs_met ||
Expand Down
11 changes: 2 additions & 9 deletions src/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5065,19 +5065,12 @@ static GetForegroundWindow_pfn

HWND
WINAPI
SK_GetForegroundWindow (bool update)
SK_GetForegroundWindow (void)
{
static HWND hWndForeground = nullptr;

if (update || hWndForeground == 0)
{
hWndForeground =
return
GetForegroundWindow_Original != nullptr ?
GetForegroundWindow_Original () :
GetForegroundWindow ();
}

return hWndForeground;
}

HWND
Expand Down

0 comments on commit e505708

Please sign in to comment.