mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 04:48:04 +09:00
Merge pull request #20329 from peppy/sqlite-unsupported-platform-crash
Fix potential startup failures if sqlite cannot be loaded
This commit is contained in:
commit
0e405a8a5a
@ -41,10 +41,17 @@ namespace osu.Game.Beatmaps
|
|||||||
private const string cache_database_name = "online.db";
|
private const string cache_database_name = "online.db";
|
||||||
|
|
||||||
public BeatmapUpdaterMetadataLookup(IAPIProvider api, Storage storage)
|
public BeatmapUpdaterMetadataLookup(IAPIProvider api, Storage storage)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
// required to initialise native SQLite libraries on some platforms.
|
// required to initialise native SQLite libraries on some platforms.
|
||||||
Batteries_V2.Init();
|
Batteries_V2.Init();
|
||||||
raw.sqlite3_config(2 /*SQLITE_CONFIG_MULTITHREAD*/);
|
raw.sqlite3_config(2 /*SQLITE_CONFIG_MULTITHREAD*/);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// may fail if platform not supported.
|
||||||
|
}
|
||||||
|
|
||||||
this.api = api;
|
this.api = api;
|
||||||
this.storage = storage;
|
this.storage = storage;
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<PackageReference Include="Sentry" Version="3.20.1" />
|
<PackageReference Include="Sentry" Version="3.20.1" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
||||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||||
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.0.4" />
|
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.1" />
|
||||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||||
<PackageReference Include="TagLibSharp" Version="2.3.0" />
|
<PackageReference Include="TagLibSharp" Version="2.3.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user