From fbbe42d7fac278aac51896d4a52d2d200a08f41d Mon Sep 17 00:00:00 2001 From: vadosnaprimer Date: Sun, 5 Nov 2017 17:33:12 +0300 Subject: [PATCH] tastudio: drop logic that shrinks branch screenshot popup the fact that it was screwing up osd text (that's not pixel based by design) causes more problems than smaller popup was ever intended to solve. and it's not branch or tasproject size, because screenshots are stored in the same resolution as your emulator screen. so I don't even know which problems it was solving. if it was made to shrink because originally it couldn't expand outside tastudio, this has been resolved a while ago, and we can afford covering as much user screen as they already cover with emuhawk. unless they complain, then it can return as an option. --- .../tools/TAStudio/BookmarksBranchesBox.cs | 6 +++--- .../tools/TAStudio/ScreenshotForm.cs | 18 ++---------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs index e3df562925..96497bced7 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs @@ -610,9 +610,9 @@ namespace BizHawk.Client.EmuHawk { TasBranch branch = GetBranch(BranchView.CurrentCell.RowIndex.Value); Point location = Location; - location.Offset(-Screenshot.Width, 0); - int width = Tastudio.VideoProvider.BufferWidth; - int height = Tastudio.VideoProvider.BufferHeight; + int width = branch.OSDFrameBuffer.Width; + int height = branch.OSDFrameBuffer.Height; + location.Offset(-width, 0); Screenshot.UpdateValues(branch, PointToScreen(location), width, height, (int)Graphics.FromHwnd(this.Handle).MeasureString( diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.cs index 4b86d7ee8b..65e407eb5f 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotForm.cs @@ -11,11 +11,8 @@ namespace BizHawk.Client.EmuHawk { public partial class ScreenshotForm : Form { - // but still appear topmost private const int WS_EX_TOPMOST = 0x00000008; - - private const int WidthCap = 320; - private const int HeightCap = 240; + private const int Interval = 40; private const double AlphaStep = 0.125; @@ -32,9 +29,7 @@ namespace BizHawk.Client.EmuHawk public ScreenshotForm() { InitializeComponent(); - - Width = WidthCap; - Height = HeightCap; + var fontSize = 10; var fontStyle = FontStyle.Regular; Font = new Font(FontFamily.GenericMonospace, fontSize, fontStyle); @@ -71,15 +66,6 @@ namespace BizHawk.Client.EmuHawk Text = _branch.UserText; Location = location; - // Set the screenshot to "1x" resolution of the core - // cores like n64 and psx are going to still have sizes too big for the control, so cap them - if (Width > WidthCap) - { - double ratio = WidthCap / (double)Width; - Width = WidthCap; - _drawingHeight = (int)((double)(_drawingHeight) * ratio); - } - if (Padding > 0) { Padding += 2;