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