Lua console - small nitpicky code cleanup, nothing useful here
This commit is contained in:
parent
f147cdf75c
commit
fc19fe40a9
|
@ -383,7 +383,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
StopAllScripts();
|
StopAllScripts();
|
||||||
_luaList.Clear();
|
_luaList.Clear();
|
||||||
DisplayLuaList();
|
DisplayLuaList();
|
||||||
_currentSessionFile = "";
|
_currentSessionFile = String.Empty;
|
||||||
Changes(false);
|
Changes(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -896,7 +896,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void ClearOutput()
|
public void ClearOutput()
|
||||||
{
|
{
|
||||||
OutputBox.Text = "";
|
OutputBox.Text = String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
private FileInfo GetSaveFileFromUser()
|
private FileInfo GetSaveFileFromUser()
|
||||||
|
@ -911,7 +911,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
|
sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
|
||||||
sfd.InitialDirectory = PathManager.GetLuaPath();
|
sfd.InitialDirectory = PathManager.GetLuaPath();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1010,7 +1009,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public bool AskSave()
|
public bool AskSave()
|
||||||
{
|
{
|
||||||
if (Global.Config.SupressAskSave) //User has elected to not be nagged
|
if (Global.Config.SupressAskSave)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1022,18 +1021,25 @@ namespace BizHawk.Client.EmuHawk
|
||||||
GlobalWin.Sound.StartSound();
|
GlobalWin.Sound.StartSound();
|
||||||
if (result == DialogResult.Yes)
|
if (result == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
if (string.Compare(_currentSessionFile, "") == 0)
|
if (String.IsNullOrWhiteSpace(_currentSessionFile))
|
||||||
{
|
{
|
||||||
SaveAs();
|
SaveAs();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
SaveSession(_currentSessionFile);
|
SaveSession(_currentSessionFile);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (result == DialogResult.No)
|
else if (result == DialogResult.No)
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
else if (result == DialogResult.Cancel)
|
else if (result == DialogResult.Cancel)
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue