Skip to content

Commit 5b0625a

Browse files
committed
Allow games to set the foreground window to themselves one time during launch when Continue Rendering is enabled
1 parent ea3ab3f commit 5b0625a

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

CHANGELOG.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
26.4.22
1+
26.4.22.1
2+
=========
3+
+ Allow games to set the foreground window to themselves one time during
4+
launch when Continue Rendering is enabled; subsequent attempts blocked.
5+
* Needed because Crimson Desert sets the foreground window once per-frame,
6+
and it would be impossible to use your PC while it is doing that.
7+
8+
26.4.22
29
=======
310
+ Added support for NVIDIA Smooth Motion, provided you do not try to change a
411
game's resolution; Smooth Motion leaks resources and this always fails.

include/SpecialK/DLL_VERSION.H

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#define SK_YEAR 26
44
#define SK_MONTH 4
55
#define SK_DATE 22
6-
#define SK_REV_N 0
7-
#define SK_REV 0
6+
#define SK_REV_N 1
7+
#define SK_REV 1
88

99
#ifndef _A2
1010
#define _A2(a) #a

src/window.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5635,11 +5635,14 @@ SetForegroundWindow_Detour (HWND hWnd)
56355635
{
56365636
SK_LOG_FIRST_CALL;
56375637

5638-
// Fix problems with Crimson Sands bringing itself to the foreground constantly
5638+
// Fix problems with Crimson Desert bringing itself to the foreground constantly
56395639
// when using background rendering
56405640
if ( hWnd == game_window.hWnd && config.window.background_render
56415641
&& !SK_IsGameWindowActive () )
56425642
{
5643+
// First one's always free.
5644+
SK_RunOnce (return SetForegroundWindow_Original (hWnd));
5645+
56435646
return TRUE;
56445647
}
56455648

0 commit comments

Comments
 (0)