Skip to content

Commit

Permalink
Converted InstallHUD() and HandleHUDInstallation() private methods fr…
Browse files Browse the repository at this point in the history
…om void to Task.
  • Loading branch information
xvitaly committed Jul 21, 2023
1 parent f0ffece commit f976857
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/srcrepair/FrmMainW.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ private async void HandleFpsConfigs()
/// <summary>
/// Installs the selected HUD.
/// </summary>
private async void HandleHUDInstallation()
private async Task HandleHUDInstallation()
{
try
{
Expand Down Expand Up @@ -1439,7 +1439,7 @@ private bool DownloadHUD(bool ForceMirror = false)
/// <summary>
/// Installs the contents of the downloaded HUD archive.
/// </summary>
private void InstallHUD()
private async Task InstallHUD()
{
// Checking hash of downloaded file...
if (Properties.Settings.Default.HUDUseUpstream || App.SourceGames[AppSelector.Text].HUDMan[HD_HSel.Text].CheckHash())
Expand All @@ -1455,7 +1455,7 @@ private void InstallHUD()
GuiHelpers.FormShowArchiveExtract(App.SourceGames[AppSelector.Text].HUDMan[HD_HSel.Text].LocalFile, Path.Combine(App.SourceGames[AppSelector.Text].CustomInstallDir, "hudtemp"));

// Installing files in a separate thread...
HandleHUDInstallation();
await HandleHUDInstallation();
}
else
{
Expand Down Expand Up @@ -3236,7 +3236,7 @@ private async void HD_HSel_SelectedIndexChanged(object sender, EventArgs e)
/// </summary>
/// <param name="sender">Sender object.</param>
/// <param name="e">Event arguments.</param>
private void HD_Install_Click(object sender, EventArgs e)
private async void HD_Install_Click(object sender, EventArgs e)
{
if (App.SourceGames[AppSelector.Text].HUDMan[HD_HSel.Text].IsUpdated)
{
Expand All @@ -3255,7 +3255,7 @@ private void HD_Install_Click(object sender, EventArgs e)
// Installing downloaded HUD...
if (DownloadResult)
{
InstallHUD();
await InstallHUD();
}
else
{
Expand Down

0 comments on commit f976857

Please sign in to comment.