Path Config stuff
This commit is contained in:
parent
65499148d4
commit
dab3df8ea2
|
@ -32,7 +32,7 @@ namespace BizHawk.MultiClient
|
|||
private void BrowseMovies_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog o = new OpenFileDialog();
|
||||
o.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.MoviesPath);
|
||||
o.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.MoviesPath, "");
|
||||
if (o.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
|
||||
|
|
|
@ -159,8 +159,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
FolderBrowserDialog f = new FolderBrowserDialog();
|
||||
f.Description = "Set the directory for " + Name;
|
||||
//f.SelectedPath = PathManager.MakeAbsolutePath(box.Text, System);
|
||||
f.SelectedPath = Global.Config.LastRomPath;
|
||||
f.SelectedPath = PathManager.MakeAbsolutePath(box.Text, System);
|
||||
DialogResult result = f.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
box.Text = f.SelectedPath;
|
||||
|
|
|
@ -100,16 +100,23 @@ namespace BizHawk.MultiClient
|
|||
|
||||
if (path[0] == '.')
|
||||
{
|
||||
string tmp = path;
|
||||
tmp = tmp.Remove(0, 1);
|
||||
tmp = tmp.Insert(0, GetPlatformBase(system));
|
||||
if (system.Length > 0)
|
||||
{
|
||||
|
||||
path = path.Remove(0, 1);
|
||||
path = path.Insert(0, GetPlatformBase(system));
|
||||
}
|
||||
if (path.Length == 1)
|
||||
return GetBasePathAbsolute();
|
||||
else
|
||||
{
|
||||
tmp = path.Remove(0, 1);
|
||||
tmp = tmp.Insert(0, GetBasePathAbsolute());
|
||||
return tmp;
|
||||
if (path[0] == '.')
|
||||
{
|
||||
path = path.Remove(0, 1);
|
||||
path = path.Insert(0, GetBasePathAbsolute());
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1241,12 +1241,12 @@ namespace BizHawk.MultiClient
|
|||
else if (!(Global.Emulator is NullEmulator))
|
||||
{
|
||||
sfd.FileName = Global.Game.Name;
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
sfd.FileName = "NULL";
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, "");
|
||||
}
|
||||
sfd.Filter = "Watch Files (*.wch)|*.wch|All Files|*.*";
|
||||
sfd.RestoreDirectory = true;
|
||||
|
@ -1438,7 +1438,7 @@ namespace BizHawk.MultiClient
|
|||
var ofd = new OpenFileDialog();
|
||||
if (currentSearchFile.Length > 0)
|
||||
ofd.FileName = Path.GetFileNameWithoutExtension(currentSearchFile);
|
||||
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath);
|
||||
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, "");
|
||||
ofd.Filter = "Watch Files (*.wch)|*.wch|All Files|*.*";
|
||||
ofd.RestoreDirectory = true;
|
||||
if (currentSearchFile.Length > 0)
|
||||
|
|
|
@ -586,7 +586,7 @@ namespace BizHawk.MultiClient
|
|||
var ofd = new OpenFileDialog();
|
||||
if (currentWatchFile.Length > 0)
|
||||
ofd.FileName = Path.GetFileNameWithoutExtension(currentWatchFile);
|
||||
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath);
|
||||
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, "");
|
||||
ofd.Filter = "Watch Files (*.wch)|*.wch|All Files|*.*";
|
||||
ofd.RestoreDirectory = true;
|
||||
|
||||
|
@ -638,12 +638,12 @@ namespace BizHawk.MultiClient
|
|||
else if (!(Global.Emulator is NullEmulator))
|
||||
{
|
||||
sfd.FileName = Global.Game.Name;
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
sfd.FileName = "NULL";
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath);
|
||||
sfd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.WatchPath, "");
|
||||
}
|
||||
sfd.Filter = "Watch Files (*.wch)|*.wch|All Files|*.*";
|
||||
sfd.RestoreDirectory = true;
|
||||
|
|
Loading…
Reference in New Issue