Add GetPanelNativeSize() to DisplayManager

not really that helpful, but removes the annoying dependency on
PresentationPanel from IEmuHawkMainForm (ready for move to Client.Common)
This commit is contained in:
YoshiRulz 2020-06-17 10:58:30 +10:00 committed by James Groom
parent 962ac0d9d4
commit 62537118ac
2 changed files with 4 additions and 2 deletions

View File

@ -247,7 +247,7 @@ namespace BizHawk.Client.EmuHawk
public void SaveState(string name) => _mainForm.SaveState(Path.Combine(_config.PathEntries.SaveStateAbsolutePath(Game.System), $"{name}.State"), name, fromLua: false);
public int ScreenHeight() => _mainForm.PresentationPanel.NativeSize.Height;
public int ScreenHeight() => _displayManager.GetPanelNativeSize().Height;
public void Screenshot(string path)
{
@ -257,7 +257,7 @@ namespace BizHawk.Client.EmuHawk
public void ScreenshotToClipboard() => _mainForm.TakeScreenshotToClipboard();
public int ScreenWidth() => _mainForm.PresentationPanel.NativeSize.Width;
public int ScreenWidth() => _displayManager.GetPanelNativeSize().Width;
public void SeekFrame(int frame)
{

View File

@ -437,6 +437,8 @@ namespace BizHawk.Client.EmuHawk
return new Point((int)v.X, (int)v.Y);
}
internal Size GetPanelNativeSize() => presentationPanel.NativeSize;
/// <summary>
/// This will receive an emulated output frame from an IVideoProvider and run it through the complete frame processing pipeline
/// Then it will stuff it into the bound PresentationPanel.