mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-27 23:49:15 +00:00
Windows Fullscreen Fixes (#87)
This PR fixes two bugs introduced in #80 : - Exiting fullscreen could exit the Ryujinx window (https://github.com/Ryubing/Issues/issues/415) - Toggling fullscreen on would move the window to the primary monitor And two other bugs related to input view : - Exiting fullscreen when window was previously in a non maximized state now conserves the window coordinates and size properly (https://github.com/Ryubing/Issues/issues/425) - Opening the ryujinx app no makes the app grow slightly larger vertically on each launch (+31px on my 1080p monitor) (https://github.com/Ryubing/Issues/issues/425) Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/87
This commit is contained in:
@@ -63,6 +63,18 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct NativeRect
|
||||
{
|
||||
public int Left;
|
||||
public int Top;
|
||||
public int Right;
|
||||
public int Bottom;
|
||||
|
||||
public int Width => Right - Left;
|
||||
public int Height => Bottom - Top;
|
||||
}
|
||||
|
||||
public static nint CreateEmptyCursor()
|
||||
{
|
||||
return CreateCursor(nint.Zero, 0, 0, 1, 1, [0xFF], [0x00]);
|
||||
@@ -119,6 +131,10 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
[LibraryImport("user32.dll", SetLastError = true)]
|
||||
public static partial nint SetWindowLongPtrW(nint hWnd, int nIndex, nint value);
|
||||
|
||||
[LibraryImport("user32.dll", SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static partial bool GetWindowRect(nint hWnd, out NativeRect lpRect);
|
||||
|
||||
[LibraryImport("user32.dll", SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static partial bool SetWindowPos(
|
||||
|
||||
Reference in New Issue
Block a user