From 7abec728c5008f06bb82dcf9a986088b65138140 Mon Sep 17 00:00:00 2001 From: Ramen2X <64166386+Ramen2X@users.noreply.github.com> Date: Wed, 9 Dec 2020 00:49:28 -0500 Subject: [PATCH] Use diskpath for finding game directory --- Rebuilder/MusicInjector.cs | 2 -- Rebuilder/Rebuilder.cs | 47 ++------------------------------------ 2 files changed, 2 insertions(+), 47 deletions(-) diff --git a/Rebuilder/MusicInjector.cs b/Rebuilder/MusicInjector.cs index 08312d0..4f12432 100644 --- a/Rebuilder/MusicInjector.cs +++ b/Rebuilder/MusicInjector.cs @@ -106,8 +106,6 @@ namespace Rebuilder // Test standard directories List test_dirs = new List(); - test_dirs.AddRange(Rebuilder.standard_hdd_dirs); - // Check registry for CD path { string p = Rebuilder.GetRegistryEntry("diskpath"); diff --git a/Rebuilder/Rebuilder.cs b/Rebuilder/Rebuilder.cs index 3c06b2e..d67aa6f 100644 --- a/Rebuilder/Rebuilder.cs +++ b/Rebuilder/Rebuilder.cs @@ -39,42 +39,7 @@ namespace Rebuilder "8DFD3E5FDDE8C95C61013069795171163C9A4821", "47EE50FC1EC5F6C54F465EB296D2F1B7CA25D5D2" }; - - public static string[] standard_hdd_dirs = { //TODO: Find these installation directory strings programmatically - "C:/Program Files (x86)/LEGO Island", - "C:/Program Files/LEGO Island", - "/Program Files (x86)/LEGO Island", - "/Program Files/LEGO Island", - "C:/Program Files (x86)/LEGO Insel", - "C:/Program Files/LEGO Insel", - "/Program Files (x86)/LEGO Insel", - "/Program Files/LEGO Insel", - "C:/Program Files (x86)/LEGO Øen", - "C:/Program Files/LEGO Øen", - "/Program Files (x86)/LEGO Øen", - "/Program Files/LEGO Øen", - "C:/Program Files (x86)/レゴアイランド", - "C:/Program Files/レゴアイランド", - "/Program Files (x86)/レゴアイランド", - "/Program Files/レゴアイランド", - "C:/Program Files (x86)/LEGO Isola", - "C:/Program Files/LEGO Isola", - "/Program Files (x86)/LEGO Isola", - "/Program Files/LEGO Isola", - "C:/Program Files (x86)/A Ilha Lego", - "C:/Program Files/A Ilha Lego", - "/Program Files (x86)/A Ilha Lego", - "/Program Files/A Ilha Lego", - "C:/Program Files (x86)/Aventures sur l'Ile LEGO", - "C:/Program Files/Aventures sur l'Ile LEGO", - "/Program Files (x86)/Aventures sur l'Ile LEGO", - "/Program Files/Aventures sur l'Ile LEGO", - "C:/Program Files (x86)/La Isla LEGO", - "C:/Program Files/La Isla LEGO", - "/Program Files (x86)/La Isla LEGO", - "/Program Files/La Isla LEGO" - }; - + public enum FPSLimitType { Default, @@ -1101,16 +1066,8 @@ namespace Rebuilder // Search for game directory Log("Searching for game directory..."); - // Check our list of "standard paths" + // Create directory string string dir = ""; - for (int i=0;i