mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:18:22 +08:00
Remove remnants of OsuTK
This commit is contained in:
parent
4374e7da81
commit
6eadae8aaf
@ -136,24 +136,12 @@ namespace osu.Desktop
|
||||
|
||||
var iconStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetType(), "lazer.ico");
|
||||
|
||||
switch (host.Window)
|
||||
{
|
||||
// Legacy osuTK DesktopGameWindow
|
||||
case OsuTKDesktopWindow desktopGameWindow:
|
||||
desktopGameWindow.CursorState |= CursorState.Hidden;
|
||||
desktopGameWindow.SetIconFromStream(iconStream);
|
||||
desktopGameWindow.Title = Name;
|
||||
desktopGameWindow.FileDrop += (_, e) => fileDrop(e.FileNames);
|
||||
break;
|
||||
var desktopWindow = (SDL2DesktopWindow)host.Window;
|
||||
|
||||
// SDL2 DesktopWindow
|
||||
case SDL2DesktopWindow desktopWindow:
|
||||
desktopWindow.CursorState |= CursorState.Hidden;
|
||||
desktopWindow.SetIconFromStream(iconStream);
|
||||
desktopWindow.Title = Name;
|
||||
desktopWindow.DragDrop += f => fileDrop(new[] { f });
|
||||
break;
|
||||
}
|
||||
desktopWindow.CursorState |= CursorState.Hidden;
|
||||
desktopWindow.SetIconFromStream(iconStream);
|
||||
desktopWindow.Title = Name;
|
||||
desktopWindow.DragDrop += f => fileDrop(new[] { f });
|
||||
}
|
||||
|
||||
private void fileDrop(string[] filePaths)
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Desktop
|
||||
var cwd = Environment.CurrentDirectory;
|
||||
bool useOsuTK = args.Contains("--tk");
|
||||
|
||||
using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true, useOsuTK: useOsuTK))
|
||||
using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true))
|
||||
{
|
||||
host.ExceptionThrown += handleException;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user