mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
cctor->Register
This commit is contained in:
parent
dcd3ba0915
commit
97005e033c
@ -14,11 +14,11 @@ namespace osu.Desktop.Beatmaps.IO
|
||||
/// </summary>
|
||||
public class LegacyFilesystemReader : ArchiveReader
|
||||
{
|
||||
static LegacyFilesystemReader()
|
||||
public static void Register()
|
||||
{
|
||||
AddReader<LegacyFilesystemReader>((storage, path) => Directory.Exists(path));
|
||||
}
|
||||
|
||||
|
||||
private string basePath { get; set; }
|
||||
private string[] beatmaps { get; set; }
|
||||
private Beatmap firstMap { get; set; }
|
||||
@ -50,10 +50,10 @@ namespace osu.Desktop.Beatmaps.IO
|
||||
{
|
||||
return firstMap.BeatmapInfo.Metadata;
|
||||
}
|
||||
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using osu.Desktop.Beatmaps.IO;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Desktop;
|
||||
using osu.Framework.Desktop.Platform;
|
||||
@ -18,6 +19,7 @@ namespace osu.Desktop
|
||||
[STAThread]
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
LegacyFilesystemReader.Register();
|
||||
using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true))
|
||||
{
|
||||
if (!host.IsPrimaryInstance)
|
||||
|
Loading…
Reference in New Issue
Block a user