Skip to content

Commit

Permalink
combined check
Browse files Browse the repository at this point in the history
  • Loading branch information
moraroy authored Nov 8, 2024
1 parent 73d386d commit a8f9c19
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions NSLGameScanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ def add_compat_tool(app_id, launchoptions):
if 'CompatToolMapping' not in config_data['InstallConfigStore']['Software']['Valve']['Steam']:
config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping'] = {}
print(f"CompatToolMapping key not found in config.vdf, creating.")
if 'chrome' in launchoptions:
return False

if 'PROTONPATH' in launchoptions:
print("PROTONPATH found in launch options. Skipping compatibility tool update.")

# Combine checks for 'chrome' and 'PROTONPATH'
if 'chrome' in launchoptions or 'PROTONPATH' in launchoptions:
if 'PROTONPATH' in launchoptions:
print("PROTONPATH found in launch options. Skipping compatibility tool update.")
return False

elif str(app_id) in config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping']:
Expand All @@ -403,6 +403,7 @@ def add_compat_tool(app_id, launchoptions):
print(f"Created new CompatToolMapping entry for appid: {app_id}")
return compat_tool_name


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
if any(s.get('appid') == shortcut_id for s in shortcuts['shortcuts'].values()):
Expand Down

0 comments on commit a8f9c19

Please sign in to comment.