Skip to content

Commit

Permalink
fix updater version calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAaronLopezGarcia committed Jul 7, 2023
1 parent 284b1c7 commit e8d6bbf
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions extras/updater/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ int main(int argc, char * argv[])

pspDebugScreenPrintf("ARK Updater Started\n");

u32 my_ver = (ARK_MAJOR_VERSION << 16) | (ARK_MINOR_VERSION << 8) | ARK_MICRO_VERSION;
u32 cur_ver = sctrlHENGetMinorVersion();
int major = (cur_ver&0xFF0000)>>16;
int minor = (cur_ver&0xFF00)>>8;
int micro = (cur_ver&0xFF);

pspDebugScreenPrintf("Current Version %d.%d.%.2i\n", major, minor, micro);
pspDebugScreenPrintf("Update Version %d.%d.%.2i\n", ARK_MAJOR_VERSION, ARK_MINOR_VERSION, ARK_MICRO_VERSION);
u32 my_ver = (ARK_MAJOR_VERSION << 24) | (ARK_MINOR_VERSION << 16) | (ARK_MICRO_VERSION << 8) | ARK_REVISION;
u32 cur_ver = sctrlHENGetVersion(); // ARK's full version number
u32 major = (cur_ver&0xFF000000)>>24;
u32 minor = (cur_ver&0xFF0000)>>16;
u32 micro = (cur_ver&0xFF00)>>8;
u32 rev = sctrlHENGetMinorVersion();

pspDebugScreenPrintf("Current Version %d.%d.%.2i r%d\n", major, minor, micro, rev);
pspDebugScreenPrintf("Update Version %d.%d.%.2i r%d\n", ARK_MAJOR_VERSION, ARK_MINOR_VERSION, ARK_MICRO_VERSION, ARK_REVISION);

if (my_ver < cur_ver){
pspDebugScreenPrintf("WARNING: downgrading to lower version\n");
Expand Down

0 comments on commit e8d6bbf

Please sign in to comment.