Skip to content

Commit

Permalink
make ruff happy
Browse files Browse the repository at this point in the history
  • Loading branch information
GloriousEggroll committed Oct 12, 2024
1 parent fd25425 commit effbda2
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion util.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,20 @@ def set_cpu_topology_limit(core_limit: int, ignore_user_setting: bool = False) -
return set_cpu_topology(core_limit, ignore_user_setting)

def set_game_drive(enabled: bool) -> None:
"""
Enable or disable the game drive setting.
This function modifies the `compat_config` to include or exclude
the "gamedrive" option based on the `enabled` parameter.
Parameters:
enabled (bool): If True, add "gamedrive" to `compat_config`.
If False, remove "gamedrive" from `compat_config`.
Returns:
None
"""
if enabled:
protonmain.g_session.compat_config.add("gamedrive")
protonmain.setup_game_dir_drive()
else:
protonmain.g_session.compat_config.discard("gamedrive")

0 comments on commit effbda2

Please sign in to comment.