Skip to content

Commit 36ada62

Browse files
committed
Merge branch 'master' of https://github.com/cdozdil/OptiScaler
2 parents f3f7c4d + ebfd432 commit 36ada62

File tree

10 files changed

+153
-40
lines changed

10 files changed

+153
-40
lines changed

.github/ISSUE_TEMPLATE/crash-bug.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ assignees: ''
1313
*Example:* Cyberpunk 2077 (Steam), Avowed (GamePass/UWP)
1414

1515
#### Mods and mod versions used
16-
*Example:* OptiScaler_v0.7.7-pre7_20250316 + Fakenvapi 1.2.1 + Nukem 0.122 - Optiscaler version most important
16+
*Example:* OptiScaler_v0.7.7-pre7_20250316 + Fakenvapi 1.2.1 + Nukem 0.122 - OptiScaler version most important
1717

1818
#### GPU
1919
*Example:* RTX 4070Ti, RX 7800XT
@@ -39,6 +39,6 @@ Also please mention in description which upscaler inputs are used (which upscale
3939
*Example:* I am using DLSS in game settings and the game is crashing when switching to FSR4.
4040

4141
#### I have attached
42-
- [ ] OptiScaler.log _(set `LogLevel=0` and `LogToFile=true` in Optiscaler.ini, zip it if too big)_
42+
- [ ] OptiScaler.log _(set `LogLevel=0` and `LogToFile=true` in OptiScaler.ini, zip it if too big)_
4343
- [ ] Screenshot of game folder _(where you placed Opti)_
4444
- [ ] Screenshot of Opti overlay in-game _(opens with shortcut, default Insert)_

Config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ For DirectX11 with `fsr21_12`, `fsr22_12` and `xess` upscaler options, OptiScale
6565

6666
```ini
6767
[Dx11withDx12]
68-
; Syncing meathods for Dx11 with Dx12
68+
; Syncing methods for Dx11 with Dx12
6969
;
7070
; Valid values are;
7171
; 0 - No syncing (fastest, most prone to errors)

OptiScaler Setup.bat

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,71 @@ if exist %selectedFilename% (
8888

8989
echo.
9090
if "!overwriteChoice!"=="y" (
91-
goto completeSetup
91+
goto checkWine
9292
)
9393

9494
goto selectFilename
9595
)
9696

97+
REM Wine doesn't support powershell
98+
:checkWine
99+
reg query HKEY_CURRENT_USER\Software\Wine >nul 2>&1
100+
if %errorlevel%==0 (
101+
echo.
102+
echo Using wine, skipping over spoofing checks.
103+
echo If you need, you can disable spoofing by setting Dxgi=false in the config
104+
echo.
105+
pause
106+
goto completeSetup
107+
)
108+
109+
if exist %windir%\system32\nvapi64.dll (
110+
echo.
111+
echo Nvidia driver files detected.
112+
set isNvidia=true
113+
) else (
114+
set isNvidia=false
115+
)
116+
117+
REM Query user for GPU type
118+
echo.
119+
echo Are you using an Nvidia GPU or AMD/Intel GPU?
120+
echo [1] AMD/Intel
121+
echo [2] Nvidia
122+
if "%isNvidia%"=="true" (
123+
set /p gpuChoice="Enter 1 or 2 (or press Enter for Nvidia): "
124+
) else (
125+
set /p gpuChoice="Enter 1 or 2 (or press Enter for AMD/Intel): "
126+
)
127+
128+
REM Skip spoofing if Nvidia
129+
if "%gpuChoice%"=="2" (
130+
goto completeSetup
131+
)
132+
133+
if "%gpuChoice%"=="" (
134+
if "%isNvidia%"=="true" (
135+
goto completeSetup
136+
)
137+
)
138+
139+
REM Query user for DLSS
140+
echo.
141+
echo Will you try to use DLSS inputs? (enables spoofing, required for DLSS FG, Reflex-^>AL2)
142+
echo [1] Yes
143+
echo [2] No
144+
set /p enablingSpoofing="Enter 1 or 2 (or press Enter for Yes): "
145+
146+
set configFile=OptiScaler.ini
147+
if "%enablingSpoofing%"=="2" (
148+
if not exist "%configFile%" (
149+
echo Config file not found: %configFile%
150+
pause
151+
)
152+
153+
powershell -Command "(Get-Content '%configFile%') -replace 'Dxgi=auto', 'Dxgi=false' | Set-Content '%configFile%'"
154+
)
155+
97156
:completeSetup
98157
REM Rename OptiScaler file
99158
echo.

OptiScaler.ini

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ FPTWaitForSingleObjectOnFence=auto
166166
; -------------------------------------------------------
167167
[Inputs]
168168
; -------------------------------------------------------
169-
; Optiscaler will hook (nvngx.dll) and use Dlss Inputs
169+
; OptiScaler will hook (nvngx.dll) and use Dlss Inputs
170170
; true or false - Default (auto) is true
171171
Dlss=auto
172172

173-
; Optiscaler will hook (libxess.dll) and use XeSS Inputs
173+
; OptiScaler will hook (libxess.dll) and use XeSS Inputs
174174
; true or false - Default (auto) is true
175175
XeSS=auto
176176

177-
; Optiscaler will hook and use Fsr2 Inputs
177+
; OptiScaler will hook and use Fsr2 Inputs
178178
; true or false - Default (auto) is true
179179
Fsr2=auto
180180

@@ -183,7 +183,7 @@ Fsr2=auto
183183
; true or false - Default (auto) is false
184184
Fsr2Pattern=auto
185185

186-
; Optiscaler will hook and use Fsr3 Inputs
186+
; OptiScaler will hook and use Fsr3 Inputs
187187
; true or false - Default (auto) is true
188188
Fsr3=auto
189189

@@ -192,7 +192,7 @@ Fsr3=auto
192192
; true or false - Default (auto) is false
193193
Fsr3Pattern=auto
194194

195-
; Optiscaler will hook (amd_fidelityfx_dx12.dll) and use FidelityFX Api Inputs
195+
; OptiScaler will hook (amd_fidelityfx_dx12.dll) and use FidelityFX Api Inputs
196196
; true or false - Default (auto) is true
197197
Ffx=auto
198198

@@ -229,12 +229,12 @@ CreateHeaps=auto
229229
NetworkModel=auto
230230

231231
; Override path of libxess.dll
232-
; Example - D:\Downloads\Optiscaler\libxess.dll
232+
; Example - D:\Downloads\OptiScaler\libxess.dll
233233
; Default (auto) is same folder as mod dll
234234
LibraryPath=auto
235235

236236
; Override path of libxess_dx11.dll
237-
; Example - D:\Downloads\Optiscaler\libxess_dx11.dll
237+
; Example - D:\Downloads\OptiScaler\libxess_dx11.dll
238238
; Default (auto) is same folder as mod dll
239239
Dx11LibraryPath=auto
240240

@@ -327,7 +327,7 @@ FsrNonLinearPQ=auto
327327

328328
; Updates the DirectX 12 Agility SDK
329329
; Enabling the use of FSR4 on Windows 10 in older titles like Cyberpunk 2077
330-
; You MUST copy D3D12_Optiscaler folder next to games exe!
330+
; You MUST copy D3D12_OptiScaler folder next to games exe!
331331
; true or false - Default (auto) is false
332332
FsrAgilitySDKUpgrade=auto
333333

@@ -337,7 +337,7 @@ FsrAgilitySDKUpgrade=auto
337337
FfxDx12Path=auto
338338

339339
; Override path of amd_fidelityfx_vk.dll
340-
; Example - D:\Downloads\Optiscaler\amd_fidelityfx_vk.dll
340+
; Example - D:\Downloads\OptiScaler\amd_fidelityfx_vk.dll
341341
; Default (auto) is same folder as mod dll
342342
FfxVkPath=auto
343343

@@ -362,7 +362,7 @@ FeaturePath=auto
362362

363363

364364
; Override path of nvngx_dlss.dll
365-
; Example - D:\Downloads\Optiscaler\nvngx_dlss.dll
365+
; Example - D:\Downloads\OptiScaler\nvngx_dlss.dll
366366
; Default (auto) is means override disabled
367367
NVNGX_DLSS_Path=auto
368368

@@ -555,7 +555,7 @@ LoadAsiPlugins=auto
555555
LoadSpecialK=auto
556556

557557
; Loads Reshade64.dll from game's exe folder
558-
; Rename Reshade dll to ReShade64.dll, put next to Optiscaler and set to true
558+
; Rename Reshade dll to ReShade64.dll, put next to OptiScaler and set to true
559559
; true or false - Default (auto) is false
560560
LoadReshade=auto
561561

OptiScaler/hooks/HooksDx.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,11 @@ static HRESULT Present(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags
497497
return presentResult;
498498
}
499499

500+
// Tick feature to let it know if it's frozen
501+
if (auto currentFeature = State::Instance().currentFeature; currentFeature != nullptr)
502+
currentFeature->TickFrozenCheck();
503+
504+
// Draw overlay
500505
MenuOverlayDx::Present(pSwapChain, SyncInterval, Flags, pPresentParameters, pDevice, hWnd, isUWP);
501506

502507
if (State::Instance().activeFgType == OptiFG)

OptiScaler/hooks/HooksVk.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ static VkResult hkvkQueuePresentKHR(VkQueue queue, VkPresentInfoKHR* pPresentInf
173173

174174
State::Instance().swapchainApi = Vulkan;
175175

176+
// Tick feature to let it know if it's frozen
177+
if (auto currentFeature = State::Instance().currentFeature; currentFeature != nullptr)
178+
currentFeature->TickFrozenCheck();
179+
176180
// render menu if needed
177181
if (!MenuOverlayVk::QueuePresent(queue, pPresentInfo))
178182
{

0 commit comments

Comments
 (0)