tastudio: show branch screenshot on the right if it's offscreen

fix #1311
This commit is contained in:
feos 2018-09-08 19:32:27 +03:00
parent 5721894dbf
commit 86999815f7
1 changed files with 7 additions and 2 deletions

View File

@ -644,12 +644,17 @@ namespace BizHawk.Client.EmuHawk
BranchView.CurrentCell.RowIndex < Movie.BranchCount)
{
TasBranch branch = GetBranch(BranchView.CurrentCell.RowIndex.Value);
Point location = Location;
Point location = PointToScreen(Location);
int width = branch.OSDFrameBuffer.Width;
int height = branch.OSDFrameBuffer.Height;
location.Offset(-width, 0);
Screenshot.UpdateValues(branch, PointToScreen(location), width, height,
if (location.X < 0)
{
location.Offset(width + Width, 0);
}
Screenshot.UpdateValues(branch, location, width, height,
(int)Graphics.FromHwnd(this.Handle).MeasureString(
branch.UserText, Screenshot.Font, width).Height);