From c1c34d379479ad6c054c3f6117e9d313f1f2fb50 Mon Sep 17 00:00:00 2001 From: Asnivor Date: Tue, 21 Aug 2018 14:36:07 +0100 Subject: [PATCH] EmuHawk: Movies and DeterministicEmulation - ensure this is enforced whenever a movie is queued - #1290 --- BizHawk.Client.EmuHawk/MainForm.cs | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 6c7bcfb5e4..78d89ba0fd 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -3555,9 +3555,29 @@ namespace BizHawk.Client.EmuHawk } 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()) {