Skip to content

Commit 4ad6254

Browse files
committed
Do not restart games after disabling SteamAPI in Unity engine games if global injection is used, because SKIF will have stopped the injection service and SK wouldn't inject when the game restarts.
1 parent cb25798 commit 4ad6254

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

CHANGELOG.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
26.6.30.2
1+
26.6.30.3
2+
=========
3+
+ Do not restart games after disabling SteamAPI in Unity engine games if
4+
global injection is used, because SKIF will have stopped the injection
5+
service and SK wouldn't inject when the game restarts.
6+
7+
26.6.30.2
28
=========
39
+ Fixed potential race to initialize Unity fixedDeltaTime overrides resulting
410
in no override being applied automatically at game start.

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 6
55
#define SK_DATE 30
6-
#define SK_REV_N 2
7-
#define SK_REV 2
6+
#define SK_REV_N 3
7+
#define SK_REV 3
88

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

src/steam/steam_api.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4188,7 +4188,10 @@ SK_SteamAPI_TerminateIfManualDispatchIsActiveAndSKHasHookedSteamAPI (void)
41884188
L"Please Restart Game for Compatibility Mode", MB_ICONWARNING | MB_OK |
41894189
MB_TASKMODAL | MB_SETFOREGROUND | MB_TOPMOST );
41904190

4191-
SK_RestartGame ();
4191+
// SKIF stops global injection after 1 frame, so restarting isn't always
4192+
// possible without causing SK to not inject in the restarted process.
4193+
if (! (SK_GetFramesDrawn () && SK_IsInjected ()))
4194+
SK_RestartGame ();
41924195

41934196
TerminateProcess (
41944197
GetCurrentProcess (), 0x0

0 commit comments

Comments
 (0)