Ava UI: Fixes "Hide Cursor on Idle" for Windows (#4266)
* Ava: Fixes "Hide Cursor on Idle" for Windows * Add check in MouseDriver and reduce the time of idling * Fix linux error * Change idle time everywhere for consistencies
This commit is contained in:
parent
b402b4e7f6
commit
8071c8c8c0
6 changed files with 125 additions and 62 deletions
|
@ -70,6 +70,22 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
}
|
||||
}
|
||||
|
||||
public static IntPtr CreateEmptyCursor()
|
||||
{
|
||||
return CreateCursor(IntPtr.Zero, 0, 0, 1, 1, new byte[] { 0xFF }, new byte[] { 0x00 });
|
||||
}
|
||||
|
||||
public static IntPtr CreateArrowCursor()
|
||||
{
|
||||
return LoadCursor(IntPtr.Zero, (IntPtr)Cursors.IDC_ARROW);
|
||||
}
|
||||
|
||||
[LibraryImport("user32.dll")]
|
||||
public static partial IntPtr SetCursor(IntPtr handle);
|
||||
|
||||
[LibraryImport("user32.dll")]
|
||||
public static partial IntPtr CreateCursor(IntPtr hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, byte[] pvANDPlane, byte[] pvXORPlane);
|
||||
|
||||
[LibraryImport("user32.dll", SetLastError = true, EntryPoint = "RegisterClassExW")]
|
||||
public static partial ushort RegisterClassEx(ref WNDCLASSEX param);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue