Skip to content

Commit 12d459f

Browse files
committed
Setting to deactivate the primary cloud save manifest in order to use only the user-defined manifests
1 parent fcbd34b commit 12d459f

File tree

7 files changed

+43
-21
lines changed

7 files changed

+43
-21
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# GameVault App Changelog
22

33
## 1.16.0
4-
Recommended Gamevault Server Version: `v14.0.0`
4+
Recommended Gamevault Server Version: `v14.1.0`
55
### Changes
66

77
- Added auto Cloud Save Redirects
88
- Added support for custom Cloud Save Manifests
9+
- Setting to deactivate the primary cloud save manifest in order to use only the user-defined manifests
910
- Library can now filter for Developers and Publishers
1011
- You can now uninstall community themes from the settings
12+
- Improved the game metadata search UI
13+
- Bug fix: Startup crash when gamevault tries to set the windows jumplist
1114

1215
## 1.15.0
1316
Recommended Gamevault Server Version: `v14.0.0`

gamevault/App.xaml.cs

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -187,24 +187,28 @@ private void InitJumpList()
187187
}
188188
public void SetJumpListGames()
189189
{
190-
var lastGames = InstallViewModel.Instance.InstalledGames.Take(5).ToArray();
191-
foreach (var game in lastGames)
190+
try
192191
{
193-
if (!jumpList.JumpItems.OfType<JumpTask>().Any(jt => jt.Title == game.Key.Title))
192+
var lastGames = InstallViewModel.Instance.InstalledGames.Take(5).ToArray();
193+
foreach (var game in lastGames)
194194
{
195-
JumpTask gameTask = new JumpTask()
195+
if (!jumpList.JumpItems.OfType<JumpTask>().Any(jt => jt.Title == game.Key.Title))
196196
{
197-
Title = game.Key.Title,
198-
CustomCategory = "Last Played",
199-
ApplicationPath = Process.GetCurrentProcess().MainModule.FileName,
200-
IconResourcePath = Preferences.Get(AppConfigKey.Executable, $"{game.Value}\\gamevault-exec"),
201-
Arguments = $"start --gameid={game.Key.ID}"
202-
};
203-
jumpList.JumpItems.Add(gameTask);
197+
JumpTask gameTask = new JumpTask()
198+
{
199+
Title = game.Key.Title,
200+
CustomCategory = "Last Played",
201+
ApplicationPath = Process.GetCurrentProcess()?.MainModule?.FileName,
202+
IconResourcePath = Preferences.Get(AppConfigKey.Executable, $"{game.Value}\\gamevault-exec"),
203+
Arguments = $"start --gameid={game.Key.ID}"
204+
};
205+
jumpList.JumpItems.Add(gameTask);
206+
}
204207
}
205-
}
206208

