mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
Minor style changes and fix video.cpp Linux build error.
This commit is contained in:
parent
ea4cfd769c
commit
8c3ce7a81b
2 changed files with 10 additions and 7 deletions
|
|
@ -6061,9 +6061,7 @@ static void CompileParticleMaterialPipeline(const Hedgehog::Sparkle::CParticleMa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
static std::thread::id g_mainThreadId = std::this_thread::get_id();
|
static std::thread::id g_mainThreadId = std::this_thread::get_id();
|
||||||
#endif
|
|
||||||
|
|
||||||
// SWA::CGameModeStage::ExitLoading
|
// SWA::CGameModeStage::ExitLoading
|
||||||
PPC_FUNC_IMPL(__imp__sub_825369A0);
|
PPC_FUNC_IMPL(__imp__sub_825369A0);
|
||||||
|
|
|
||||||
|
|
@ -28,25 +28,30 @@ size_t updateCheckerWriteCallback(void *contents, size_t size, size_t nmemb, std
|
||||||
return totalSize;
|
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;
|
size_t start = 0;
|
||||||
if (versionStr[0] == 'v') {
|
if (versionStr[0] == 'v')
|
||||||
|
{
|
||||||
start = 1;
|
start = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t firstDot = versionStr.find('.', start);
|
size_t firstDot = versionStr.find('.', start);
|
||||||
size_t secondDot = versionStr.find('.', firstDot + 1);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
major = std::stoi(versionStr.substr(start, firstDot - start));
|
major = std::stoi(versionStr.substr(start, firstDot - start));
|
||||||
minor = std::stoi(versionStr.substr(firstDot + 1, secondDot - firstDot - 1));
|
minor = std::stoi(versionStr.substr(firstDot + 1, secondDot - firstDot - 1));
|
||||||
revision = std::stoi(versionStr.substr(secondDot + 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());
|
fmt::println("Error while parsing version: {}.", e.what());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue