Lua - implement client.pause_av() and client.unpause_av()

This commit is contained in:
adelikat 2013-02-26 00:36:13 +00:00
parent c316fba5ff
commit 54b83bcad6
2 changed files with 18 additions and 2 deletions

View File

@ -515,6 +515,8 @@ namespace BizHawk.MultiClient
"screenshot", "screenshot",
"screenshottoclipboard", "screenshottoclipboard",
"setscreenshotosd", "setscreenshotosd",
"pause_av",
"unpause_av",
}; };
public static string[] FormsFunctions = new string[] public static string[] FormsFunctions = new string[]
@ -1204,6 +1206,16 @@ namespace BizHawk.MultiClient
Global.Emulator.CoreComm.InputCallback = null; Global.Emulator.CoreComm.InputCallback = null;
} }
public void client_pause_av()
{
Global.MainForm.PauseAVI = true;
}
public void client_unpause_av()
{
Global.MainForm.PauseAVI = false;
}
//---------------------------------------------------- //----------------------------------------------------
//Memory library //Memory library
//---------------------------------------------------- //----------------------------------------------------

View File

@ -35,6 +35,7 @@ namespace BizHawk.MultiClient
public string CurrentlyOpenRom; public string CurrentlyOpenRom;
SavestateManager StateSlots = new SavestateManager(); SavestateManager StateSlots = new SavestateManager();
public bool PauseAVI = false;
public bool PressFrameAdvance = false; public bool PressFrameAdvance = false;
public bool PressRewind = false; public bool PressRewind = false;
public bool FastForward = false; public bool FastForward = false;
@ -2967,7 +2968,10 @@ namespace BizHawk.MultiClient
MemoryPulse.Pulse(); MemoryPulse.Pulse();
//======================================= //=======================================
if (!PauseAVI)
{
AVIFrameAdvance(); AVIFrameAdvance();
}
if (Global.Emulator.IsLagFrame && Global.Config.AutofireLagFrames) if (Global.Emulator.IsLagFrame && Global.Config.AutofireLagFrames)
{ {
@ -2990,7 +2994,7 @@ namespace BizHawk.MultiClient
} }
PressRewind = false; PressRewind = false;
} }
if (true == UpdateFrame) if (UpdateFrame)
{ {
if (ReturnToRecording) if (ReturnToRecording)
{ {