207-
jumpList.Apply();
209+
jumpList.Apply();
210+
}
211+
catch { }
208212
}
209213
private void RestoreTheme()
210214
{
@@ -213,7 +217,7 @@ private void RestoreTheme()
213217
string currentThemeString = Preferences.Get(AppConfigKey.Theme, AppFilePath.UserFile, true);
214218
if (currentThemeString != string.Empty)
215219
{
216-
ThemeItem currentTheme = JsonSerializer.Deserialize<ThemeItem>(currentThemeString);
220+
ThemeItem currentTheme = JsonSerializer.Deserialize<ThemeItem>(currentThemeString)!;
217221

218222
if (App.Current.Resources.MergedDictionaries[0].Source.OriginalString != currentTheme.Path)
219223
{

gamevault/Helper/Integrations/SaveGameHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public void PrepareConfigFile(string installationPath, string yamlPath)
228228
{
229229
var manifest = new Dictionary<string, object>
230230
{
231-
{ "enable", true },
231+
{ "enable", SettingsViewModel.Instance.UsePrimaryCloudSaveManifest },
232232
{ "secondary", new List<Dictionary<string, object>>() }
233233
};
234234

gamevault/Models/AppInfo.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ public enum AppConfigKey
5151
DevTargetPhalcodeTestBackend,
5252
//
5353
InstallationId,
54-
CustomLudusaviManifests
54+
CustomCloudSaveManifests,
55+
UsePrimaryCloudSaveManifest
56+
5557
}
5658
public static class AppFilePath
5759
{

gamevault/UserControls/SettingsUserControl.xaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,10 @@
498498
<TextBlock Text="Automatically backs up and restores your latest savefiles via your GameVault Server, ensuring seamless transitions between installations and devices. " FontSize="15"/>
499499
<TextBlock Text="Requires GameVault Server with savefiles feature enabled." FontSize="12" FontStyle="Italic"/>
500500
<mah:ToggleSwitch Margin="0,5,0,0" IsOn="{Binding CloudSaves}"/>
501-
<TextBlock Text="Custom Ludusavi Manifests" Margin="0,2,0,1" FontSize="15"/>
501+
<StackPanel Orientation="Horizontal">
502+
<TextBlock Text="Custom Ludusavi Manifests" Margin="0,2,0,2" FontSize="15"/>
503+
<CheckBox Content="Use Primary Manifest" IsChecked="{Binding UsePrimaryCloudSaveManifest}" Margin="15,0,0,0" ToolTip="Disable primary Ludusavi manifest to only use the custom ones"/>
504+
</StackPanel>
502505
<ScrollViewer MaxHeight="100" VerticalScrollBarVisibility="Auto" Width="550" HorizontalAlignment="Left">
503506
<ItemsControl ItemsSource="{Binding CustomCloudSaveManifests}">
504507
<ItemsControl.ItemsPanel>

gamevault/UserControls/SettingsUserControl.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ private void SaveCustomCloudSaveManifests_Click(object sender, RoutedEventArgs e
559559
try
560560
{
561561
string result = string.Join(";", ViewModel.CustomCloudSaveManifests.Where(entry => !string.IsNullOrWhiteSpace(entry.Uri)).Select(entry => entry.Uri));
562-
Preferences.Set(AppConfigKey.CustomLudusaviManifests, result, AppFilePath.UserFile);
562+
Preferences.Set(AppConfigKey.CustomCloudSaveManifests, result, AppFilePath.UserFile);
563563
}
564564
catch { }
565565
MainWindowViewModel.Instance.AppBarText = "Successfully saved custom Ludusavi Manifests";

gamevault/ViewModels/SettingsViewModel.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public static SettingsViewModel Instance
6060
private bool syncDiscordPresence { get; set; }
6161
private bool cloudSaves { get; set; }
6262
private bool isCommunityThemeSelected { get; set; }
63+
private bool usePrimaryCloudSaveManifest { get; set; }
6364
private ObservableCollection<LudusaviManifestEntry> customCloudSaveManifests;
6465
//DevMode
6566
private bool devModeEnabled { get; set; }
@@ -114,8 +115,10 @@ public SettingsViewModel()
114115
DownloadLimit = 0;
115116
DownloadLimitUIValue = 0;
116117
}
118+
string usePrimaryCloudSaveManifestString = Preferences.Get(AppConfigKey.UsePrimaryCloudSaveManifest, AppFilePath.UserFile);
119+
usePrimaryCloudSaveManifest = usePrimaryCloudSaveManifestString == "1" || usePrimaryCloudSaveManifestString == "";
117120

118-
string customCloudSaveManifestsString = Preferences.Get(AppConfigKey.CustomLudusaviManifests, AppFilePath.UserFile);
121+
string customCloudSaveManifestsString = Preferences.Get(AppConfigKey.CustomCloudSaveManifests, AppFilePath.UserFile);
119122
customCloudSaveManifests = string.IsNullOrWhiteSpace(customCloudSaveManifestsString) ? null! : new ObservableCollection<LudusaviManifestEntry>(customCloudSaveManifestsString.Split(';').Select(part => new LudusaviManifestEntry { Uri = part }).ToList());
120123

121124
//DevMode
@@ -375,7 +378,14 @@ public PhalcodeProduct License
375378
set { license = value; OnPropertyChanged(); }
376379
}
377380

378-
381+
public bool UsePrimaryCloudSaveManifest
382+
{
383+
get
384+
{
385+
return usePrimaryCloudSaveManifest;
386+
}
387+
set { usePrimaryCloudSaveManifest = value; Preferences.Set(AppConfigKey.UsePrimaryCloudSaveManifest, usePrimaryCloudSaveManifest ? "1" : "0", AppFilePath.UserFile); OnPropertyChanged(); }
388+
}
379389
public ObservableCollection<LudusaviManifestEntry> CustomCloudSaveManifests
380390
{
381391
get

0 commit comments

Comments
 (0)