Adjust EXECVERSION define scheme* MAJOREXECVERSION and MINOREXECVERSION* GETEXECVERSION(major, minor) macro
This commit is contained in:
parent
b64dd82034
commit
969960a1eb
|
@ -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".
|
// 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
|
#define MODVERSION 26
|
||||||
|
|
||||||
// To version config.cfg, EXECVERSION was originally equal to MODVERSION
|
// To version config.cfg, set MAJOREXECVERSION equal to MODVERSION
|
||||||
// So keep it equal to MODVERSION, and increment MINOREXECVERSION whenever a config change
|
// and increment SUBEXECVERSION whenever a config change is needed
|
||||||
// is needed that does not correspond to an increment in MODVERSION
|
// that does not correspond to an increment in MODVERSION.
|
||||||
#define EXECVERSION 26
|
// If MAJOREXECVERSION increases, set MINOREXECVERSION to 0.
|
||||||
|
#define MAJOREXECVERSION 26
|
||||||
#define MINOREXECVERSION 1
|
#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
|
// print execversion FIRST, because subsequent consvars need to be filtered
|
||||||
// always print current EXECVERSION
|
// 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..
|
// FIXME: save key aliases if ever implemented..
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue