mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-04 04:58:23 +00:00
[Linux] Fixed GameWindow.ClientSize values.
This commit is contained in:
parent
bef4901659
commit
e61b39a1a1
|
@ -55,11 +55,23 @@ namespace OpenTK.Platform.Linux
|
||||||
Debug.Print("[KMS] Creating window on display {0:x}", display);
|
Debug.Print("[KMS] Creating window on display {0:x}", display);
|
||||||
|
|
||||||
Title = title;
|
Title = title;
|
||||||
bounds = new Rectangle(0, 0, width, height);
|
|
||||||
client_size = bounds.Size;
|
display_device = display_device ?? DisplayDevice.Default;
|
||||||
|
if (display_device == null)
|
||||||
|
{
|
||||||
|
throw new NotSupportedException("[KMS] Driver does not currently support headless systems");
|
||||||
|
}
|
||||||
|
|
||||||
window = new LinuxWindowInfo(display, fd, display_device.Id as LinuxDisplay);
|
window = new LinuxWindowInfo(display, fd, display_device.Id as LinuxDisplay);
|
||||||
|
|
||||||
|
// Note: we only support fullscreen windows on KMS.
|
||||||
|
// We implicitly override the requested width and height
|
||||||
|
// by the width and height of the DisplayDevice, if any.
|
||||||
|
width = display_device.Width;
|
||||||
|
height = display_device.Height;
|
||||||
|
bounds = new Rectangle(0, 0, width, height);
|
||||||
|
client_size = bounds.Size;
|
||||||
|
|
||||||
if (!mode.Index.HasValue)
|
if (!mode.Index.HasValue)
|
||||||
{
|
{
|
||||||
mode = new EglGraphicsMode().SelectGraphicsMode(window, mode, 0);
|
mode = new EglGraphicsMode().SelectGraphicsMode(window, mode, 0);
|
||||||
|
@ -74,15 +86,6 @@ namespace OpenTK.Platform.Linux
|
||||||
format = SurfaceFormat.XRGB8888;
|
format = SurfaceFormat.XRGB8888;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: we only support fullscreen windows on KMS.
|
|
||||||
// We implicitly override the requested width and height
|
|
||||||
// by the width and height of the DisplayDevice, if any.
|
|
||||||
if (display_device != null)
|
|
||||||
{
|
|
||||||
width = display_device.Width;
|
|
||||||
height = display_device.Height;
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Print("[KMS] Creating GBM surface on {0:x} with {1}x{2} {3} [{4}]",
|
Debug.Print("[KMS] Creating GBM surface on {0:x} with {1}x{2} {3} [{4}]",
|
||||||
gbm, width, height, format, usage);
|
gbm, width, height, format, usage);
|
||||||
IntPtr gbm_surface = Gbm.CreateSurface(gbm,
|
IntPtr gbm_surface = Gbm.CreateSurface(gbm,
|
||||||
|
|
Loading…
Reference in a new issue