mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 21:31:32 +00:00
Adjust EXECVERSION define scheme* MAJOREXECVERSION and MINOREXECVERSION* GETEXECVERSION(major, minor) macro
This commit is contained in:
parent
b64dd82034
commit
969960a1eb
2 changed files with 13 additions and 5 deletions
|
@ -216,11 +216,19 @@ extern FILE *logstream;
|
|||
// Note that we use this to help keep internal testing in check; this is why v2.1.0 is not version "1".
|
||||
#define MODVERSION 26
|
||||
|
||||
// To version config.cfg, EXECVERSION was originally equal to MODVERSION
|
||||
// So keep it equal to MODVERSION, and increment MINOREXECVERSION whenever a config change
|
||||
// is needed that does not correspond to an increment in MODVERSION
|
||||
#define EXECVERSION 26
|
||||
// To version config.cfg, set MAJOREXECVERSION equal to MODVERSION
|
||||
// and increment SUBEXECVERSION whenever a config change is needed
|
||||
// that does not correspond to an increment in MODVERSION.
|
||||
// If MAJOREXECVERSION increases, set MINOREXECVERSION to 0.
|
||||
#define MAJOREXECVERSION 26
|
||||
#define MINOREXECVERSION 1
|
||||
// (It would have been nice to use VERSION and SUBVERSION but those are different for DEVELOP builds)
|
||||
|
||||
// Macros
|
||||
#define GETMAJOREXECVERSION(v) (v & 0xFFFF)
|
||||
#define GETMINOREXECVERSION(v) (v >> 16)
|
||||
#define GETEXECVERSION(major,minor) (major + (minor << 16))
|
||||
#define EXECVERSION GETEXECVERSION(MAJOREXECVERSION, MINOREXECVERSION)
|
||||
|
||||
// =========================================================================
|
||||
|
||||
|
|
|
@ -563,7 +563,7 @@ void M_SaveConfig(const char *filename)
|
|||
|
||||
// print execversion FIRST, because subsequent consvars need to be filtered
|
||||
// always print current EXECVERSION
|
||||
fprintf(f, "%s \"%d\"\n", cv_execversion.name, (EXECVERSION + (MINOREXECVERSION << 16)));
|
||||
fprintf(f, "%s \"%d\"\n", cv_execversion.name, EXECVERSION);
|
||||
|
||||
// FIXME: save key aliases if ever implemented..
|
||||
|
||||
|
|
Loading…
Reference in a new issue