Re-enable A/V recording on Linux and add a big ol' disclaimer dialog

This commit is contained in:
YoshiRulz 2020-06-14 02:48:20 +10:00
parent 4c77ebd3d1
commit f48e3cd2ea
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
3 changed files with 20 additions and 22 deletions

View File

@ -1,29 +1,29 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using System.Collections.Generic;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Calculators;
using BizHawk.Emulation.Cores.ColecoVision;
using BizHawk.Emulation.Cores.Nintendo.NES;
using BizHawk.Emulation.Cores.Nintendo.SubNESHawk;
using BizHawk.Emulation.Cores.Nintendo.N64;
using BizHawk.Emulation.Cores.Nintendo.SNES;
using BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES;
using BizHawk.Client.Common;
using BizHawk.Client.EmuHawk.CustomControls;
using BizHawk.Client.EmuHawk.ToolExtensions;
using BizHawk.Emulation.Cores.Computers.AppleII;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Atari.A7800Hawk;
using BizHawk.Emulation.Cores.Computers.Commodore64;
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
using BizHawk.Emulation.Cores.Computers.SinclairSpectrum;
using BizHawk.Emulation.Cores.Calculators;
using BizHawk.Emulation.Cores.ColecoVision;
using BizHawk.Emulation.Cores.Computers.AmstradCPC;
using BizHawk.Emulation.Cores.Computers.AppleII;
using BizHawk.Emulation.Cores.Computers.Commodore64;
using BizHawk.Emulation.Cores.Computers.SinclairSpectrum;
using BizHawk.Emulation.Cores.Consoles.Nintendo.NDS;
using BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES;
using BizHawk.Emulation.Cores.Intellivision;
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
using BizHawk.Emulation.Cores.Nintendo.N64;
using BizHawk.Emulation.Cores.Nintendo.NES;
using BizHawk.Emulation.Cores.Nintendo.SNES;
using BizHawk.Emulation.Cores.Nintendo.SubNESHawk;
using BizHawk.Emulation.Cores.Sony.PSX;
namespace BizHawk.Client.EmuHawk
@ -288,12 +288,11 @@ namespace BizHawk.Client.EmuHawk
StopAVIMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Stop A/V"].Bindings;
CaptureOSDMenuItem.Checked = Config.AviCaptureOsd;
RecordAVMenuItem.Enabled = !OSTailoredCode.IsUnixHost && !string.IsNullOrEmpty(Config.VideoWriter) && _currAviWriter == null;
SynclessRecordingMenuItem.Enabled = !OSTailoredCode.IsUnixHost;
RecordAVMenuItem.Enabled = !string.IsNullOrEmpty(Config.VideoWriter) && _currAviWriter == null;
if (_currAviWriter == null)
{
ConfigAndRecordAVMenuItem.Enabled = !OSTailoredCode.IsUnixHost;
ConfigAndRecordAVMenuItem.Enabled = true;
StopAVIMenuItem.Enabled = false;
}
else
@ -603,6 +602,7 @@ namespace BizHawk.Client.EmuHawk
private void ConfigAndRecordAVMenuItem_Click(object sender, EventArgs e)
{
if (OSTailoredCode.IsUnixHost) new MsgBox("Most of these options will cause crashes on Linux.", "A/V instability warning", MessageBoxIcon.Warning).ShowDialog();
RecordAv();
}

View File

@ -106,8 +106,7 @@ namespace BizHawk.Client.EmuHawk
_exitRequestPending = true;
break;
case "Record A/V":
if (OSTailoredCode.IsUnixHost) AddOnScreenMessage("(A/V only available on Windows for now)");
else RecordAv();
RecordAv();
break;
case "Stop A/V":
StopAv();

View File

@ -571,8 +571,7 @@ namespace BizHawk.Client.EmuHawk
// start dumping, if appropriate
if (_argParser.cmdDumpType != null && _argParser.cmdDumpName != null)
{
if (OSTailoredCode.IsUnixHost) Console.WriteLine("A/V dump requires Win32 API calls, ignored");
else RecordAv(_argParser.cmdDumpType, _argParser.cmdDumpName);
RecordAv(_argParser.cmdDumpType, _argParser.cmdDumpName);
}
SetMainformMovieInfo();
@ -3148,7 +3147,7 @@ namespace BizHawk.Client.EmuHawk
/// </summary>
private void RecordAvBase(string videoWriterName, string filename, bool unattended)
{
if (_currAviWriter != null || OSTailoredCode.IsUnixHost) return;
if (_currAviWriter != null) return;
// select IVideoWriter to use
IVideoWriter aw;