From b29438607788c65e397b8e568d8fb9daf82aff02 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 4 Mar 2017 16:47:37 +0900 Subject: [PATCH] Remove misleading beatmap import method. --- osu.Desktop/OsuGameDesktop.cs | 3 ++- osu.Game/OsuGame.cs | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/osu.Desktop/OsuGameDesktop.cs b/osu.Desktop/OsuGameDesktop.cs index d9b9c31617..d3358da013 100644 --- a/osu.Desktop/OsuGameDesktop.cs +++ b/osu.Desktop/OsuGameDesktop.cs @@ -9,6 +9,7 @@ using osu.Desktop.Overlays; using System.Reflection; using System.Drawing; +using System.Threading.Tasks; using osu.Game.Screens.Menu; namespace osu.Desktop @@ -56,7 +57,7 @@ private void dragDrop(DragEventArgs e) // this method will only be executed if e.Effect in dragEnter gets set to something other that None. var dropData = e.Data.GetData(DataFormats.FileDrop) as object[]; var filePaths = dropData.Select(f => f.ToString()).ToArray(); - ImportBeatmapsAsync(filePaths); + Task.Run(() => BeatmapDatabase.Import(filePaths)); } private void dragEnter(DragEventArgs e) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 9f7e3e04dc..c56907c86d 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -84,7 +84,7 @@ private void load() if (args?.Length > 0) { var paths = args.Where(a => !a.StartsWith(@"-")); - ImportBeatmapsAsync(paths); + Task.Run(() => BeatmapDatabase.Import(paths)); } Dependencies.Cache(this); @@ -92,11 +92,6 @@ private void load() PlayMode = LocalConfig.GetBindable(OsuConfig.PlayMode); } - protected async void ImportBeatmapsAsync(IEnumerable paths) - { - await Task.Run(() => BeatmapDatabase.Import(paths)); - } - protected override void LoadComplete() { base.LoadComplete();