Skip to content

Commit a1f3965

Browse files
Martino FontanaSuperSamus
Martino Fontana
authored andcommitted
FSR: only set in Gamescope (remove Wine FSR)
Motivation: #2755
1 parent 0c07176 commit a1f3965

17 files changed

+35
-247
lines changed

bottles/backend/managers/manager.py

-1
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,6 @@ def get_programs(self, config: BottleConfig) -> List[dict]:
728728
"dxvk": _program.get("dxvk"),
729729
"vkd3d": _program.get("vkd3d"),
730730
"dxvk_nvapi": _program.get("dxvk_nvapi"),
731-
"fsr": _program.get("fsr"),
732731
"gamescope": _program.get("gamescope"),
733732
"pulseaudio_latency": _program.get("pulseaudio_latency"),
734733
"virtual_desktop": _program.get("virtual_desktop"),

bottles/backend/models/config.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ class BottleParams(DictCompatMixIn):
8888
gamescope_fullscreen: bool = True
8989
sync: str = "wine"
9090
fsr: bool = False
91-
fsr_sharpening_strength: int = 2
92-
fsr_quality_mode: str = "none"
91+
fsr_sharpening_strength: int = 8
9392
custom_dpi: int = 96
9493
renderer: str = "gl"
9594
discrete_gpu: bool = False

bottles/backend/models/samples.py

-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ class Samples:
4444
"ENABLE_VKBASALT": ("vkbasalt", True),
4545
"WINEESYNC": ("sync", "esync"),
4646
"WINEFSYNC": ("sync", "fsync"),
47-
"WINE_FULLSCREEN_FSR": ("fsr", True),
48-
"WINE_FULLSCREEN_FSR_STRENGTH": ("fsr_sharpening_strength", 2),
49-
"WINE_FULLSCREEN_FSR_MODE": ("fsr_quality_mode", "none"),
5047
"GAMESCOPE": ("gamescope", False),
5148
"DRI_PRIME": ("discrete_gpu", True),
5249
"__NV_PRIME_RENDER_OFFLOAD": ("discrete_gpu", True),

bottles/backend/wine/executor.py

-12
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def __init__(
3838
program_dxvk: Optional[bool] = None,
3939
program_vkd3d: Optional[bool] = None,
4040
program_nvapi: Optional[bool] = None,
41-
program_fsr: Optional[bool] = None,
4241
program_gamescope: Optional[bool] = None,
4342
program_virt_desktop: Optional[bool] = None,
4443
):
@@ -87,16 +86,6 @@ def __init__(
8786
override_nvapi = NVAPIComponent.get_override_keys() + "=b"
8887
env_dll_overrides.append(override_nvapi)
8988

90-
if program_fsr is not None and program_fsr != self.config.Parameters.fsr:
91-
self.environment["WINE_FULLSCREEN_FSR"] = "1" if program_fsr else "0"
92-
self.environment["WINE_FULLSCREEN_FSR_STRENGTH"] = str(
93-
self.config.Parameters.fsr_sharpening_strength
94-
)
95-
if self.config.Parameters.fsr_quality_mode:
96-
self.environment["WINE_FULLSCREEN_FSR_MODE"] = str(
97-
self.config.Parameters.fsr_quality_mode
98-
)
99-
10089
if (
10190
program_gamescope is not None
10291
and program_gamescope != self.config.Parameters.gamescope
@@ -127,7 +116,6 @@ def run_program(cls, config: BottleConfig, program: dict, terminal: bool = False
127116
program_dxvk=program.get("dxvk"),
128117
program_vkd3d=program.get("vkd3d"),
129118
program_nvapi=program.get("dxvk_nvapi"),
130-
program_fsr=program.get("fsr"),
131119
program_gamescope=program.get("gamescope"),
132120
program_virt_desktop=program.get("virtual_desktop"),
133121
).run()

bottles/backend/wine/winecommand.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,6 @@ def get_env(
383383
# if params["aco_compiler"]:
384384
# env.add("ACO_COMPILER", "aco")
385385

386-
# FSR
387-
if params.fsr:
388-
env.add("WINE_FULLSCREEN_FSR", "1")
389-
env.add("WINE_FULLSCREEN_FSR_STRENGTH", str(params.fsr_sharpening_strength))
390-
if params.fsr_quality_mode:
391-
env.add("WINE_FULLSCREEN_FSR_MODE", str(params.fsr_quality_mode))
392-
393386
# PulseAudio latency
394387
if params.pulseaudio_latency:
395388
env.add("PULSE_LATENCY_MSEC", "60")
@@ -622,10 +615,8 @@ def _get_gamescope_cmd(self, return_steam_cmd: bool = False) -> str:
622615
gamescope_cmd.append("-S integer")
623616
if params.fsr:
624617
gamescope_cmd.append("-F fsr")
625-
# Upscaling sharpness is from 0 to 20. There are 5 FSR upscaling levels,
626-
# so multiply by 4 to reach 20
627618
gamescope_cmd.append(
628-
f"--fsr-sharpness {params.fsr_sharpening_strength * 4}"
619+
f"--fsr-sharpness {params.fsr_sharpening_strength}"
629620
)
630621
if params.gamescope_fps > 0:
631622
gamescope_cmd.append(f"-r {params.gamescope_fps}")

bottles/frontend/cli/cli.py

-1
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,6 @@ def run_program(self):
673673
program.get("dxvk")
674674
program.get("vkd3d")
675675
program.get("dxvk_nvapi")
676-
program.get("fsr")
677676
program.get("gamescope")
678677
program.get("virtual_desktop")
679678

bottles/frontend/ui/bottles.gresource.xml

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
<file preprocess="xml-stripblanks">dialog-rename.ui</file>
4141
<file preprocess="xml-stripblanks">dialog-gamescope.ui</file>
4242
<file preprocess="xml-stripblanks">dialog-vkbasalt.ui</file>
43-
<file preprocess="xml-stripblanks">dialog-fsr.ui</file>
4443
<file preprocess="xml-stripblanks">dialog-mangohud.ui</file>
4544
<file preprocess="xml-stripblanks">dialog-display.ui</file>
4645
<file preprocess="xml-stripblanks">dialog-drives.ui</file>

bottles/frontend/ui/details-preferences.blp

-20
Original file line numberDiff line numberDiff line change
@@ -98,26 +98,6 @@ template $DetailsPreferences: Adw.PreferencesPage {
9898
}
9999
}
100100

101-
Adw.ActionRow {
102-
activatable-widget: switch_fsr;
103-
title: _("FidelityFX Super Resolution");
104-
subtitle: _("Increase performance at the expense of visuals. Only works on Vulkan.");
105-
106-
Button btn_manage_fsr {
107-
tooltip-text: _("Manage FidelityFX Super Resolution settings");
108-
valign: center;
109-
icon-name: "applications-system-symbolic";
110-
111-
styles [
112-
"flat",
113-
]
114-
}
115-
116-
Switch switch_fsr {
117-
valign: center;
118-
}
119-
}
120-
121101
Adw.ActionRow row_discrete {
122102
visible: false;
123103
activatable-widget: switch_discrete;

bottles/frontend/ui/dialog-fsr.blp

-63
This file was deleted.

bottles/frontend/ui/dialog-gamescope.blp

+27
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,33 @@ template $GamescopeDialog: Adw.Window {
107107
}
108108
}
109109

110+
Adw.PreferencesGroup {
111+
title: _("FSR");
112+
113+
Adw.ActionRow {
114+
title: _("Enable");
115+
activatable-widget: switch_fsr;
116+
117+
Switch switch_fsr {
118+
valign: center;
119+
}
120+
}
121+
122+
Adw.ActionRow {
123+
title: _("Sharpening Strength");
124+
125+
SpinButton {
126+
numeric: true;
127+
valign: center;
128+
129+
adjustment: Adjustment spin_sharpening_strength {
130+
step-increment: 4;
131+
upper: 20;
132+
};
133+
}
134+
}
135+
}
136+
110137
Adw.PreferencesGroup {
111138
title: _("Miscellaneous");
112139

bottles/frontend/ui/dialog-launch-options.blp

-9
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,6 @@ template $LaunchOptionsDialog: Adw.Window {
184184
}
185185
}
186186

187-
Adw.ActionRow action_fsr {
188-
activatable-widget: switch_fsr;
189-
title: "FSR";
190-
191-
Switch switch_fsr {
192-
valign: center;
193-
}
194-
}
195-
196187
Adw.ActionRow action_gamescope {
197188
title: _("Gamescope");
198189
activatable-widget: switch_gamescope;

bottles/frontend/ui/meson.build

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ blueprints = custom_target('blueprints',
2929
'dialog-vkbasalt.blp',
3030
'dialog-display.blp',
3131
'dialog-vmtouch.blp',
32-
'dialog-fsr.blp',
3332
'dialog-mangohud.blp',
3433
'dll-override-entry.blp',
3534
'drive-entry.blp',

bottles/frontend/views/bottle_preferences.py

-18
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
from bottles.frontend.windows.drives import DrivesDialog
4949
from bottles.frontend.windows.envvars import EnvVarsDialog
5050
from bottles.frontend.windows.exclusionpatterns import ExclusionPatternsDialog
51-
from bottles.frontend.windows.fsr import FsrDialog
5251
from bottles.frontend.windows.gamescope import GamescopeDialog
5352
from bottles.frontend.windows.mangohud import MangoHudDialog
5453
from bottles.frontend.windows.protonalert import ProtonAlertDialog
@@ -67,7 +66,6 @@ class PreferencesView(Adw.PreferencesPage):
6766
# region Widgets
6867
btn_manage_gamescope = Gtk.Template.Child()
6968
btn_manage_vkbasalt = Gtk.Template.Child()
70-
btn_manage_fsr = Gtk.Template.Child()
7169
btn_manage_mangohud = Gtk.Template.Child()
7270
btn_manage_sandbox = Gtk.Template.Child()
7371
btn_manage_versioning_patterns = Gtk.Template.Child()
@@ -90,7 +88,6 @@ class PreferencesView(Adw.PreferencesPage):
9088
switch_mangohud = Gtk.Template.Child()
9189
switch_obsvkc = Gtk.Template.Child()
9290
switch_vkbasalt = Gtk.Template.Child()
93-
switch_fsr = Gtk.Template.Child()
9491
switch_nvapi = Gtk.Template.Child()
9592
switch_gamemode = Gtk.Template.Child()
9693
switch_gamescope = Gtk.Template.Child()
@@ -146,7 +143,6 @@ def __init__(self, details, config, **kwargs):
146143
self.row_manage_display.connect("activated", self.__show_display_settings)
147144
self.btn_manage_gamescope.connect("clicked", self.__show_gamescope_settings)
148145
self.btn_manage_vkbasalt.connect("clicked", self.__show_vkbasalt_settings)
149-
self.btn_manage_fsr.connect("clicked", self.__show_fsr_settings)
150146
self.btn_manage_mangohud.connect("clicked", self.__show_mangohud_settings)
151147
self.btn_manage_sandbox.connect("clicked", self.__show_sandbox_settings)
152148
self.btn_manage_versioning_patterns.connect(
@@ -158,7 +154,6 @@ def __init__(self, details, config, **kwargs):
158154
self.switch_mangohud.connect("state-set", self.__toggle_mangohud)
159155
self.switch_obsvkc.connect("state-set", self.__toggle_obsvkc)
160156
self.switch_vkbasalt.connect("state-set", self.__toggle_vkbasalt)
161-
self.switch_fsr.connect("state-set", self.__toggle_fsr)
162157
self.switch_nvapi.connect("state-set", self.__toggle_nvapi)
163158
# self.switch_latencyflex.connect('state-set', self.__toggle_latencyflex)
164159
self.switch_gamemode.connect("state-set", self.__toggle_gamemode)
@@ -414,7 +409,6 @@ def set_config(self, config: BottleConfig):
414409
self.switch_mangohud.handler_block_by_func(self.__toggle_mangohud)
415410
self.switch_nvapi.handler_block_by_func(self.__toggle_nvapi)
416411
self.switch_vkbasalt.handler_block_by_func(self.__toggle_vkbasalt)
417-
self.switch_fsr.handler_block_by_func(self.__toggle_fsr)
418412
self.switch_obsvkc.handler_block_by_func(self.__toggle_obsvkc)
419413
self.switch_gamemode.handler_block_by_func(self.__toggle_gamemode)
420414
self.switch_gamescope.handler_block_by_func(self.__toggle_gamescope)
@@ -440,7 +434,6 @@ def set_config(self, config: BottleConfig):
440434
self.switch_mangohud.set_active(parameters.mangohud)
441435
self.switch_obsvkc.set_active(parameters.obsvkc)
442436
self.switch_vkbasalt.set_active(parameters.vkbasalt)
443-
self.switch_fsr.set_active(parameters.fsr)
444437
self.switch_nvapi.set_active(parameters.dxvk_nvapi)
445438
self.switch_gamemode.set_active(parameters.gamemode)
446439
self.switch_gamescope.set_active(parameters.gamescope)
@@ -552,7 +545,6 @@ def set_config(self, config: BottleConfig):
552545
self.switch_mangohud.handler_unblock_by_func(self.__toggle_mangohud)
553546
self.switch_nvapi.handler_unblock_by_func(self.__toggle_nvapi)
554547
self.switch_vkbasalt.handler_unblock_by_func(self.__toggle_vkbasalt)
555-
self.switch_fsr.handler_unblock_by_func(self.__toggle_fsr)
556548
self.switch_obsvkc.handler_unblock_by_func(self.__toggle_obsvkc)
557549
self.switch_gamemode.handler_unblock_by_func(self.__toggle_gamemode)
558550
self.switch_gamescope.handler_unblock_by_func(self.__toggle_gamescope)
@@ -590,10 +582,6 @@ def __show_vkbasalt_settings(self, widget):
590582
new_window = VkBasaltDialog(parent_window=self.window, config=self.config)
591583
new_window.present()
592584

593-
def __show_fsr_settings(self, widget):
594-
new_window = FsrDialog(parent_window=self.window, config=self.config)
595-
new_window.present()
596-
597585
def __show_mangohud_settings(self, widget):
598586
new_window = MangoHudDialog(parent_window=self.window, config=self.config)
599587
new_window.present()
@@ -669,12 +657,6 @@ def __toggle_vkbasalt(self, widget, state):
669657
config=self.config, key="vkbasalt", value=state, scope="Parameters"
670658
).data["config"]
671659

672-
def __toggle_fsr(self, widget, state):
673-
"""Toggle the FSR for current bottle"""
674-
self.config = self.manager.update_config(
675-
config=self.config, key="fsr", value=state, scope="Parameters"
676-
).data["config"]
677-
678660
def __toggle_nvapi(self, widget=False, state=False):
679661
"""Install/Uninstall NVAPI from the bottle"""
680662
self.queue.add_task()

0 commit comments

Comments
 (0)