Fix build and enum class.

This commit is contained in:
Dario 2025-01-30 21:16:33 -03:00
parent 4c1aa74101
commit c83bb31407
3 changed files with 5 additions and 5 deletions

View file

@ -164,6 +164,7 @@ set(UNLEASHED_RECOMP_INSTALL_CXX_SOURCES
"install/installer.cpp" "install/installer.cpp"
"install/iso_file_system.cpp" "install/iso_file_system.cpp"
"install/memory_mapped_file.cpp" "install/memory_mapped_file.cpp"
"install/update_checker.cpp"
"install/xcontent_file_system.cpp" "install/xcontent_file_system.cpp"
"install/xex_patcher.cpp" "install/xex_patcher.cpp"
"install/hashes/apotos_shamar.cpp" "install/hashes/apotos_shamar.cpp"

View file

@ -19,7 +19,7 @@ static const char *USER_AGENT = "UnleashedRecomp-Agent";
static std::atomic<bool> g_updateCheckerInProgress = false; static std::atomic<bool> g_updateCheckerInProgress = false;
static std::atomic<bool> g_updateCheckerFinished = false; static std::atomic<bool> 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) 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_updateCheckerInProgress = true;
g_updateCheckerFinished = false; g_updateCheckerFinished = false;
g_updateCheckerResult = InProgress;
std::thread thread(&updateCheckerThread); std::thread thread(&updateCheckerThread);
thread.detach(); thread.detach();
@ -145,11 +144,11 @@ UpdateChecker::Result UpdateChecker::check()
} }
else if (g_updateCheckerInProgress) else if (g_updateCheckerInProgress)
{ {
return UpdateChecker::InProgress; return UpdateChecker::Result::InProgress;
} }
else else
{ {
return UpdateChecker::NotStarted; return UpdateChecker::Result::NotStarted;
} }
} }

View file

@ -2,7 +2,7 @@
struct UpdateChecker struct UpdateChecker
{ {
enum Result enum class Result
{ {
NotStarted, NotStarted,
InProgress, InProgress,