mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-01-12 09:08:53 +01:00
Fixed Windows compile errors.
This commit is contained in:
parent
5ce7f58002
commit
999d9747e9
@ -97,7 +97,7 @@ Page *PageBuilder::buildPage( std::string collectionName )
|
||||
layoutPath = Utils::combinePath(layoutPath, "layout");
|
||||
}
|
||||
layoutFile = Utils::combinePath(layoutPath, layoutPage + ".xml");
|
||||
layoutFileAspect = Utils::combinePath(layoutPath, layoutPage + " " + std::to_string( screenWidth_/std::__gcd( screenWidth_, screenHeight_ ) ) + "x" + std::to_string( screenHeight_/std::__gcd( screenWidth_, screenHeight_ ) ) + ".xml" );
|
||||
layoutFileAspect = Utils::combinePath(layoutPath, layoutPage + " " + std::to_string( screenWidth_/Utils::gcd( screenWidth_, screenHeight_ ) ) + "x" + std::to_string( screenHeight_/Utils::gcd( screenWidth_, screenHeight_ ) ) + ".xml" );
|
||||
|
||||
Logger::write(Logger::ZONE_INFO, "Layout", "Initializing " + layoutFileAspect);
|
||||
|
||||
|
||||
@ -266,3 +266,11 @@ void Utils::listToVector( std::string str, std::vector<std::string> &vec, char d
|
||||
}
|
||||
vec.push_back( Utils::trimEnds( str.substr( previous, current - previous ) ) );
|
||||
}
|
||||
|
||||
|
||||
int Utils::gcd( int a, int b )
|
||||
{
|
||||
if (b == 0)
|
||||
return a;
|
||||
return gcd( b, a % b );
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@ public:
|
||||
static std::string filterComments(std::string line);
|
||||
static std::string trimEnds(std::string str);
|
||||
static void listToVector( std::string str, std::vector<std::string> &vec, char delimiter );
|
||||
static int gcd( int a, int b );
|
||||
|
||||
//todo: there has to be a better way to do this
|
||||
static std::string combinePath(std::list<std::string> &paths);
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
std::string retrofe_version_major = "0";
|
||||
std::string retrofe_version_minor = "9";
|
||||
std::string retrofe_version_build = "18";
|
||||
std::string retrofe_version_build = "19";
|
||||
|
||||
|
||||
std::string Version::getString( )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user