fix code
This commit is contained in:
parent
adf74495dc
commit
cd7605d237
|
@ -92,9 +92,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
var topLeft = new Point(
|
var topLeft = new Point(
|
||||||
Math.Max(0, form.Location.X),
|
Math.Max(0, form.Location.X),
|
||||||
Math.Max(0, form.Location.Y));
|
Math.Max(0, form.Location.Y));
|
||||||
var screen = Screen.AllScreens
|
var screen = Screen.AllScreens.First(s => s.WorkingArea.Contains(topLeft));
|
||||||
.Where(s => s.WorkingArea.Contains(topLeft))
|
|
||||||
.FirstOrDefault();
|
|
||||||
var w = screen.WorkingArea.Right - form.Bounds.Right;
|
var w = screen.WorkingArea.Right - form.Bounds.Right;
|
||||||
var h = screen.WorkingArea.Bottom - form.Bounds.Bottom;
|
var h = screen.WorkingArea.Bottom - form.Bounds.Bottom;
|
||||||
if (h < 0) topLeft.Y += h;
|
if (h < 0) topLeft.Y += h;
|
||||||
|
|
|
@ -661,8 +661,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
location.Offset(width + Width, 0);
|
location.Offset(width + Width, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Math.Max(0, location.Y);
|
location.Y = Math.Max(0, location.Y);
|
||||||
var screen = Screen.AllScreens.Where(s => s.WorkingArea.Contains(location)).FirstOrDefault();
|
var screen = Screen.AllScreens.First(s => s.WorkingArea.Contains(location));
|
||||||
var h = screen.WorkingArea.Bottom - bottom;
|
var h = screen.WorkingArea.Bottom - bottom;
|
||||||
|
|
||||||
if (h < 0)
|
if (h < 0)
|
||||||
|
|
|
@ -824,9 +824,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
var bottomRight = new Point(
|
var bottomRight = new Point(
|
||||||
topLeft.X + RightClickMenu.Width,
|
topLeft.X + RightClickMenu.Width,
|
||||||
topLeft.Y + RightClickMenu.Height);
|
topLeft.Y + RightClickMenu.Height);
|
||||||
var screen = Screen.AllScreens
|
var screen = Screen.AllScreens.First(s => s.WorkingArea.Contains(topLeft));
|
||||||
.Where(s => s.WorkingArea.Contains(topLeft))
|
|
||||||
.FirstOrDefault();
|
|
||||||
// if we don't fully fit, move to the other side of the pointer
|
// if we don't fully fit, move to the other side of the pointer
|
||||||
if (bottomRight.X > screen.WorkingArea.Right)
|
if (bottomRight.X > screen.WorkingArea.Right)
|
||||||
offset.X -= RightClickMenu.Width;
|
offset.X -= RightClickMenu.Width;
|
||||||
|
|
Loading…
Reference in New Issue