From f976857354ecb55f7d08d2098f0011fea26f5368 Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Fri, 21 Jul 2023 13:31:47 +0200 Subject: [PATCH] Converted InstallHUD() and HandleHUDInstallation() private methods from void to Task. --- src/srcrepair/FrmMainW.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/srcrepair/FrmMainW.cs b/src/srcrepair/FrmMainW.cs index d5c74a20..9d8969be 100644 --- a/src/srcrepair/FrmMainW.cs +++ b/src/srcrepair/FrmMainW.cs @@ -1208,7 +1208,7 @@ private async void HandleFpsConfigs() /// /// Installs the selected HUD. /// - private async void HandleHUDInstallation() + private async Task HandleHUDInstallation() { try { @@ -1439,7 +1439,7 @@ private bool DownloadHUD(bool ForceMirror = false) /// /// Installs the contents of the downloaded HUD archive. /// - 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()) @@ -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 { @@ -3236,7 +3236,7 @@ private async void HD_HSel_SelectedIndexChanged(object sender, EventArgs e) /// /// Sender object. /// Event arguments. - 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) { @@ -3255,7 +3255,7 @@ private void HD_Install_Click(object sender, EventArgs e) // Installing downloaded HUD... if (DownloadResult) { - InstallHUD(); + await InstallHUD(); } else {