Skip to content

Commit

Permalink
Release 1.11.1
Browse files Browse the repository at this point in the history
Release 1.11.1
  • Loading branch information
Yelo420 committed Jun 28, 2024
2 parents 1141438 + d3267dd commit e132c47
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 11 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# GameVault App Changelog

## 1.11.1.0
Recommended Gamevault Server Version: `v12.2.0`
### Changes

- Added share button to gameview
- Bug fix: Desktop shortcut was created when opening the game settings
- Bug fix: Crash on download/extraction notification if box image is not set
- Bug fix: Rare crash on Phalcode sign-in window

## 1.11.0.0
Recommended Gamevault Server Version: `v12.2.0`
### Changes
Expand Down
2 changes: 1 addition & 1 deletion gamevault/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
[assembly: AssemblyVersion("1.11.0.0")]
[assembly: AssemblyVersion("1.11.1.0")]
[assembly: AssemblyCopyright("© Phalcode™. All Rights Reserved.")]
#if DEBUG
[assembly: XmlnsDefinition("debug-mode", "Namespace")]
Expand Down
6 changes: 6 additions & 0 deletions gamevault/Helper/DesktopHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,11 @@ public static void RemoveShotcut(Game game)
}
catch { }
}
public static bool ShortcutExists(Game game)
{
string desktopDir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
string shortcutPath = desktopDir + @"\\" + game.Title + ".url";
return File.Exists(shortcutPath);
}
}
}
13 changes: 10 additions & 3 deletions gamevault/Helper/WpfEmbeddedBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ public async Task<BrowserResult> InvokeAsync(BrowserOptions options, Cancellatio
{
ResultType = BrowserResultType.UserCancel
};

//signinWindow.Owner = App.Current.MainWindow;
signinWindow.Closing += (s, e) =>
{
semaphoreSlim.Release();
if (semaphoreSlim.CurrentCount == 0) // Ensure semaphore is not already released
{
semaphoreSlim.Release();
}
webView.Dispose();
};

Expand All @@ -72,7 +75,10 @@ public async Task<BrowserResult> InvokeAsync(BrowserOptions options, Cancellatio
Response = new Uri(e.Uri).AbsoluteUri
};
semaphoreSlim.Release();
if (semaphoreSlim.CurrentCount == 0) // Ensure semaphore is not already released
{
semaphoreSlim.Release();
}
signinWindow.Close();
}
};
Expand Down Expand Up @@ -102,6 +108,7 @@ public async Task<BrowserResult> InvokeAsync(BrowserOptions options, Cancellatio

return browserResult;
}

