From 8607f7891f869d01b3c0280cca38738b201a742b Mon Sep 17 00:00:00 2001 From: nattthebear Date: Tue, 16 Jun 2020 15:53:05 -0400 Subject: [PATCH] Fix virtual size output on nyma cores. Expose more debugging info to console about screen sizes. --- src/BizHawk.Client.EmuHawk/MainForm.cs | 5 ++++- src/BizHawk.Emulation.Cores/Waterbox/NymaCore.cs | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index 2383b3c0b9..e3d1c4f707 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -1142,7 +1142,10 @@ namespace BizHawk.Client.EmuHawk } } - Debug.WriteLine($"Selecting display size {lastComputedSize}"); + + Console.WriteLine($"For emulator framebuffer {new Size(_currentVideoProvider.BufferWidth, _currentVideoProvider.BufferHeight)}:"); + Console.WriteLine($" For virtual size {new Size(_currentVideoProvider.VirtualWidth, _currentVideoProvider.VirtualHeight)}:"); + Console.WriteLine($" Selecting display size {lastComputedSize}"); // Change size Size = new Size(lastComputedSize.Width + borderWidth, lastComputedSize.Height + borderHeight); diff --git a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.cs b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.cs index d81529a6fe..ad15cc1b0f 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.cs @@ -117,6 +117,8 @@ namespace BizHawk.Emulation.Cores.Waterbox _videoBuffer = new int[Math.Max(info.MaxWidth * info.MaxHeight, info.LcmWidth * info.LcmHeight)]; BufferWidth = info.NominalWidth; BufferHeight = info.NominalHeight; + _mdfnNominalWidth = info.NominalWidth; + _mdfnNominalHeight = info.NominalHeight; switch (info.VideoSystem) { // TODO: There seriously isn't any region besides these? @@ -240,6 +242,11 @@ namespace BizHawk.Emulation.Cores.Waterbox } } + private int _mdfnNominalWidth; + private int _mdfnNominalHeight; + public override int VirtualWidth => _mdfnNominalWidth; + public override int VirtualHeight =>_mdfnNominalHeight; + public DisplayType Region { get; protected set; } ///