summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2025-12-10 12:52:08 -0500
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2025-12-10 12:52:08 -0500
commit3e2542bfac7baa64594079ef57a29f01feadff33 (patch)
treeeca6fd7b8a65209efb0c1147aefe090f67fa74be /main.py
parent70027bd3d662807e19c587d13c8061e48760a4b5 (diff)
downloadDecky-Framegen-3e2542bfac7baa64594079ef57a29f01feadff33.tar.gz
Decky-Framegen-3e2542bfac7baa64594079ef57a29f01feadff33.zip
add override bundled fg dll to new sdk with ml option, only for rdna4 tho
Diffstat (limited to 'main.py')
-rw-r--r--main.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/main.py b/main.py
index 5b6b8e8..302f97d 100644
--- a/main.py
+++ b/main.py
@@ -10,6 +10,10 @@ from pathlib import Path
# Set to False or comment out this constant to skip the overwrite by default.
UPSCALER_OVERWRITE_ENABLED = True
+# Toggle to enable overwriting the framegen DLL from the static remote binary.
+# Set to False or comment out this constant to skip the overwrite by default.
+FRAMEGEN_OVERWRITE_ENABLED = True
+
INJECTOR_FILENAMES = [
"dxgi.dll",
"winmm.dll",
@@ -306,6 +310,24 @@ class Plugin:
except Exception as e:
decky.logger.error(f"Failed upscaler overwrite step: {e}")
+ decky.logger.info("Starting framegen DLL overwrite check")
+ # Optionally overwrite amd_fidelityfx_framegeneration_dx12.dll with a newer static binary
+ # Toggle via env DECKY_SKIP_FRAMEGEN_OVERWRITE=true to skip.
+ try:
+ skip_overwrite = os.environ.get("DECKY_SKIP_FRAMEGEN_OVERWRITE", "false").lower() in ("1", "true", "yes")
+ if FRAMEGEN_OVERWRITE_ENABLED and not skip_overwrite:
+ framegen_src = bin_path / "amd_fidelityfx_framegeneration_dx12.dll"
+ framegen_dst = extract_path / "amd_fidelityfx_framegeneration_dx12.dll"
+ if framegen_src.exists():
+ shutil.copy2(framegen_src, framegen_dst)
+ decky.logger.info("Overwrote amd_fidelityfx_framegeneration_dx12.dll with static remote binary")
+ else:
+ decky.logger.warning("amd_fidelityfx_framegeneration_dx12.dll not found in bin; skipping overwrite")
+ else:
+ decky.logger.info("Skipping framegen DLL overwrite due to DECKY_SKIP_FRAMEGEN_OVERWRITE")
+ except Exception as e:
+ decky.logger.error(f"Failed framegen overwrite step: {e}")
+
# Extract version from filename (e.g., OptiScaler_0.7.9.7z -> v0.7.9)
version_match = optiscaler_archive.name.replace('.7z', '')
if 'OptiScaler_' in version_match: