Run Tools.AskSave() before attempting to load a rom, and back out of that action if the user cancels

This commit is contained in:
adelikat 2014-01-01 19:07:23 +00:00
parent 31038e58aa
commit 180efd8e44
1 changed files with 5 additions and 0 deletions
BizHawk.Client.EmuHawk

View File

@ -2940,6 +2940,11 @@ namespace BizHawk.Client.EmuHawk
// Still needs a good bit of refactoring
public bool LoadRom(string path, bool deterministicemulation = false, bool hasmovie = false)
{
if (!GlobalWin.Tools.AskSave())
{
return false;
}
var loader = new RomLoader
{
ChooseArchive = LoadArhiveChooser,