From 94e66ebfded85c7ec68c1bfb44650b5d18afae44 Mon Sep 17 00:00:00 2001 From: codexx-dev Date: Thu, 19 Nov 2026 21:59:05 -0300 Subject: [PATCH] Leave the setup's AMD FSR box unticked when no display adapter could be listed A player whose adapter query fails no longer downloads AMD's FSR libraries (about 36 MB) by default; the box starts ticked only where an AMD adapter is listed. Co-Authored-By: Claude Opus 5.5 --- installer/guilogic.py | 9 ++++----- tests/installer_gui_test.py | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/installer/guilogic.py b/installer/guilogic.py index f0691213..1c7df8b2 100644 --- a/installer/guilogic.py +++ b/installer/guilogic.py @@ -131,11 +131,10 @@ def amount(cat, done, total, unit): # ---- the form ---------------------------------------------------------------------------------------------------- def fsr_default(adapters): - """Whether the window ticks Download AMD FSR at start: with an AMD display adapter among adapters (their names, - screens.windows_adapter_names), and when none could be listed, as before. The step downloads on any GPU when - ticked (steps.Fsr); unticked by default on other GPUs, their players only download it when they choose to.""" - if not adapters: - return True + """Whether the window ticks Download AMD FSR at start: only with an AMD display adapter among adapters (their + names, screens.windows_adapter_names). The step downloads on any GPU when ticked (steps.Fsr); on other GPUs, and + when no adapter could be listed, the box starts unticked, so a player without an AMD GPU never downloads AMD's + libraries (about 36 MB) without choosing to.""" return any('AMD' in a.upper() or 'RADEON' in a.upper() for a in adapters) diff --git a/tests/installer_gui_test.py b/tests/installer_gui_test.py index 4abb0804..7ceae7de 100644 --- a/tests/installer_gui_test.py +++ b/tests/installer_gui_test.py @@ -183,7 +183,8 @@ class RunStatesTest(unittest.TestCase): class FsrDefaultTest(unittest.TestCase): - """Download AMD FSR is ticked at start with an AMD adapter only, and when no adapter could be listed.""" + """Download AMD FSR is ticked at start with an AMD adapter only: not with other GPUs, nor when no adapter could be + listed.""" def test_amd(self): self.assertTrue(fsr_default(['AMD Radeon RX 9060 XT'])) @@ -194,7 +195,7 @@ class FsrDefaultTest(unittest.TestCase): self.assertFalse(fsr_default(['Intel(R) Arc(TM) A770 Graphics', 'Microsoft Basic Render Driver'])) def test_unknown(self): - self.assertTrue(fsr_default([])) + self.assertFalse(fsr_default([])) class FormTest(unittest.TestCase):