mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Fix cursor not hiding with SDL2 backend
This commit is contained in:
parent
969d0b7228
commit
b89dcb6a77
@ -122,14 +122,22 @@ namespace osu.Desktop
|
|||||||
{
|
{
|
||||||
base.SetHost(host);
|
base.SetHost(host);
|
||||||
|
|
||||||
if (host.Window is DesktopGameWindow desktopWindow)
|
switch (host.Window)
|
||||||
{
|
{
|
||||||
desktopWindow.CursorState |= CursorState.Hidden;
|
// Legacy osuTK DesktopGameWindow
|
||||||
|
case DesktopGameWindow desktopGameWindow:
|
||||||
|
desktopGameWindow.CursorState |= CursorState.Hidden;
|
||||||
|
desktopGameWindow.SetIconFromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream(GetType(), "lazer.ico"));
|
||||||
|
desktopGameWindow.Title = Name;
|
||||||
|
desktopGameWindow.FileDrop += fileDrop;
|
||||||
|
break;
|
||||||
|
|
||||||
desktopWindow.SetIconFromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream(GetType(), "lazer.ico"));
|
// SDL2 DesktopWindow
|
||||||
desktopWindow.Title = Name;
|
case DesktopWindow desktopWindow:
|
||||||
|
desktopWindow.CursorState.Value |= CursorState.Hidden;
|
||||||
desktopWindow.FileDrop += fileDrop;
|
desktopWindow.Title = Name;
|
||||||
|
desktopWindow.FileDrop += fileDrop;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user