summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2025-09-22 21:33:58 -0400
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2025-09-22 21:33:58 -0400
commit22bb3bf888289c474ae80d65ea245d6bf3b221e9 (patch)
tree1e40ebcf96c5d4d4c82d7751b0a12e5894d6dc9a
parent7f5df2da22d0016b26d87a4adb89204660a47630 (diff)
downloadDecky-Framegen-22bb3bf888289c474ae80d65ea245d6bf3b221e9.tar.gz
Decky-Framegen-22bb3bf888289c474ae80d65ea245d6bf3b221e9.zip
feat: fsr4 override with separate bin, so I can link to unmodified opti 7z going forward
-rw-r--r--main.py21
-rw-r--r--package.json5
2 files changed, 26 insertions, 0 deletions
diff --git a/main.py b/main.py
index b0352dd..8c4bd5e 100644
--- a/main.py
+++ b/main.py
@@ -6,6 +6,10 @@ import shutil
import re
from pathlib import Path
+# Toggle to enable overwriting the upscaler DLL from the static remote binary.
+# Set to False or comment out this constant to skip the overwrite by default.
+UPSCALER_OVERWRITE_ENABLED = True
+
class Plugin:
async def _main(self):
decky.logger.info("Framegen plugin loaded")
@@ -174,6 +178,23 @@ class Plugin:
# Copy launcher scripts from assets
assets_dir = Path(decky.DECKY_PLUGIN_DIR) / "assets"
self._copy_launcher_scripts(assets_dir, extract_path)
+
+ # Optionally overwrite amd_fidelityfx_upscaler_dx12.dll with a newer static binary
+ # Toggle via env DECKY_SKIP_UPSCALER_OVERWRITE=true to skip.
+ try:
+ skip_overwrite = os.environ.get("DECKY_SKIP_UPSCALER_OVERWRITE", "false").lower() in ("1", "true", "yes")
+ if UPSCALER_OVERWRITE_ENABLED and not skip_overwrite:
+ upscaler_src = bin_path / "amd_fidelityfx_upscaler_dx12.dll"
+ upscaler_dst = extract_path / "amd_fidelityfx_upscaler_dx12.dll"
+ if upscaler_src.exists():
+ shutil.copy2(upscaler_src, upscaler_dst)
+ decky.logger.info("Overwrote amd_fidelityfx_upscaler_dx12.dll with static remote binary")
+ else:
+ decky.logger.warning("amd_fidelityfx_upscaler_dx12.dll not found in bin; skipping overwrite")
+ else:
+ decky.logger.info("Skipping upscaler DLL overwrite due to DECKY_SKIP_UPSCALER_OVERWRITE")
+ except Exception as e:
+ decky.logger.error(f"Failed upscaler overwrite step: {e}")
# Extract version from filename (e.g., OptiScaler_0.7.9.7z -> v0.7.9)
version_match = optiscaler_archive.name.replace('.7z', '')
diff --git a/package.json b/package.json
index 7449239..e5152c0 100644
--- a/package.json
+++ b/package.json
@@ -58,6 +58,11 @@
"name": "OptiScaler_0.7.9.7z"
},
{
+ "sha256hash": "9123f83739e7bb39fcb135cafc339606dec78a74c650338ad275ee45c2d59d02",
+ "url": "https://github.com/xXJSONDeruloXx/OptiScaler-Bleeding-Edge/releases/download/amd-fsr-r-int8/amd_fidelityfx_upscaler_dx12.dll",
+ "name": "amd_fidelityfx_upscaler_dx12.dll"
+ },
+ {
"sha256hash": "806020c0444f7841a3a9f661295c16fc482e981e0666d0b9624bf6ccd19c4b5e",
"url": "https://github.com/xXJSONDeruloXx/OptiScaler-Bleeding-Edge/releases/download/dlss-enabler-dlssg-september-20/dlssg_to_fsr3_amd_is_better.dll",
"name": "dlssg_to_fsr3_amd_is_better.dll"