diff --git a/UnleashedRecomp/gpu/video.cpp b/UnleashedRecomp/gpu/video.cpp index 41f8bf16..3be1d37e 100644 --- a/UnleashedRecomp/gpu/video.cpp +++ b/UnleashedRecomp/gpu/video.cpp @@ -6061,9 +6061,7 @@ static void CompileParticleMaterialPipeline(const Hedgehog::Sparkle::CParticleMa } } -#ifdef _DEBUG static std::thread::id g_mainThreadId = std::this_thread::get_id(); -#endif // SWA::CGameModeStage::ExitLoading PPC_FUNC_IMPL(__imp__sub_825369A0); diff --git a/UnleashedRecomp/install/update_checker.cpp b/UnleashedRecomp/install/update_checker.cpp index 6175f8f7..ef3c9aab 100644 --- a/UnleashedRecomp/install/update_checker.cpp +++ b/UnleashedRecomp/install/update_checker.cpp @@ -28,25 +28,30 @@ size_t updateCheckerWriteCallback(void *contents, size_t size, size_t nmemb, std return totalSize; } -static bool parseVersion(const std::string &versionStr, int &major, int &minor, int &revision) { +static bool parseVersion(const std::string &versionStr, int &major, int &minor, int &revision) +{ size_t start = 0; - if (versionStr[0] == 'v') { + if (versionStr[0] == 'v') + { start = 1; } size_t firstDot = versionStr.find('.', start); size_t secondDot = versionStr.find('.', firstDot + 1); - if (firstDot == std::string::npos || secondDot == std::string::npos) { + if (firstDot == std::string::npos || secondDot == std::string::npos) + { return false; } - try { + try + { major = std::stoi(versionStr.substr(start, firstDot - start)); minor = std::stoi(versionStr.substr(firstDot + 1, secondDot - firstDot - 1)); revision = std::stoi(versionStr.substr(secondDot + 1)); } - catch (const std::exception &e) { + catch (const std::exception &e) + { fmt::println("Error while parsing version: {}.", e.what()); return false; }