From c240d63ceda632c22ea6787ab771f4e798c22a54 Mon Sep 17 00:00:00 2001 From: K900 Date: Sun, 5 Nov 2023 22:28:39 +0300 Subject: [PATCH] heroic: fix infinite loop when starting some games --- pkgs/games/heroic/default.nix | 3 +++ pkgs/games/heroic/fix-infinite-loop.patch | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/games/heroic/fix-infinite-loop.patch diff --git a/pkgs/games/heroic/default.nix b/pkgs/games/heroic/default.nix index 079ec4976604..65ff3b90403f 100644 --- a/pkgs/games/heroic/default.nix +++ b/pkgs/games/heroic/default.nix @@ -45,6 +45,9 @@ in stdenv.mkDerivation rec { ./remove-drm-support.patch # Make Heroic create Steam shortcuts (to non-steam games) with the correct path to heroic. ./fix-non-steam-shortcuts.patch + # Fix reg add infinite loop + # Submitted upstream: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/pull/3210 + ./fix-infinite-loop.patch ]; postPatch = '' diff --git a/pkgs/games/heroic/fix-infinite-loop.patch b/pkgs/games/heroic/fix-infinite-loop.patch new file mode 100644 index 000000000000..99aae02c3a1a --- /dev/null +++ b/pkgs/games/heroic/fix-infinite-loop.patch @@ -0,0 +1,23 @@ +From b698779053b7ba31bd8e69b230e86515e3019bf6 Mon Sep 17 00:00:00 2001 +From: K900 +Date: Sun, 5 Nov 2023 22:04:32 +0300 +Subject: [PATCH] Force add the registry entry + +Otherwise, newer Wine versions will prompt to overwrite it and loop there forever. +--- + src/backend/storeManagers/legendary/setup.ts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/backend/storeManagers/legendary/setup.ts b/src/backend/storeManagers/legendary/setup.ts +index 1837106621..b5c2432435 100644 +--- a/src/backend/storeManagers/legendary/setup.ts ++++ b/src/backend/storeManagers/legendary/setup.ts +@@ -20,7 +20,7 @@ export const legendarySetup = async (appName: string) => { + + // Fixes games like Fallout New Vegas and Dishonored: Death of the Outsider + await runWineCommandOnGame(appName, { +- commandParts: ['reg', 'add', 'HKEY_CLASSES_ROOT\\com.epicgames.launcher'], ++ commandParts: ['reg', 'add', 'HKEY_CLASSES_ROOT\\com.epicgames.launcher', '/f'], + wait: true, + protonVerb: 'waitforexitandrun' + })