Disable features using Win32 unless on Windows host
forms: GBAGPUView, GBGPUView, LogWindow, SNESGraphicsDebugger, SynclessRecordingTools; features: A/V recording, logging to AWE(?)
This commit is contained in:
parent
580aa2eaf9
commit
784c800ca2
|
@ -19,7 +19,9 @@ namespace BizHawk.Client.Common
|
|||
|
||||
if (DefaultToAWE)
|
||||
{
|
||||
return new StreamStringLog(false);
|
||||
return OSTailoredCode.IsUnixHost
|
||||
? throw new InvalidOperationException("logging to AWE is only available on Windows for now")
|
||||
: new StreamStringLog(false);
|
||||
}
|
||||
|
||||
return new ListStringLog();
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
/// Component wrapping access to the Browse For Folder common dialog box.
|
||||
/// Call the ShowDialog() method to bring the dialog box up.
|
||||
/// </summary>
|
||||
public sealed class FolderBrowserEx : Component
|
||||
public sealed class FolderBrowserEx : Component //TODO inherit CommonDialog
|
||||
{
|
||||
private const int MAX_PATH = 260;
|
||||
|
||||
|
|
|
@ -2865,6 +2865,7 @@
|
|||
this.GBASubMenu.Name = "GBASubMenu";
|
||||
this.GBASubMenu.Size = new System.Drawing.Size(39, 17);
|
||||
this.GBASubMenu.Text = "GBA";
|
||||
this.GBASubMenu.DropDownOpened += new System.EventHandler(this.GBASubMenu_DropDownOpened);
|
||||
//
|
||||
// GBACoreSelectionSubMenu
|
||||
//
|
||||
|
|
|
@ -284,11 +284,12 @@ namespace BizHawk.Client.EmuHawk
|
|||
StopAVIMenuItem.ShortcutKeyDisplayString = Config.HotkeyBindings["Stop A/V"].Bindings;
|
||||
CaptureOSDMenuItem.Checked = Config.AVI_CaptureOSD;
|
||||
|
||||
RecordAVMenuItem.Enabled = !string.IsNullOrEmpty(Config.VideoWriter) && _currAviWriter == null;
|
||||
RecordAVMenuItem.Enabled = OSTailoredCode.IsUnixHost || !string.IsNullOrEmpty(Global.Config.VideoWriter) && _currAviWriter == null;
|
||||
SynclessRecordingMenuItem.Enabled = !OSTailoredCode.IsUnixHost;
|
||||
|
||||
if (_currAviWriter == null)
|
||||
{
|
||||
ConfigAndRecordAVMenuItem.Enabled = true;
|
||||
ConfigAndRecordAVMenuItem.Enabled = !OSTailoredCode.IsUnixHost;
|
||||
StopAVIMenuItem.Enabled = false;
|
||||
}
|
||||
else
|
||||
|
@ -751,6 +752,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
DisplayLagCounterMenuItem.Enabled = Emulator.CanPollInput();
|
||||
|
||||
DisplayMessagesMenuItem.Checked = Config.DisplayMessages;
|
||||
|
||||
DisplayLogWindowMenuItem.Enabled = !OSTailoredCode.IsUnixHost;
|
||||
}
|
||||
|
||||
private void WindowSizeSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
|
@ -2108,6 +2111,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void GBSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
LoadGBInSGBMenuItem.Checked = Config.GB_AsSGB;
|
||||
GBGPUViewerMenuItem.Enabled = !OSTailoredCode.IsUnixHost;
|
||||
}
|
||||
|
||||
private void GBCoreSettingsMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -2168,6 +2172,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
FlagNeedsReboot();
|
||||
}
|
||||
|
||||
private void GBASubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
GbaGpuViewerMenuItem.Enabled = !OSTailoredCode.IsUnixHost;
|
||||
}
|
||||
|
||||
private void GBACoreSelectionSubMenu_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
GBAmGBAMenuItem.Checked = Config.GBA_UsemGBA;
|
||||
|
@ -2231,6 +2240,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
SNESControllerConfigurationMenuItem.Enabled = !MovieSession.Movie.IsActive;
|
||||
SnesGfxDebuggerMenuItem.Enabled = !OSTailoredCode.IsUnixHost;
|
||||
}
|
||||
|
||||
private void SNESControllerConfigurationMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
using System.Linq;
|
||||
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
||||
|
||||
|
@ -102,7 +104,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
_exitRequestPending = true;
|
||||
break;
|
||||
case "Record A/V":
|
||||
RecordAv();
|
||||
if (OSTailoredCode.IsUnixHost) GlobalWin.OSD.AddMessage("(A/V only available on Windows for now)");
|
||||
else RecordAv();
|
||||
break;
|
||||
case "Stop A/V":
|
||||
StopAv();
|
||||
|
|
|
@ -223,7 +223,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
InitializeComponent();
|
||||
SetImages();
|
||||
Game = GameInfo.NullInstance;
|
||||
if (Config.ShowLogWindow)
|
||||
if (Config.ShowLogWindow && !OSTailoredCode.IsUnixHost)
|
||||
{
|
||||
LogConsole.ShowConsole();
|
||||
DisplayLogWindowMenuItem.Checked = true;
|
||||
|
@ -493,7 +493,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
// start dumping, if appropriate
|
||||
if (_argParser.cmdDumpType != null && _argParser.cmdDumpName != null)
|
||||
{
|
||||
RecordAv(_argParser.cmdDumpType, _argParser.cmdDumpName);
|
||||
if (OSTailoredCode.IsUnixHost) Console.WriteLine("A/V dump requires Win32 API calls, ignored");
|
||||
else RecordAv(_argParser.cmdDumpType, _argParser.cmdDumpName);
|
||||
}
|
||||
|
||||
SetMainformMovieInfo();
|
||||
|
@ -511,7 +512,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
public int ProgramRunLoop()
|
||||
{
|
||||
CheckMessages(); // can someone leave a note about why this is needed?
|
||||
LogConsole.PositionConsole();
|
||||
if (!OSTailoredCode.IsUnixHost) LogConsole.PositionConsole();
|
||||
|
||||
// needs to be done late, after the log console snaps on top
|
||||
// fullscreen should snap on top even harder!
|
||||
|
@ -3218,10 +3219,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
/// </summary>
|
||||
private void RecordAvBase(string videoWriterName, string filename, bool unattended)
|
||||
{
|
||||
if (_currAviWriter != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (_currAviWriter != null || OSTailoredCode.IsUnixHost) return;
|
||||
|
||||
// select IVideoWriter to use
|
||||
IVideoWriter aw;
|
||||
|
|
Loading…
Reference in New Issue