add an option to capture the Lua without capturing the full OSD, when recording an AVI
This commit is contained in:
parent
3cc9684ebd
commit
146022caf4
|
@ -92,6 +92,7 @@ namespace BizHawk.Client.Common
|
|||
public bool SkipLagFrame { get; set; }
|
||||
public bool SuppressAskSave { get; set; }
|
||||
public bool AviCaptureOsd { get; set; }
|
||||
public bool AviCaptureLua { get; set; }
|
||||
public bool ScreenshotCaptureOsd { get; set; }
|
||||
public bool FirstBoot { get; set; } = true;
|
||||
public bool UpdateAutoCheckEnabled { get; set; }
|
||||
|
|
|
@ -546,6 +546,23 @@ namespace BizHawk.Client.EmuHawk
|
|||
UpdateSourceInternal(job);
|
||||
return job.OffscreenBb;
|
||||
}
|
||||
/// <summary>
|
||||
/// Does the display process to an offscreen buffer, suitable for a Lua-inclusive movie.
|
||||
/// </summary>
|
||||
public BitmapBuffer RenderOffscreenLua(IVideoProvider videoProvider)
|
||||
{
|
||||
var job = new JobInfo
|
||||
{
|
||||
VideoProvider = videoProvider,
|
||||
Simulate = false,
|
||||
ChainOutsize = new Size(videoProvider.BufferWidth, videoProvider.BufferHeight),
|
||||
Offscreen = true,
|
||||
IncludeOSD = false,
|
||||
IncludeUserFilters = false,
|
||||
};
|
||||
UpdateSourceInternal(job);
|
||||
return job.OffscreenBb;
|
||||
}
|
||||
|
||||
private class FakeVideoProvider : IVideoProvider
|
||||
{
|
||||
|
|
|
@ -100,6 +100,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.StopAVIMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
this.toolStripSeparator19 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
|
||||
this.CaptureOSDMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
this.CaptureLuaMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SynclessRecordingMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
this.ScreenshotSubMenu = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
this.ScreenshotMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
|
@ -135,6 +136,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.toolStripMenuItem4 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
|
||||
this.DisplayStatusBarMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
this.DisplayMessagesMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
this.toolStripSeparator8 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
|
||||
this.DisplayLogWindowMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
this.ConfigSubMenu = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
this.ControllersMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
|
@ -373,7 +375,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.ShowMenuContextMenuSeparator = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
|
||||
this.ShowMenuContextMenuItem = new BizHawk.WinForms.Controls.ToolStripMenuItemEx();
|
||||
this.timerMouseIdle = new System.Windows.Forms.Timer(this.components);
|
||||
this.toolStripSeparator8 = new BizHawk.WinForms.Controls.ToolStripSeparatorEx();
|
||||
this.MainformMenu.SuspendLayout();
|
||||
this.MainStatusBar.SuspendLayout();
|
||||
this.MainFormContextMenu.SuspendLayout();
|
||||
|
@ -829,6 +830,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.StopAVIMenuItem,
|
||||
this.toolStripSeparator19,
|
||||
this.CaptureOSDMenuItem,
|
||||
this.CaptureLuaMenuItem,
|
||||
this.SynclessRecordingMenuItem});
|
||||
this.AVSubMenu.Text = "&AVI/WAV";
|
||||
this.AVSubMenu.DropDownOpened += new System.EventHandler(this.AVSubMenu_DropDownOpened);
|
||||
|
@ -853,6 +855,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.CaptureOSDMenuItem.Text = "Capture OSD";
|
||||
this.CaptureOSDMenuItem.Click += new System.EventHandler(this.CaptureOSDMenuItem_Click);
|
||||
//
|
||||
// CaptureLuaMenuItem
|
||||
//
|
||||
this.CaptureLuaMenuItem.Name = "CaptureLuaMenuItem";
|
||||
this.CaptureLuaMenuItem.Size = new System.Drawing.Size(225, 22);
|
||||
this.CaptureLuaMenuItem.Text = "Capture Lua";
|
||||
this.CaptureLuaMenuItem.Click += new System.EventHandler(this.CaptureLuaMenuItem_Click);
|
||||
//
|
||||
// SynclessRecordingMenuItem
|
||||
//
|
||||
this.SynclessRecordingMenuItem.Text = "S&yncless Recording Tools";
|
||||
|
@ -2778,5 +2787,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
private BizHawk.WinForms.Controls.ToolStripMenuItemEx NdsSyncSettingsMenuItem;
|
||||
private BizHawk.WinForms.Controls.ToolStripMenuItemEx NdsSettingsMenuItem;
|
||||
private BizHawk.WinForms.Controls.ToolStripSeparatorEx toolStripSeparator8;
|
||||
private System.Windows.Forms.ToolStripMenuItem CaptureLuaMenuItem;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,6 +215,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
ConfigAndRecordAVMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Record A/V"].Bindings;
|
||||
StopAVIMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Stop A/V"].Bindings;
|
||||
CaptureOSDMenuItem.Checked = Config.AviCaptureOsd;
|
||||
CaptureLuaMenuItem.Checked = Config.AviCaptureOsd || Config.AviCaptureLua;
|
||||
|
||||
RecordAVMenuItem.Enabled = !string.IsNullOrEmpty(Config.VideoWriter) && _currAviWriter == null;
|
||||
|
||||
|
@ -538,6 +539,15 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void CaptureOSDMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.AviCaptureOsd ^= true;
|
||||
if (Config.AviCaptureOsd)
|
||||
Config.AviCaptureLua = true;
|
||||
}
|
||||
|
||||
private void CaptureLuaMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Config.AviCaptureLua = !CaptureLuaMenuItem.Checked;
|
||||
if (!Config.AviCaptureLua)
|
||||
Config.AviCaptureOsd = false;
|
||||
}
|
||||
|
||||
private void ScreenshotMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -2507,6 +2507,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
bb.DiscardAlpha();
|
||||
return bb;
|
||||
}
|
||||
public BitmapBuffer CaptureLua()
|
||||
{
|
||||
var bb = DisplayManager.RenderOffscreenLua(_currentVideoProvider);
|
||||
bb.DiscardAlpha();
|
||||
return bb;
|
||||
}
|
||||
|
||||
private void IncreaseWindowSize()
|
||||
{
|
||||
|
@ -3418,6 +3424,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
output = new BitmapBufferVideoProvider(CaptureOSD());
|
||||
disposableOutput = (IDisposable) output;
|
||||
}
|
||||
else if (Config.AviCaptureLua)
|
||||
{
|
||||
output = new BitmapBufferVideoProvider(CaptureLua());
|
||||
disposableOutput = (IDisposable) output;
|
||||
}
|
||||
else
|
||||
{
|
||||
output = _currentVideoProvider;
|
||||
|
|
Loading…
Reference in New Issue