Skip to content

Commit

Permalink
Write DLSS setting changes to INI immediately after changing them
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaldaien committed Oct 10, 2023
1 parent a657ca0 commit 0dd8f5c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
23.10.9
23.10.9.1
=========
+ Write DLSS setting changes to INI immediately after changing them

23.10.9
=======
+ Added a DLSS control panel section for D3D11/12 games that are using it
+ Added options to force DLAA in DLSS games that don't normally support it
+ Added options to override DLSS sharpening
+ Added option to force DLAA in DLSS games that don't normally support it
+ Added option to override DLSS sharpening

23.10.8.1
=========
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 23
#define SK_MONTH 10
#define SK_DATE 9
#define SK_REV_N 0
#define SK_REV 0
#define SK_REV_N 1
#define SK_REV 1

#ifndef _A2
#define _A2(a) #a
Expand Down
24 changes: 15 additions & 9 deletions src/control_panel/cfg_d3d11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,16 +411,19 @@ SK_DX_DLSS_ControlPanel (void)

ImGui::SameLine ();

restart_required |=
ImGui::Checkbox ("Force DLAA", &config.nvidia.dlss.force_dlaa);
if (ImGui::Checkbox ("Force DLAA", &config.nvidia.dlss.force_dlaa))
{
restart_required = true;

SK_SaveConfig ();
}

if (ImGui::IsItemHovered ())
{
ImGui::SetTooltip ("For best results, make sure to update nvngx_dlss.dll and set game's DLSS mode = Auto/Ultra Performance if it has them.");
}

float fSharpness;

float fSharpness;
params->Get (NVSDK_NGX_Parameter_Sharpness, &fSharpness);

int use_sharpening =
Expand All @@ -429,12 +432,14 @@ SK_DX_DLSS_ControlPanel (void)
if ( ImGui::Combo (
"Sharpening",
&use_sharpening, "Game Default\0"
"Force On\0"
"Force Off\0\0") )
"Force Off\0"
"Force On\0\0") )
{
config.nvidia.dlss.use_sharpening =
use_sharpening - 1;
restart_required = true;

SK_SaveConfig ();
}

int dlss_creation_flags = 0x0;
Expand All @@ -443,17 +448,18 @@ SK_DX_DLSS_ControlPanel (void)

if (use_sharpening == 0 && (dlss_creation_flags & NVSDK_NGX_DLSS_Feature_Flags_DoSharpening))
ImGui::Text ("Sharpness: %4.2f", fSharpness);
else if (use_sharpening == 1)
else if (use_sharpening == 2)
{
fSharpness = config.nvidia.dlss.forced_sharpness;

if (ImGui::SliderFloat ("Sharpness", &fSharpness, -1.0f, 1.0f))
{
config.nvidia.dlss.forced_sharpness = fSharpness;

config.nvidia.dlss.forced_sharpness = fSharpness;
params->Set (NVSDK_NGX_Parameter_Sharpness, fSharpness);

restart_required = true;

SK_SaveConfig ();
}
}

Expand Down

0 comments on commit 0dd8f5c

Please sign in to comment.