mirror of
https://github.com/osukey/osukey.git
synced 2025-08-01 21:58:46 +09:00
Introduce a reference counting file store
This commit is contained in:
@ -11,7 +11,6 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.IO.Stores;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.IO;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
@ -19,6 +18,7 @@ using osu.Game.Graphics.Processing;
|
||||
using osu.Game.Online.API;
|
||||
using SQLite.Net;
|
||||
using osu.Framework.Graphics.Performance;
|
||||
using osu.Game.IO;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
|
||||
@ -32,6 +32,8 @@ namespace osu.Game
|
||||
|
||||
protected RulesetDatabase RulesetDatabase;
|
||||
|
||||
protected FileDatabase FileDatabase;
|
||||
|
||||
protected ScoreDatabase ScoreDatabase;
|
||||
|
||||
protected override string MainResourceFile => @"osu.Game.Resources.dll";
|
||||
@ -96,7 +98,8 @@ namespace osu.Game
|
||||
SQLiteConnection connection = Host.Storage.GetDatabase(@"client");
|
||||
|
||||
dependencies.Cache(RulesetDatabase = new RulesetDatabase(connection));
|
||||
dependencies.Cache(BeatmapStore = new BeatmapStore(Host.Storage, connection, RulesetDatabase, Host));
|
||||
dependencies.Cache(FileDatabase = new FileDatabase(connection, Host.Storage));
|
||||
dependencies.Cache(BeatmapStore = new BeatmapStore(Host.Storage, FileDatabase, connection, RulesetDatabase, Host));
|
||||
dependencies.Cache(ScoreDatabase = new ScoreDatabase(Host.Storage, connection, Host, BeatmapStore));
|
||||
dependencies.Cache(new OsuColour());
|
||||
|
||||
@ -131,8 +134,6 @@ namespace osu.Game
|
||||
Beatmap = new NonNullableBindable<WorkingBeatmap>(defaultBeatmap);
|
||||
BeatmapStore.DefaultBeatmap = defaultBeatmap;
|
||||
|
||||
OszArchiveReader.Register();
|
||||
|
||||
dependencies.Cache(API = new APIAccess
|
||||
{
|
||||
Username = LocalConfig.Get<string>(OsuSetting.Username),
|
||||
|
Reference in New Issue
Block a user