Skip to content

Commit

Permalink
Stop forcing latency waitable swapchains on in games that do not norm…
Browse files Browse the repository at this point in the history
…ally use them unless SwapChainWait is set to a non-zero value in INI
  • Loading branch information
Kaldaien committed Nov 29, 2024
1 parent 188c1d3 commit 0318c3a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
24.11.28.7
24.11.29
========
+ Stop forcing latency waitable swapchains on in games that do not normally
use them unless SwapChainWait is set to a non-zero value in INI.
+ Optimize NVIDIA Reflex timing marker code in D3D12 games to avoid a constant
check for sl.interposer.dll.

24.11.28.7
==========
+ Adjust Unreal Engine thread priorities for reduced stutter.
+ Disable OpenGL and D3D9 hooks in ReShade is loaded as dxgi.dll or d3d12.dll,
Expand Down
6 changes: 3 additions & 3 deletions include/SpecialK/DLL_VERSION.H
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

#define SK_YEAR 24
#define SK_MONTH 11
#define SK_DATE 28
#define SK_REV_N 7
#define SK_REV 7
#define SK_DATE 29
#define SK_REV_N 0
#define SK_REV 0

#ifndef _A2
#define _A2(a) #a
Expand Down
25 changes: 10 additions & 15 deletions src/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,22 +742,17 @@ NtWaitForSingleObject_Detour (

auto ret = STATUS_TIMEOUT;

if (Handle == 0)
ret = STATUS_INVALID_HANDLE;
else
{
// Waiting while debugging occasionally causes crashes
__try {
ret =
NtWaitForSingleObject_Original (
Handle, Alertable, Timeout
);
} __except (GetExceptionCode () == EXCEPTION_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER
: EXCEPTION_CONTINUE_SEARCH) {};
// Waiting while debugging occasionally causes crashes
__try {
ret =
NtWaitForSingleObject_Original (
Handle, Alertable, Timeout
);
} __except (GetExceptionCode () == EXCEPTION_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER
: EXCEPTION_CONTINUE_SEARCH) {};

if (ret != STATUS_TIMEOUT)
SK_MMCS_ApplyPendingTaskPriority ();
}
if (ret != STATUS_TIMEOUT)
SK_MMCS_ApplyPendingTaskPriority ();

return
ret;
Expand Down

0 comments on commit 0318c3a

Please sign in to comment.