mirror of
https://github.com/isledecomp/LEGOIslandRebuilder.git
synced 2024-11-27 09:35:41 -05:00
musicinjector: use cdpath/hdpath to try finding jukebox.si
This commit is contained in:
parent
e01f074c6d
commit
c734e5b5da
1 changed files with 22 additions and 1 deletions
|
@ -108,6 +108,27 @@ namespace Rebuilder
|
|||
|
||||
test_dirs.AddRange(Rebuilder.standard_hdd_dirs);
|
||||
|
||||
// Check registry for CD path
|
||||
using (RegistryKey reg = Rebuilder.GetGameRegistryKey())
|
||||
{
|
||||
if (reg != null)
|
||||
{
|
||||
string p = reg.GetValue("cdpath").ToString();
|
||||
|
||||
if (!string.IsNullOrEmpty(p))
|
||||
{
|
||||
test_dirs.Add(p);
|
||||
}
|
||||
|
||||
p = reg.GetValue("hdpath").ToString();
|
||||
|
||||
if (!string.IsNullOrEmpty(p))
|
||||
{
|
||||
test_dirs.Add(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Loop through drive letters
|
||||
for (int i=65;i<91;i++)
|
||||
{
|
||||
|
@ -115,7 +136,7 @@ namespace Rebuilder
|
|||
test_dirs.Add(drive_letter);
|
||||
}
|
||||
|
||||
for (int i=0;i< test_dirs.Count;i++)
|
||||
for (int i=0;i<test_dirs.Count;i++)
|
||||
{
|
||||
string test_fn = test_dirs[i] + "/LEGO/Scripts/ISLE/JUKEBOX.SI";
|
||||
if (File.Exists(test_fn))
|
||||
|
|
Loading…
Reference in a new issue