diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 1ec5aa6c3e..92ed88e133 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -1075,10 +1075,6 @@ namespace BizHawk.Client.EmuHawk img.Save(fi.FullName, ImageFormat.Png); } - /* - using (var fs = new FileStream($"{path}_test.bmp", FileMode.OpenOrCreate, FileAccess.Write)) - QuickBmpFile.Save(Emulator.VideoProvider(), fs, r.Next(50, 500), r.Next(50, 500)); - */ AddOnScreenMessage($"{fi.Name} saved."); } diff --git a/BizHawk.Client.EmuHawk/config/MessageConfig.cs b/BizHawk.Client.EmuHawk/config/MessageConfig.cs index 24fe8d49af..57bf9ee88c 100644 --- a/BizHawk.Client.EmuHawk/config/MessageConfig.cs +++ b/BizHawk.Client.EmuHawk/config/MessageConfig.cs @@ -2,9 +2,9 @@ using System.Drawing; using System.Windows.Forms; -using BizHawk.Emulation.Common.IEmulatorExtensions; using BizHawk.Client.Common; using BizHawk.Client.EmuHawk.WinFormExtensions; +using BizHawk.Emulation.Common; namespace BizHawk.Client.EmuHawk { @@ -68,7 +68,7 @@ namespace BizHawk.Client.EmuHawk private void SetMaxXy() { - var video = Global.Emulator.AsVideoProvider(); // TODO: this is objectively wrong, these are core agnostic settings, why is the current core used here? Also this will crash on a core without a video provider + var video = NullVideo.Instance; // Good enough XNumeric.Maximum = video.BufferWidth - 12; YNumeric.Maximum = video.BufferHeight - 12; PositionPanel.Size = new Size(video.BufferWidth + 2, video.BufferHeight + 2); diff --git a/BizHawk.Emulation.Common/Base Implementations/NullVideo.cs b/BizHawk.Emulation.Common/Base Implementations/NullVideo.cs index c18054c9ef..309fa086cd 100644 --- a/BizHawk.Emulation.Common/Base Implementations/NullVideo.cs +++ b/BizHawk.Emulation.Common/Base Implementations/NullVideo.cs @@ -7,10 +7,7 @@ /// public class NullVideo : IVideoProvider { - public int[] GetVideoBuffer() - { - return new int[BufferWidth * BufferHeight]; - } + public int[] GetVideoBuffer() => new int[BufferWidth * BufferHeight]; public static NullVideo Instance { get; } = new NullVideo();