Use diskpath for finding game directory

This commit is contained in:
Ramen2X 2020-12-09 00:49:28 -05:00
parent 3c37e12d95
commit 7abec728c5
2 changed files with 2 additions and 47 deletions

View file

@ -106,8 +106,6 @@ namespace Rebuilder
// Test standard directories
List<string> test_dirs = new List<string>();
test_dirs.AddRange(Rebuilder.standard_hdd_dirs);
// Check registry for CD path
{
string p = Rebuilder.GetRegistryEntry("diskpath");

View file

@ -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<standard_hdd_dirs.Length;i++)
{
if (IsValidDir(standard_hdd_dirs[i]))
{
dir = standard_hdd_dirs[i];
break;
}
}
// Check registry for disk path ()
if (string.IsNullOrEmpty(dir))