Skip to content

Commit

Permalink
EmuHawk: Movies and DeterministicEmulation - ensure this is enforced …
Browse files Browse the repository at this point in the history
…whenever a movie is queued - #1290
  • Loading branch information
Asnivor committed Aug 21, 2018
1 parent 4e470cf commit c1c34d3
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions BizHawk.Client.EmuHawk/MainForm.cs
Expand Up @@ -3555,9 +3555,29 @@ public bool LoadRom(string path, LoadRomArgs args)
}

try
{
// If deterministic emulation is passed in, respect that value regardless, else determine a good value (currently that simply means movies require deterministic emulaton)
bool deterministic = args.Deterministic ?? Global.MovieSession.QueuedMovie != null;
{
bool deterministic;

if (args.Deterministic == null)
{
// force deterministic in this case
// this is usually null for most cores
// previously this was getting set to false if a movie was not queued for recording - surely that can't be good..
deterministic = true;
}
else
{
// a value was actually supplied somehow - use this
deterministic = args.Deterministic.Value;
}

if (Global.MovieSession.QueuedMovie != null)
{
// movies should require deterministic emulation in ALL cases
// if the core is managing its own DE through SyncSettings a 'deterministic' bool should be passed into the core's constructor
// it is then up to the core itself to override its own local DeterministicEmulation setting
deterministic = true;
}

if (!GlobalWin.Tools.AskSave())
{
Expand Down

0 comments on commit c1c34d3

Please sign in to comment.