Skip to content

Commit a4a7018

Browse files
committed
Allow framerate limiter stats memory leak during shutdown to prevent worse.
1 parent ec09db7 commit a4a7018

3 files changed

Lines changed: 23 additions & 6 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.12.4
1+
26.6.12.5
2+
=========
3+
+ Allow framerate limiter stats memory leak during shutdown to prevent worse.
4+
+ Check DualSense Firmware Feature Report (0x20) to detect DualSense
5+
compatible controllers without hardcoded VID/PID pairs.
6+
7+
26.6.12.4
28
=========
39
+ Reduced overhead of screensaver check in ImGui's backup input thread.
410

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 12
6-
#define SK_REV_N 4
7-
#define SK_REV 4
6+
#define SK_REV_N 5
7+
#define SK_REV 5
88

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

include/SpecialK/framerate.h

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,17 @@ namespace SK
172172
SignalObjectAndWait ( worker.hSignalShutdown,
173173
worker.hThread, 2500UL, TRUE );
174174
}
175+
176+
extern volatile LONG __SK_DLL_Ending;
177+
178+
// Let these things leak to avoid problems during shutdown
179+
if (ReadAcquire (&__SK_DLL_Ending))
180+
{
181+
worker.hSignalProduce.m_h = 0;
182+
worker.hSignalConsume.m_h = 0;
183+
worker.hSignalShutdown.m_h = 0;
184+
worker.hThread.m_h = 0;
185+
}
175186
}
176187

177188
std::vector <double>&
@@ -188,9 +199,9 @@ namespace SK
188199
SK_AutoHandle hSignalConsume;
189200
SK_AutoHandle hSignalShutdown;
190201
SK_AutoHandle hThread;
191-
ULONG ulLastFrame = 0;
192-
volatile LONG work_idx = 0;
193-
volatile LONG _init = 0;
202+
ULONG ulLastFrame = 0;
203+
volatile LONG work_idx = 0;
204+
volatile LONG _init = 0;
194205

195206
std::pair <ULONG, std::vector <double> >
196207
sorted_frame_history [2];

0 commit comments

Comments
 (0)