diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/ScreenshotForm.cs b/src/BizHawk.Client.EmuHawk/CustomControls/ScreenshotForm.cs index dac7167dc05..628da278ef8 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/ScreenshotForm.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/ScreenshotForm.cs @@ -82,7 +82,7 @@ public void UpdateValues( bb.DiscardAlpha(); _bitmap = bb.ToSysdrawingBitmap(); Width = width; - Padding = (int) measureString(captionText, Font, width).Height; + Padding = (int)measureString(captionText, Font, width).Height; _drawingHeight = height; Text = captionText; Location = location; diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs index 0cf2a7355f1..4c7c96beaed 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs @@ -3,10 +3,11 @@ using System.IO; using System.Linq; using System.Windows.Forms; + using BizHawk.Client.Common; -using BizHawk.Emulation.Common; using BizHawk.Client.EmuHawk.Properties; using BizHawk.Common.CollectionExtensions; +using BizHawk.Emulation.Common; namespace BizHawk.Client.EmuHawk { @@ -651,12 +652,25 @@ private void BranchView_PointedCellChanged(object sender, InputRoll.CellEventArg var bb = branch.OSDFrameBuffer; var width = bb.Width; Point location = PointToScreen(Location); + var bottom = location.Y + bb.Height; location.Offset(-width, 0); if (location.X < 0) { + // show on the right of branch control location.Offset(width + Width, 0); } + + Math.Max(0, location.Y); + var screen = Screen.AllScreens.Where(s => s.WorkingArea.Contains(location)).FirstOrDefault(); + var h = screen.WorkingArea.Bottom - bottom; + + if (h < 0) + { + // move up to become fully visible + location.Y += h; + } + _screenshot.UpdateValues( bb, branch.UserText,