Skip to content

Commit

Permalink
Merged r7855 from trunk into branches/release.
Browse files Browse the repository at this point in the history
  • Loading branch information
hegyak committed Sep 19, 2014
1 parent 1c60f24 commit fc6898f
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 44 deletions.
64 changes: 38 additions & 26 deletions BizHawk.Client.Common/movie/MovieSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,46 +248,58 @@ public void HandleMovieOnFrameLoop()
{
LatchInputFromLog();

// Movie may go into finished mode as a result from latching
if (!Movie.IsFinished)
if (Movie.IsRecording) // The movie end situation can cause the switch to record mode, in that case we need to capture some input for this frame
{
if (Global.ClientControls["Scrub Input"])
{
LatchInputFromPlayer(Global.MovieInputSourceAdapter);
ClearFrame();
}
else if (Global.Config.MoviePlaybackPokeMode)
HandleFrameLoopForRecordMode();
}
else
{
// Movie may go into finished mode as a result from latching
if (!Movie.IsFinished)
{
LatchInputFromPlayer(Global.MovieInputSourceAdapter);
var lg = Movie.LogGeneratorInstance();
lg.SetSource(Global.MovieOutputHardpoint);
if (!lg.IsEmpty)
if (Global.ClientControls["Scrub Input"])
{
LatchInputFromPlayer(Global.MovieInputSourceAdapter);
Movie.PokeFrame(Global.Emulator.Frame, Global.MovieOutputHardpoint);
ClearFrame();
}
else
else if (Global.Config.MoviePlaybackPokeMode)
{
LatchInputFromLog();
LatchInputFromPlayer(Global.MovieInputSourceAdapter);
var lg = Movie.LogGeneratorInstance();
lg.SetSource(Global.MovieOutputHardpoint);
if (!lg.IsEmpty)
{
LatchInputFromPlayer(Global.MovieInputSourceAdapter);
Movie.PokeFrame(Global.Emulator.Frame, Global.MovieOutputHardpoint);
}
else
{
LatchInputFromLog();
}
}
}
}
}
else if (Movie.IsRecording)
{
if (MultiTrack.IsActive)
{
LatchMultitrackPlayerInput(Global.MovieInputSourceAdapter, Global.MultitrackRewiringAdapter);
}
else
{
LatchInputFromPlayer(Global.MovieInputSourceAdapter);
}
HandleFrameLoopForRecordMode();
}
}

// the movie session makes sure that the correct input has been read and merged to its MovieControllerAdapter;
// this has been wired to Global.MovieOutputHardpoint in RewireInputChain
Movie.RecordFrame(Global.Emulator.Frame, Global.MovieOutputHardpoint);
private void HandleFrameLoopForRecordMode()
{
if (MultiTrack.IsActive)
{
LatchMultitrackPlayerInput(Global.MovieInputSourceAdapter, Global.MultitrackRewiringAdapter);
}
else
{
LatchInputFromPlayer(Global.MovieInputSourceAdapter);
}

// the movie session makes sure that the correct input has been read and merged to its MovieControllerAdapter;
// this has been wired to Global.MovieOutputHardpoint in RewireInputChain
Movie.RecordFrame(Global.Emulator.Frame, Global.MovieOutputHardpoint);
}

public bool HandleMovieLoadState(string path)
Expand Down
24 changes: 12 additions & 12 deletions BizHawk.Client.EmuHawk/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1260,20 +1260,20 @@ private void SetWindowText()
else
{
str = str + Global.SystemInfo.DisplayName;
}

if (VersionInfo.DeveloperBuild)
{
str += " (interim)";
}
if (VersionInfo.DeveloperBuild)
{
str += " (interim)";
}

if (Global.MovieSession.Movie.IsActive)
{
str = str + " - " + Global.Game.Name + " - " + Path.GetFileName(Global.MovieSession.Movie.Filename);
}
else
{
str = str + " - " + Global.Game.Name;
if (Global.MovieSession.Movie.IsActive)
{
str = str + " - " + Global.Game.Name + " - " + Path.GetFileName(Global.MovieSession.Movie.Filename);
}
else
{
str = str + " - " + Global.Game.Name;
}
}

Text = str;
Expand Down
5 changes: 3 additions & 2 deletions BizHawk.Client.EmuHawk/config/ProfileConfig.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,16 @@ private void TasView_MouseDown(object sender, MouseEventArgs e)
TasView.Refresh();

_startBoolDrawColumn = buttonName;
_boolPaintState = _currentTasMovie.BoolIsPressed(frame, buttonName);

if (frame < _currentTasMovie.InputLogLength)
{
_boolPaintState = _currentTasMovie.BoolIsPressed(frame, buttonName);
}
else
{
Global.ClickyVirtualPadController.IsPressed(buttonName);
}

}
else
{
Expand Down
9 changes: 8 additions & 1 deletion BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,14 @@ public void LoadProject(string path)
}

WantsToControlStopMovie = false;
GlobalWin.MainForm.StartNewMovie(movie, record: false);

var shouldRecord = false;
if (Global.MovieSession.Movie.InputLogLength == 0) // An unusual but possible edge case
{
shouldRecord = true;
}

GlobalWin.MainForm.StartNewMovie(movie, record: shouldRecord);
WantsToControlStopMovie = true;
_currentTasMovie = Global.MovieSession.Movie as TasMovie;
Global.Config.RecentTas.Add(path);
Expand Down
4 changes: 2 additions & 2 deletions VersionInfo.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
static class VersionInfo
{
public const string MAINVERSION = "1.8.2";
public static string RELEASEDATE = "August 31, 2014";
public const string MAINVERSION = "1.8.3";
public static string RELEASEDATE = "September 20, 2014";
public static bool DeveloperBuild = false;

public static string GetEmuVersion()
Expand Down

0 comments on commit fc6898f

Please sign in to comment.