public void ShowWindowIfHidden()
{
if (signinWindow.ShowInTaskbar == false)
Expand Down
5 changes: 4 additions & 1 deletion gamevault/Resources/Assets/Icons.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,8 @@
<Geometry x:Key="IconGameViewMetacritic">
M11.99 0A12 12 0 1 0 24 12v-.014A12 12 0 0 0 11.99 0m-.055 2.564a9.399 9.399 0 0 1 9.407 9.389v.01a9.399 9.399 0 1 1-9.408-9.399Zm-1.61 17.198l2.046-2.046l-3.94-3.94c-.165-.166-.345-.373-.442-.608c-.221-.47-.318-1.203.221-1.742c.664-.664 1.548-.387 2.406.47l3.788 3.788l2.046-2.046l-3.954-3.954a2.48 2.48 0 0 1-.456-.622c-.263-.539-.25-1.216.235-1.7c.677-.678 1.562-.429 2.544.553l3.677 3.677l2.046-2.046l-3.982-3.982c-2.018-2.018-3.912-1.949-5.212-.65c-.498.499-.802 1.024-.954 1.618a4.026 4.026 0 0 0-.055 1.686l-.027.028c-.996-.414-2.13-.166-3 .705c-1.162 1.161-1.12 2.392-.982 3.11l-.042.043l-1.009-.816l-1.77 1.77a64.1 64.1 0 0 1 2.213 2.1z
</Geometry>
<!--EndGameView-->
<Geometry x:Key="IconGameViewShare">
M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81c1.66 0 3-1.34 3-3s-1.34-3-3-3s-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65c0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92
</Geometry>
<!--EndGameView-->
</ResourceDictionary>
8 changes: 4 additions & 4 deletions gamevault/UserControls/GameDownloadUserControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private async Task DownloadGame(bool tryResume = false)
if (downloadRetryTimer.Data != "error")
{
if (!App.Instance.IsWindowActiveAndControlInFocus(MainControl.Downloads))
ToastMessageHelper.CreateToastMessage("Download Failed", ViewModel.Game.Title, $"{AppFilePath.ImageCache}/gbox/{ViewModel.Game.ID}.{ViewModel.Game.BoxImage.ID}");
ToastMessageHelper.CreateToastMessage("Download Failed", ViewModel.Game.Title, $"{AppFilePath.ImageCache}/gbox/{ViewModel.Game.ID}.{ViewModel.Game.BoxImage?.ID}");
}
downloadRetryTimer.Start();

Expand Down Expand Up @@ -308,7 +308,7 @@ private void DownloadCompleted()
MainWindowViewModel.Instance.Library.GetGameInstalls().AddSystemFileWatcher(ViewModel.InstallPath);

if (!App.Instance.IsWindowActiveAndControlInFocus(MainControl.Downloads))
ToastMessageHelper.CreateToastMessage("Download Complete", ViewModel.Game.Title, $"{AppFilePath.ImageCache}/gbox/{ViewModel.Game.ID}.{ViewModel.Game.BoxImage.ID}");
ToastMessageHelper.CreateToastMessage("Download Complete", ViewModel.Game.Title, $"{AppFilePath.ImageCache}/gbox/{ViewModel.Game.ID}.{ViewModel.Game.BoxImage?.ID}");

if (SettingsViewModel.Instance.AutoExtract)
{
Expand Down Expand Up @@ -487,7 +487,7 @@ private async Task Extract()
ViewModel.ExtractionUIVisibility = System.Windows.Visibility.Hidden;

if (!App.Instance.IsWindowActiveAndControlInFocus(MainControl.Downloads))
ToastMessageHelper.CreateToastMessage("Extraction Complete", ViewModel.Game.Title, $"{AppFilePath.ImageCache}/gbox/{ViewModel.Game.ID}.{ViewModel.Game.BoxImage.ID}");
ToastMessageHelper.CreateToastMessage("Extraction Complete", ViewModel.Game.Title, $"{AppFilePath.ImageCache}/gbox/{ViewModel.Game.ID}.{ViewModel.Game.BoxImage?.ID}");

if (SettingsViewModel.Instance.AutoInstallPortable && (ViewModel.Game.Type == GameType.WINDOWS_PORTABLE || ViewModel.Game.Type == GameType.LINUX_PORTABLE))
{
Expand Down Expand Up @@ -524,7 +524,7 @@ private async Task Extract()
{
ViewModel.State = "Something went wrong during extraction";
if (!App.Instance.IsWindowActiveAndControlInFocus(MainControl.Downloads))
ToastMessageHelper.CreateToastMessage("Extraction Failed", ViewModel.Game.Title, $"{AppFilePath.ImageCache}/gbox/{ViewModel.Game.ID}.{ViewModel.Game.BoxImage.ID}");
ToastMessageHelper.CreateToastMessage("Extraction Failed", ViewModel.Game.Title, $"{AppFilePath.ImageCache}/gbox/{ViewModel.Game.ID}.{ViewModel.Game.BoxImage?.ID}");
}
ViewModel.ExtractionUIVisibility = System.Windows.Visibility.Hidden;
}
Expand Down
7 changes: 5 additions & 2 deletions gamevault/UserControls/GameSettingsUserControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,11 @@ private void Executable_SelectionChanged(object sender, SelectionChangedEventArg
if (Directory.Exists(ViewModel.Directory))
{
Preferences.Set(AppConfigKey.Executable, SavedExecutable, $"{ViewModel.Directory}\\gamevault-exec");
DesktopHelper.RemoveShotcut(ViewModel.Game);
DesktopHelper.CreateShortcut(ViewModel.Game, SavedExecutable, false);
if (e.RemovedItems.Count > 0 && DesktopHelper.ShortcutExists(ViewModel.Game))
{
DesktopHelper.RemoveShotcut(ViewModel.Game);
DesktopHelper.CreateShortcut(ViewModel.Game, SavedExecutable, false);
}
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions gamevault/UserControls/GameViewUserControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@
</Style>
</ToggleButton.Style>
</ToggleButton>
<Grid Style="{DynamicResource HoverEffect}" VerticalAlignment="Top" HorizontalAlignment="Left" Background="Transparent" Cursor="Hand" Width="70" Height="70" Margin="48,-2.7,0,0" RenderTransformOrigin="0.5,0.5" MouseLeftButtonUp="Share_Click">
<Path Data="{StaticResource IconGameViewShare}" Fill="{DynamicResource MahApps.Brushes.ThemeForeground}" RenderTransformOrigin="0.03,0.01">
<Path.RenderTransform>
<ScaleTransform ScaleX="2.95" ScaleY="2.95"/>
</Path.RenderTransform>
</Path>
<Grid.RenderTransform>
<ScaleTransform/>
</Grid.RenderTransform>
</Grid>
</StackPanel>
<!--TAGS_GENRES-->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="400,150,0,10">
Expand Down
11 changes: 11 additions & 0 deletions gamevault/UserControls/GameViewUserControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,5 +233,16 @@ private void GameType_Clicked(object sender, RoutedEventArgs e)
}
catch { }
}

private void Share_Click(object sender, MouseButtonEventArgs e)
{
try
{
string shareLink = $"gamevault://show?gameid={ViewModel?.Game?.ID}";
Clipboard.SetText(shareLink);
MainWindowViewModel.Instance.AppBarText = "Sharelink copied to clipboard";
}
catch { }
}
}
}

0 comments on commit e132c47

Please sign in to comment.