mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-11-20 16:19:19 +01:00
Added check to prevent proton being added to chrome shortcuts
This commit is contained in:
parent
a2ab295454
commit
f22f52188e
@ -263,12 +263,14 @@ def is_match(name1, name2):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
# Add or update the proton compatibility settings
|
# Add or update the proton compatibility settings
|
||||||
def add_compat_tool(app_id):
|
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 str(app_id) in config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping'] and config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping'][str(app_id)]['name'] == f'{compat_tool_name}':
|
if str(app_id) in config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping'] and config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping'][str(app_id)]['name'] == f'{compat_tool_name}':
|
||||||
return False
|
return False
|
||||||
|
if 'chrome' in launchoptions
|
||||||
|
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']:
|
||||||
config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping'][str(app_id)]['name'] = f'{compat_tool_name}'
|
config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping'][str(app_id)]['name'] = f'{compat_tool_name}'
|
||||||
config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping'][str(app_id)]['config'] = ''
|
config_data['InstallConfigStore']['Software']['Valve']['Steam']['CompatToolMapping'][str(app_id)]['config'] = ''
|
||||||
@ -318,7 +320,7 @@ def create_new_entry(shortcutdirectory, appname, launchoptions, startingdir):
|
|||||||
# Check if the game already exists in the shortcuts
|
# Check if the game already exists in the shortcuts
|
||||||
if check_if_shortcut_exists(signed_shortcut_id, appname, exe_path, startingdir, launchoptions):
|
if check_if_shortcut_exists(signed_shortcut_id, appname, exe_path, startingdir, launchoptions):
|
||||||
# Check if proton needs applying or updating
|
# Check if proton needs applying or updating
|
||||||
if add_compat_tool(unsigned_shortcut_id):
|
if add_compat_tool(unsigned_shortcut_id, launchoptions):
|
||||||
shortcuts_updated = True
|
shortcuts_updated = True
|
||||||
return
|
return
|
||||||
#Get artwork
|
#Get artwork
|
||||||
@ -340,7 +342,7 @@ def create_new_entry(shortcutdirectory, appname, launchoptions, startingdir):
|
|||||||
print(f"Added new entry for {appname} to shortcuts.")
|
print(f"Added new entry for {appname} to shortcuts.")
|
||||||
new_shortcuts_added = True
|
new_shortcuts_added = True
|
||||||
created_shortcuts.append(appname)
|
created_shortcuts.append(appname)
|
||||||
add_compat_tool(unsigned_shortcut_id)
|
add_compat_tool(unsigned_shortcut_id, launchoptions)
|
||||||
|
|
||||||
|
|
||||||
create_new_entry(os.environ.get('epicshortcutdirectory'), 'Epic Games', os.environ.get('epiclaunchoptions'), os.environ.get('epicstartingdir'))
|
create_new_entry(os.environ.get('epicshortcutdirectory'), 'Epic Games', os.environ.get('epiclaunchoptions'), os.environ.get('epicstartingdir'))
|
||||||
|
Loading…
Reference in New Issue
Block a user