From 1685705f33c1b05a44e6b77d622763559674553b Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Fri, 20 Mar 2026 13:29:25 -0400 Subject: fix: bump to 0.15.0 and avoid OptiScaler font assert --- README.md | 4 ++-- defaults/assets/fgmod.sh | 4 ++++ main.py | 34 +++++++++++++++++++++++++++++++--- package.json | 12 ++++++------ 4 files changed, 43 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d188cd3..54d2d1d 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ This plugin uses OptiScaler to replace DLSS calls with FSR3/FSR3.1, giving you: - Run the game at least once to make the uninstaller script run. After you can leave the launch option or remove it ### Configuring OptiScaler via Environment Variables -Starting v0.14.0, you can update OptiScaler settings before a game launches by adding environment variables. +Starting v0.15.0, you can update OptiScaler settings before a game launches by adding environment variables. This is useful if you plan to use the same settings across multiple games so they are pre-configured by the time you launch them. For example, considering the following sample from the OptiScaler.ini config file: @@ -78,7 +78,7 @@ Dx12Upscaler=fsr31 ~/fgmod/fgmod %command% ## Technical Details ### What's Included -- **[OptiScaler_v0.7.9](https://github.com/optiscaler/OptiScaler/releases/tag/v0.7.9)**: Latest bleeding-edge build (as of writing), with new features such as OptiFG for adding FG to games without any FG (highly experimental) +- **[OptiScaler 0.9.0-pre11](https://github.com/xXJSONDeruloXx/OptiScaler-Bleeding-Edge/releases/tag/opti-9-pre-11)**: Bleeding-edge OptiScaler bundle used by this plugin, paired with the RDNA2-optimized `amd_fidelityfx_upscaler_dx12.dll` override for Steam Deck compatibility - **Nukem9's DLSSG to FSR3 mod**: Allows use of DLSS inputs for FSR frame gen outputs, and xess or FSR upscaling outputs - **FakeNVAPI**: NVIDIA API emulation for AMD/Intel GPUs, to make DLSS options selectable in game - **Supporting Libraries**: All required DX12/Vulkan libraries (libxess.dll, amd_fidelityfx, etc.) diff --git a/defaults/assets/fgmod.sh b/defaults/assets/fgmod.sh index 37f8946..fa36558 100755 --- a/defaults/assets/fgmod.sh +++ b/defaults/assets/fgmod.sh @@ -133,6 +133,10 @@ if [[ -f "$fgmod_path/update-optiscaler-config.py" ]]; then python "$fgmod_path/update-optiscaler-config.py" "$exe_folder_path/OptiScaler.ini" fi +# OptiScaler 0.9.0-pre11 can assert on Proton when HQ font auto mode tries to load +# an external TTF that is not present. Only normalize the default auto value. +sed -i 's/^UseHQFont[[:space:]]*=[[:space:]]*auto$/UseHQFont=false/' "$exe_folder_path/OptiScaler.ini" || true + # === ASI Plugins Directory === if [[ -d "$fgmod_path/plugins" ]]; then echo "🔌 Installing ASI plugins directory" diff --git a/main.py b/main.py index 1e45149..ddee8ba 100644 --- a/main.py +++ b/main.py @@ -128,8 +128,29 @@ class Plugin: decky.logger.error(f"Failed to copy launcher scripts: {e}") return False + def _disable_hq_font_auto(self, ini_file): + """Disable the new HQ font auto mode to avoid missing font assertions on Wine/Proton.""" + try: + if not ini_file.exists(): + decky.logger.warning(f"OptiScaler.ini not found at {ini_file}") + return False + + with open(ini_file, 'r') as f: + content = f.read() + + updated_content = re.sub(r'UseHQFont\s*=\s*auto', 'UseHQFont=false', content) + if updated_content != content: + with open(ini_file, 'w') as f: + f.write(updated_content) + decky.logger.info("Set UseHQFont=false to avoid missing font assertions") + + return True + except Exception as e: + decky.logger.error(f"Failed to update HQ font setting in OptiScaler.ini: {e}") + return False + def _modify_optiscaler_ini(self, ini_file): - """Modify OptiScaler.ini to set FGType=nukems, Fsr4Update=true, and ASI plugin settings""" + """Modify OptiScaler.ini to set FG defaults, ASI plugin settings, and safe font defaults.""" try: if ini_file.exists(): with open(ini_file, 'r') as f: @@ -146,11 +167,14 @@ class Plugin: # Replace Path=auto with Path=plugins updated_content = re.sub(r'Path\s*=\s*auto', 'Path=plugins', updated_content) + + # Disable new HQ font auto mode to avoid missing font assertions on Proton + updated_content = re.sub(r'UseHQFont\s*=\s*auto', 'UseHQFont=false', updated_content) with open(ini_file, 'w') as f: f.write(updated_content) - decky.logger.info("Modified OptiScaler.ini to set FGType=nukems, Fsr4Update=true, LoadAsiPlugins=true, Path=plugins") + decky.logger.info("Modified OptiScaler.ini to set FGType=nukems, Fsr4Update=true, LoadAsiPlugins=true, Path=plugins, UseHQFont=false") return True else: decky.logger.warning(f"OptiScaler.ini not found at {ini_file}") @@ -297,7 +321,8 @@ class Plugin: decky.logger.error(f"Failed to setup ASI plugins directory: {e}") decky.logger.info("Starting upscaler DLL overwrite check") - # Optionally overwrite amd_fidelityfx_upscaler_dx12.dll with a newer static binary + # Optionally overwrite amd_fidelityfx_upscaler_dx12.dll with the separately bundled + # RDNA2-optimized static binary used for Steam Deck compatibility. # 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") @@ -513,6 +538,9 @@ class Plugin: else: decky.logger.warning("No OptiScaler.ini found to copy") + if target_ini.exists(): + self._disable_hq_font_auto(target_ini) + plugins_src = fgmod_path / "plugins" plugins_dest = directory / "plugins" if plugins_src.exists(): diff --git a/package.json b/package.json index 8cb64f0..26cba90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "decky-framegen", - "version": "0.14.0", + "version": "0.15.0", "description": "This plugin installs and manages OptiScaler, a tool that enhances upscaling and enables frame generation in a range of DirectX 12 games.", "type": "module", "scripts": { @@ -53,13 +53,13 @@ "remote_binary": [ { - "sha256hash": "1ebf2473cd8879b63fb773b76f169a75f35a7db1021820be1049a48c8b88694b", - "url": "https://github.com/xXJSONDeruloXx/OptiScaler-Bleeding-Edge/releases/download/OptiScaler_v0.9.0_pre_6/Optiscaler_0.9.0-pre6.20251205.7z", - "name": "Optiscaler_0.9.0-pre6.20251205.7z" + "sha256hash": "d30d98b9f58e340b8dcd5aa93fc59432e803e071cd6b207d55acc667685d79dc", + "url": "https://github.com/xXJSONDeruloXx/OptiScaler-Bleeding-Edge/releases/download/opti-9-pre-11/Optiscaler_0.9.0-pre11.20260311._RC4.5.7z", + "name": "Optiscaler_0.9.0-pre11.20260311._RC4.5.7z" }, { - "sha256hash": "9123f83739e7bb39fcb135cafc339606dec78a74c650338ad275ee45c2d59d02", - "url": "https://github.com/xXJSONDeruloXx/OptiScaler-Bleeding-Edge/releases/download/amd-fsr-r-int8/amd_fidelityfx_upscaler_dx12.dll", + "sha256hash": "2604c0b392072d715b400b2f89434274de31995a4b6e68ce38250ebbd3f6c5fc", + "url": "https://github.com/xXJSONDeruloXx/OptiScaler-Bleeding-Edge/releases/download/opti-9-pre-11/amd_fidelityfx_upscaler_dx12.dll", "name": "amd_fidelityfx_upscaler_dx12.dll" }, { -- cgit v1.2.3