diff --git a/src/BizHawk.Client.Common/movie/MovieSession.cs b/src/BizHawk.Client.Common/movie/MovieSession.cs
index c6a60af0d7..3f5b173e9e 100644
--- a/src/BizHawk.Client.Common/movie/MovieSession.cs
+++ b/src/BizHawk.Client.Common/movie/MovieSession.cs
@@ -50,32 +50,6 @@ namespace BizHawk.Client.Common
public MultitrackRecorder MultiTrack { get; } = new MultitrackRecorder();
- public IController CurrentInput
- {
- get
- {
- if (Movie.IsPlayingOrRecording() && Movie.Emulator.Frame > 0)
- {
- return Movie.GetInputState(Movie.Emulator.Frame - 1);
- }
-
- return null;
- }
- }
-
- public IController PreviousFrame
- {
- get
- {
- if (Movie.IsPlayingOrRecording() && Movie.Emulator.Frame > 1)
- {
- return Movie.GetInputState(Movie.Emulator.Frame - 2);
- }
-
- return null;
- }
- }
-
public void RecreateMovieController(ControllerDefinition definition)
{
MovieController = new Bk2Controller(definition);
diff --git a/src/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs b/src/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs
index 0145dcbcd4..95b5763bb6 100644
--- a/src/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs
+++ b/src/BizHawk.Client.Common/movie/interfaces/IMovieSession.cs
@@ -23,13 +23,6 @@ namespace BizHawk.Client.Common
IMovieController MovieController { get; }
MultitrackRecorder MultiTrack { get; }
- ///
- /// Gets the controller state from the movie for the most recent frame
- ///
- IController CurrentInput { get; }
-
- IController PreviousFrame { get; }
-
///
/// Recreates MovieController with the given controller definition
/// with an empty controller state
diff --git a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs
index b2d650806a..5e6d80b969 100644
--- a/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/VirtualPads/VirtualpadsTool.cs
@@ -149,14 +149,16 @@ namespace BizHawk.Client.EmuHawk
if (MovieSession.Movie.IsPlaying())
{
Readonly = true;
- if (MovieSession.CurrentInput != null)
+ var currentInput = CurrentInput();
+ if (currentInput != null)
{
- Pads.ForEach(p => p.Set(MovieSession.CurrentInput));
+ Pads.ForEach(p => p.Set(currentInput));
}
}
else if (MovieSession.Movie.IsRecording())
{
- Pads.ForEach(p => p.SetPrevious(MovieSession.PreviousFrame));
+ var previousFrame = PreviousFrame();
+ Pads.ForEach(p => p.SetPrevious(previousFrame));
Readonly = false;
}
@@ -168,6 +170,26 @@ namespace BizHawk.Client.EmuHawk
Pads.ForEach(pad => pad.UpdateValues());
}
+ private IController CurrentInput()
+ {
+ if (MovieSession.Movie.IsPlayingOrRecording() && Emulator.Frame > 0)
+ {
+ return MovieSession.Movie.GetInputState(Emulator.Frame - 1);
+ }
+
+ return null;
+ }
+
+ public IController PreviousFrame()
+ {
+ if (MovieSession.Movie.IsPlayingOrRecording() && Emulator.Frame > 1)
+ {
+ return MovieSession.Movie.GetInputState(Emulator.Frame - 2);
+ }
+
+ return null;
+ }
+
protected override void FastUpdateAfter()
{
// TODO: SetPrevious logic should go here too or that will get out of whack