mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-11-20 08:09:18 +01:00
combined check
This commit is contained in:
parent
73d386d0ff
commit
a8f9c19cfb
@ -381,11 +381,11 @@ def add_compat_tool(app_id, launchoptions):
|
|||||||
if 'CompatToolMapping' not in config_data['InstallConfigStore']['Software']['Valve']['Steam']:
|
if 'CompatToolMapping' not in config_data['InstallConfigStore']['Software']['Valve']['Steam']:
|
||||||
config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping'] = {}
|
config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping'] = {}
|
||||||
print(f"CompatToolMapping key not found in config.vdf, creating.")
|
print(f"CompatToolMapping key not found in config.vdf, creating.")
|
||||||
if 'chrome' in launchoptions:
|
|
||||||
return False
|
|
||||||
|
|
||||||
if 'PROTONPATH' in launchoptions:
|
# Combine checks for 'chrome' and 'PROTONPATH'
|
||||||
print("PROTONPATH found in launch options. Skipping compatibility tool update.")
|
if 'chrome' in launchoptions or 'PROTONPATH' in launchoptions:
|
||||||
|
if 'PROTONPATH' in launchoptions:
|
||||||
|
print("PROTONPATH found in launch options. Skipping compatibility tool update.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
elif str(app_id) in config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping']:
|
elif str(app_id) in config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping']:
|
||||||
@ -403,6 +403,7 @@ def add_compat_tool(app_id, launchoptions):
|
|||||||
print(f"Created new CompatToolMapping entry for appid: {app_id}")
|
print(f"Created new CompatToolMapping entry for appid: {app_id}")
|
||||||
return compat_tool_name
|
return compat_tool_name
|
||||||
|
|
||||||
|
|
||||||
def check_if_shortcut_exists(shortcut_id, display_name, exe_path, start_dir, launch_options):
|
def check_if_shortcut_exists(shortcut_id, display_name, exe_path, start_dir, launch_options):
|
||||||
# Check if the game already exists in the shortcuts using the id
|
# Check if the game already exists in the shortcuts using the id
|
||||||
if any(s.get('appid') == shortcut_id for s in shortcuts['shortcuts'].values()):
|
if any(s.get('appid') == shortcut_id for s in shortcuts['shortcuts'].values()):
|
||||||
|
Loading…
Reference in New Issue
Block a user