Skip to content

Commit a43311d

Browse files
committed
Added an extra input box to the gamescope popup to facilitate advanced gamescope flags
1 parent 8875b2b commit a43311d

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

Diff for: bottles/backend/models/config.py

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class BottleParams(DictCompatMixIn):
8787
gamescope_scaling: bool = False
8888
gamescope_borderless: bool = False
8989
gamescope_fullscreen: bool = True
90+
gamescope_advanced: str = ""
9091
sync: str = "wine"
9192
fsr: bool = False
9293
fsr_sharpening_strength: int = 2

Diff for: bottles/backend/wine/winecommand.py

+2
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,8 @@ def _get_gamescope_cmd(self, return_steam_cmd: bool = False) -> str:
640640
gamescope_cmd.append(f"-W {params.gamescope_window_width}")
641641
if params.gamescope_window_height > 0:
642642
gamescope_cmd.append(f"-H {params.gamescope_window_height}")
643+
if params.gamescope_advanced:
644+
gamescope_cmd.append(params.gamescope_advanced)
643645

644646
return " ".join(gamescope_cmd)
645647

Diff for: bottles/frontend/gamescope-dialog.blp

+9
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,15 @@ template $GamescopeDialog: Adw.Window {
168168
}
169169
}
170170
}
171+
172+
Adw.PreferencesGroup {
173+
title: _("Advanced Settings");
174+
description: _("Additional Gamescope flags to be appended.");
175+
Adw.EntryRow advanced_options {
176+
title: _("flags");
177+
show-apply-button: false;
178+
}
179+
}
171180
}
172181
}
173182
}

Diff for: bottles/frontend/gamescope_dialog.py

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class GamescopeDialog(Adw.Window):
3232
switch_scaling = Gtk.Template.Child()
3333
toggle_borderless = Gtk.Template.Child()
3434
toggle_fullscreen = Gtk.Template.Child()
35+
advanced_options = Gtk.Template.Child()
3536
btn_save = Gtk.Template.Child()
3637
btn_cancel = Gtk.Template.Child()
3738

@@ -83,6 +84,8 @@ def __update(self, config):
8384

8485
self.toggle_borderless.handler_unblock_by_func(self.__change_wtype)
8586
self.toggle_fullscreen.handler_unblock_by_func(self.__change_wtype)
87+
88+
self.advanced_options.set_text(parameters.gamescope_advanced)
8689

8790
def __idle_save(self, *_args):
8891
settings = {
@@ -95,6 +98,7 @@ def __idle_save(self, *_args):
9598
"gamescope_scaling": self.switch_scaling.get_active(),
9699
"gamescope_borderless": self.toggle_borderless.get_active(),
97100
"gamescope_fullscreen": self.toggle_fullscreen.get_active(),
101+
"gamescope_advanced": self.advanced_options.get_text(),
98102
}
99103

100104
for setting in settings.keys():

0 commit comments

Comments
 (0)