mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 16:15:28 +00:00
Fixed fullscreen mode size.
This commit is contained in:
parent
cf41a23fb1
commit
0af1e98a56
|
@ -77,8 +77,11 @@ namespace OpenTK.Platform.Windows
|
||||||
// Get window size
|
// Get window size
|
||||||
int _width = Marshal.ReadInt32(m.LParam, (int)Marshal.OffsetOf(typeof(WindowPosition), "cx"));
|
int _width = Marshal.ReadInt32(m.LParam, (int)Marshal.OffsetOf(typeof(WindowPosition), "cx"));
|
||||||
int _height = Marshal.ReadInt32(m.LParam, (int)Marshal.OffsetOf(typeof(WindowPosition), "cy"));
|
int _height = Marshal.ReadInt32(m.LParam, (int)Marshal.OffsetOf(typeof(WindowPosition), "cy"));
|
||||||
|
if (!fullscreen)
|
||||||
|
{
|
||||||
_width -= (left_border + right_border);
|
_width -= (left_border + right_border);
|
||||||
_height -= (top_border + bottom_border);
|
_height -= (top_border + bottom_border);
|
||||||
|
}
|
||||||
//if (resizeEventArgs.Width != width || resizeEventArgs.Height != height)
|
//if (resizeEventArgs.Width != width || resizeEventArgs.Height != height)
|
||||||
if (width != _width || height != _height)
|
if (width != _width || height != _height)
|
||||||
{
|
{
|
||||||
|
@ -203,6 +206,7 @@ namespace OpenTK.Platform.Windows
|
||||||
{
|
{
|
||||||
style = (IntPtr)(int)(WindowStyle.Popup | WindowStyle.ClipChildren | WindowStyle.ClipSiblings);
|
style = (IntPtr)(int)(WindowStyle.Popup | WindowStyle.ClipChildren | WindowStyle.ClipSiblings);
|
||||||
command = ShowWindowCommand.SHOWMAXIMIZED;
|
command = ShowWindowCommand.SHOWMAXIMIZED;
|
||||||
|
|
||||||
pre_maximized = new Rectangle(width, height);
|
pre_maximized = new Rectangle(width, height);
|
||||||
Functions.AdjustWindowRect(ref pre_maximized, WindowStyle.OverlappedWindow, false);
|
Functions.AdjustWindowRect(ref pre_maximized, WindowStyle.OverlappedWindow, false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue