From 72e5c3e4ddfde10f266be83854608bfe05b698ab Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 7 Dec 2016 12:32:59 -0600 Subject: [PATCH] refactor a usage of Global.Emulator in MessageConfig, this place is still bad code though, needs to be rethought --- BizHawk.Client.EmuHawk/config/MessageConfig.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/config/MessageConfig.cs b/BizHawk.Client.EmuHawk/config/MessageConfig.cs index fcd9aae0c3..2573ec1b27 100644 --- a/BizHawk.Client.EmuHawk/config/MessageConfig.cs +++ b/BizHawk.Client.EmuHawk/config/MessageConfig.cs @@ -2,6 +2,7 @@ using System.Drawing; using System.Windows.Forms; +using BizHawk.Emulation.Common.IEmulatorExtensions; using BizHawk.Client.Common; namespace BizHawk.Client.EmuHawk @@ -66,7 +67,7 @@ namespace BizHawk.Client.EmuHawk private void SetMaxXY() { - var video = BizHawk.Emulation.Common.VideoProviderGlue.VideoProvider(Global.Emulator); + 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 XNumeric.Maximum = video.BufferWidth - 12; YNumeric.Maximum = video.BufferHeight - 12; PositionPanel.Size = new Size(video.BufferWidth + 2, video.BufferHeight + 2);