From c83bb31407d948154ce2e1e52b7c25fdc2db69ce Mon Sep 17 00:00:00 2001 From: Dario Date: Thu, 30 Jan 2025 21:16:33 -0300 Subject: [PATCH] Fix build and enum class. --- UnleashedRecomp/CMakeLists.txt | 1 + UnleashedRecomp/install/update_checker.cpp | 7 +++---- UnleashedRecomp/install/update_checker.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/UnleashedRecomp/CMakeLists.txt b/UnleashedRecomp/CMakeLists.txt index 3724a1c8..9f90cd04 100644 --- a/UnleashedRecomp/CMakeLists.txt +++ b/UnleashedRecomp/CMakeLists.txt @@ -164,6 +164,7 @@ set(UNLEASHED_RECOMP_INSTALL_CXX_SOURCES "install/installer.cpp" "install/iso_file_system.cpp" "install/memory_mapped_file.cpp" + "install/update_checker.cpp" "install/xcontent_file_system.cpp" "install/xex_patcher.cpp" "install/hashes/apotos_shamar.cpp" diff --git a/UnleashedRecomp/install/update_checker.cpp b/UnleashedRecomp/install/update_checker.cpp index 9a82e299..6175f8f7 100644 --- a/UnleashedRecomp/install/update_checker.cpp +++ b/UnleashedRecomp/install/update_checker.cpp @@ -19,7 +19,7 @@ static const char *USER_AGENT = "UnleashedRecomp-Agent"; static std::atomic g_updateCheckerInProgress = false; static std::atomic g_updateCheckerFinished = false; -static UpdateChecker::Result g_updateCheckerResult = UpdateChecker::NotStarted; +static UpdateChecker::Result g_updateCheckerResult = UpdateChecker::Result::NotStarted; size_t updateCheckerWriteCallback(void *contents, size_t size, size_t nmemb, std::string *output) { @@ -130,7 +130,6 @@ bool UpdateChecker::start() g_updateCheckerInProgress = true; g_updateCheckerFinished = false; - g_updateCheckerResult = InProgress; std::thread thread(&updateCheckerThread); thread.detach(); @@ -145,11 +144,11 @@ UpdateChecker::Result UpdateChecker::check() } else if (g_updateCheckerInProgress) { - return UpdateChecker::InProgress; + return UpdateChecker::Result::InProgress; } else { - return UpdateChecker::NotStarted; + return UpdateChecker::Result::NotStarted; } } diff --git a/UnleashedRecomp/install/update_checker.h b/UnleashedRecomp/install/update_checker.h index 60fe2a97..484eaaaa 100644 --- a/UnleashedRecomp/install/update_checker.h +++ b/UnleashedRecomp/install/update_checker.h @@ -2,7 +2,7 @@ struct UpdateChecker { - enum Result + enum class Result { NotStarted, InProgress,