diff --git a/src/pc/network/version.c b/src/pc/network/version.c index 6657e13f..8457eb6c 100644 --- a/src/pc/network/version.c +++ b/src/pc/network/version.c @@ -1,12 +1,13 @@ #include #include "version.h" +#include "version_text.h" #include "types.h" static char sVersionString[MAX_VERSION_LENGTH] = { 0 }; static char sLocalVersionString[MAX_LOCAL_VERSION_LENGTH] = { 0 }; char* get_version(void) { - snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER); + snprintf(sVersionString, MAX_VERSION_LENGTH, "%s", VERSION_TEXT); return sVersionString; } @@ -14,6 +15,6 @@ char* get_version_local(void) { if (PATCH_VERSION_NUMBER <= 0) { return get_version(); } - snprintf(sLocalVersionString, MAX_LOCAL_VERSION_LENGTH, "%s %d.%d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER, PATCH_VERSION_NUMBER); + snprintf(sLocalVersionString, MAX_LOCAL_VERSION_LENGTH, "%s.%d", VERSION_TEXT, PATCH_VERSION_NUMBER); return sLocalVersionString; } diff --git a/src/pc/network/version.h b/src/pc/network/version.h index 9fd68d58..4903621f 100644 --- a/src/pc/network/version.h +++ b/src/pc/network/version.h @@ -1,13 +1,11 @@ #ifndef VERSION_H #define VERSION_H -#define VERSION_TEXT "beta" -#define VERSION_NUMBER 34 -#define MINOR_VERSION_NUMBER 0 #define PATCH_VERSION_NUMBER 0 -#define MAX_VERSION_LENGTH 10 -#define MAX_LOCAL_VERSION_LENGTH 12 +#define MAX_VERSION_LENGTH 28 +#define MAX_LOCAL_VERSION_LENGTH 32 + char* get_version(void); char* get_version_local(void); diff --git a/src/pc/network/version_text.h b/src/pc/network/version_text.h new file mode 100644 index 00000000..be6263c2 --- /dev/null +++ b/src/pc/network/version_text.h @@ -0,0 +1,2 @@ +#pragma once +#define VERSION_TEXT "beta 34" \ No newline at end of file