Skip to content

Commit 5fef2ea

Browse files
committed
Splash.png works too
1 parent 3c40dac commit 5fef2ea

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

Source/vj0/Models/Profiles/Display/ProfileSplash.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public ProfileSplash(BaseProfileDisplay profile)
5151

5252
var splashPath = Path.Combine(ContentFolder, "Splash", "Splash.bmp");
5353

54+
if (!File.Exists(splashPath)) splashPath = Path.Combine(ContentFolder, "Splash", "Splash.png");
5455
if (!File.Exists(splashPath)) return null;
5556

5657
try

Source/vj0/Models/Profiles/Profile.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public async Task Initialize(CancellationToken cancellationToken = default)
8787
}
8888
await LoadKeys(cancellationToken);
8989

90-
if (Provider is not null && Provider.Keys.Count == 0 && Provider.RequiredKeys.Count > 0)
90+
if (Provider is not null && Provider.Files.Count == 0 && Provider.Keys.Count == 0 && Provider.RequiredKeys.Count == 0)
9191
{
9292
Status.OnFailure("Please enter a valid AES encryption key in the profile settings.");
9393
OnInitializationFailure?.Invoke(this);
@@ -111,13 +111,12 @@ public async Task Initialize(CancellationToken cancellationToken = default)
111111
{
112112
return;
113113
}
114-
await Provider.MountAsync();
114+
// ? await Provider.MountAsync();
115115

116116
if (cancellationToken.IsCancellationRequested)
117117
{
118118
return;
119119
}
120-
Provider.PostMount();
121120

122121
SetLanguage(Settings.Application.GameLanguage);
123122
}
@@ -257,12 +256,12 @@ private async Task LoadKeys(CancellationToken cancellationToken = default)
257256
{
258257
return;
259258
}
260-
259+
261260
if (Encryption.HasKeys && Provider is not null)
262261
{
263262
foreach (var vfs in Provider.UnloadedVfs.ToArray())
264263
{
265-
foreach (var extraKey in Encryption.Keys.Where(extraKey => extraKey.IsValid && extraKey.Key != "").Where(extraKey => vfs.TestAesKey(extraKey.AESKey)))
264+
foreach (var extraKey in Encryption.Keys.Where(extraKey => extraKey.IsValid && extraKey.Key != ""))
266265
{
267266
if (Provider is null) continue;
268267

@@ -276,6 +275,15 @@ private async Task LoadKeys(CancellationToken cancellationToken = default)
276275
}
277276
}
278277
}
278+
279+
if (Provider is null) return;
280+
281+
if (cancellationToken.IsCancellationRequested)
282+
{
283+
return;
284+
}
285+
286+
Provider.PostMount();
279287
}
280288
}
281289

0 commit comments

Comments
 (0)