Make MainForm.RebootCore return bool, read in MainForm.StartNewMovie
resolves #2147
This commit is contained in:
parent
5229d664c4
commit
c57cd97f56
|
@ -71,7 +71,7 @@ namespace BizHawk.Client.Common
|
|||
void PauseEmulator();
|
||||
|
||||
/// <remarks>only referenced from <c>EmuClientApi</c></remarks>
|
||||
void RebootCore();
|
||||
bool RebootCore();
|
||||
|
||||
/// <remarks>only referenced from <c>EmuClientApi</c></remarks>
|
||||
void Render();
|
||||
|
|
|
@ -32,7 +32,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (!_isLoadingRom)
|
||||
{
|
||||
RebootCore();
|
||||
var rebootSucceeded = RebootCore();
|
||||
if (!rebootSucceeded) return false;
|
||||
}
|
||||
|
||||
Config.RecentMovies.Add(movie.Filename);
|
||||
|
|
|
@ -1103,20 +1103,17 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
}
|
||||
|
||||
public void RebootCore()
|
||||
public bool RebootCore()
|
||||
{
|
||||
if (IsSlave && Master.WantsToControlReboot)
|
||||
{
|
||||
Master.RebootCore();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CurrentlyOpenRomArgs == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LoadRom(CurrentlyOpenRomArgs.OpenAdvanced.SimplePath, CurrentlyOpenRomArgs);
|
||||
if (CurrentlyOpenRomArgs == null) return true;
|
||||
return LoadRom(CurrentlyOpenRomArgs.OpenAdvanced.SimplePath, CurrentlyOpenRomArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue