don't mix functionality
Not a bug fix, just trying to keep things more clean.
This commit is contained in:
parent
51c67cc7ff
commit
4a292ed1d1
|
@ -656,7 +656,12 @@ void MenuStateRoot::simpleTask(BaseThread *callingThread,void *userdata) {
|
|||
Properties props;
|
||||
props.loadFromText(updateMetaData);
|
||||
|
||||
int compareResult = compareMajorMinorVersion(glestVersionString, props.getString("LatestGameVersion",""),true);
|
||||
int compareResult = compareMajorMinorVersion(glestVersionString, props.getString("LatestGameVersion",""));
|
||||
if(compareResult==0) {
|
||||
if(glestVersionString != props.getString("LatestGameVersion","")) {
|
||||
compareResult = -1;
|
||||
}
|
||||
}
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("compareResult = %d local [%s] remote [%s]\n",compareResult,glestVersionString.c_str(),props.getString("LatestGameVersion","").c_str());
|
||||
|
||||
if(compareResult < 0) {
|
||||
|
|
|
@ -239,7 +239,7 @@ float saturate(float value);
|
|||
int round(float f);
|
||||
|
||||
//misc
|
||||
int compareMajorMinorVersion(string versionA,string versionB, bool checkForNewVersionUpdates=false);
|
||||
int compareMajorMinorVersion(string versionA,string versionB);
|
||||
int getMajor(string version);
|
||||
int getMinor(string version);
|
||||
bool checkVersionComptability(string clientVersionString, string serverVersionString);
|
||||
|
|
|
@ -787,7 +787,7 @@ int round(float f){
|
|||
}
|
||||
|
||||
// ==================== misc ====================
|
||||
int compareMajorMinorVersion(string versionA,string versionB, bool checkForNewVersionUpdates) {
|
||||
int compareMajorMinorVersion(string versionA,string versionB) {
|
||||
int majorA = getMajor(versionA);
|
||||
int minorA = getMinor(versionA);
|
||||
int majorB = getMajor(versionB);
|
||||
|
@ -801,11 +801,6 @@ int compareMajorMinorVersion(string versionA,string versionB, bool checkForNewVe
|
|||
return -1;
|
||||
}
|
||||
else if(minorA == minorB) {
|
||||
if(checkForNewVersionUpdates) {
|
||||
if(versionA != versionB) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue