Hex Editor don't check for Null Emulator, tool should not be able to be opened anyway in this situation

This commit is contained in:
adelikat 2014-11-30 18:22:44 +00:00
parent fbcfc37b9f
commit 39f145d58b
1 changed files with 7 additions and 24 deletions

View File

@ -425,16 +425,8 @@ namespace BizHawk.Client.EmuHawk
RestoreDirectory = true RestoreDirectory = true
}; };
if (Global.Emulator.IsNull()) sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
{ sfd.InitialDirectory = Path.GetDirectoryName(PathManager.MakeAbsolutePath(Global.Config.RecentRoms.MostRecent, null));
sfd.FileName = "MemoryDump";
sfd.InitialDirectory = PathManager.GetBasePathAbsolute();
}
else
{
sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
sfd.InitialDirectory = Path.GetDirectoryName(PathManager.MakeAbsolutePath(Global.Config.RecentRoms.MostRecent, null));
}
var result = sfd.ShowHawkDialog(); var result = sfd.ShowHawkDialog();
@ -923,26 +915,17 @@ namespace BizHawk.Client.EmuHawk
var sfd = new SaveFileDialog var sfd = new SaveFileDialog
{ {
Filter = GetSaveFileFilter(), Filter = GetSaveFileFilter(),
RestoreDirectory = true RestoreDirectory = true,
InitialDirectory = Path.GetDirectoryName(PathManager.MakeAbsolutePath(Global.Config.RecentRoms.MostRecent, null))
}; };
if (Global.Emulator.IsNull()) if (_domain.Name == "File on Disk")
{ {
sfd.FileName = "MemoryDump"; sfd.FileName = Path.GetFileName(Global.Config.RecentRoms.MostRecent);
sfd.InitialDirectory = PathManager.GetBasePathAbsolute();
} }
else else
{ {
if (_domain.Name == "File on Disk") sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
{
sfd.FileName = Path.GetFileName(Global.Config.RecentRoms.MostRecent);
}
else
{
sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
}
sfd.InitialDirectory = Path.GetDirectoryName(PathManager.MakeAbsolutePath(Global.Config.RecentRoms.MostRecent, null));
} }
var result = sfd.ShowHawkDialog(); var result = sfd.ShowHawkDialog();