Show the backend we are using in the version string and also in the crash report file.
Closes #3034.master
parent
d757069023
commit
9387b398fe
|
@ -6,6 +6,8 @@
|
|||
#include "lib/framework/frameint.h"
|
||||
#include "wzapp_qt.h"
|
||||
|
||||
// used in crash reports & version info
|
||||
const char *BACKEND="Qt";
|
||||
|
||||
int realmain(int argc, char *argv[]);
|
||||
int main(int argc, char *argv[])
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include <algorithm>
|
||||
|
||||
extern void mainLoop();
|
||||
// used in crash reports & version info
|
||||
const char *BACKEND="SDL";
|
||||
|
||||
int realmain(int argc, char *argv[]);
|
||||
int main(int argc, char *argv[])
|
||||
|
|
|
@ -1064,6 +1064,9 @@ bool getUTF8CmdLine(int* const utfargc, const char*** const utfargv) // explicit
|
|||
return true;
|
||||
}
|
||||
|
||||
// for backend detection
|
||||
extern const char *BACKEND;
|
||||
|
||||
int realmain(int argc, char *argv[])
|
||||
{
|
||||
wzMain(argc, argv);
|
||||
|
@ -1140,6 +1143,7 @@ int realmain(int argc, char *argv[])
|
|||
check_Physfs();
|
||||
debug(LOG_WZ, "Warzone 2100 - %s", version_getFormattedVersionString());
|
||||
debug(LOG_WZ, "Using language: %s", getLanguage());
|
||||
debug(LOG_WZ, "Backend: %s", BACKEND);
|
||||
debug(LOG_MEMORY, "sizeof: SIMPLE_OBJECT=%ld, BASE_OBJECT=%ld, DROID=%ld, STRUCTURE=%ld, FEATURE=%ld, PROJECTILE=%ld",
|
||||
(long)sizeof(SIMPLE_OBJECT), (long)sizeof(BASE_OBJECT), (long)sizeof(DROID), (long)sizeof(STRUCTURE), (long)sizeof(FEATURE), (long)sizeof(PROJECTILE));
|
||||
|
||||
|
@ -1299,6 +1303,8 @@ int realmain(int argc, char *argv[])
|
|||
}
|
||||
|
||||
// Copy this info to be used by the crash handler for the dump file
|
||||
ssprintf(buf,"Using Backend: %s", BACKEND);
|
||||
addDumpInfo(buf);
|
||||
ssprintf(buf,"Using language: %s", getLanguageName());
|
||||
addDumpInfo(buf);
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
#include "src/autorevision.h"
|
||||
|
||||
extern const char *BACKEND;
|
||||
|
||||
// Two-step process to put quotes around anything, including preprocessor definitions.
|
||||
#define EXPAND(token) #token
|
||||
#define QUOTE(token) EXPAND(token)
|
||||
|
@ -152,7 +154,7 @@ const char* version_getFormattedVersionString()
|
|||
// Construct the version string
|
||||
// TRANSLATORS: This string looks as follows when expanded.
|
||||
// "Version <version name/number> <working copy state><BUILD DATE><BUILD TYPE>"
|
||||
snprintf(versionString, MAX_STR_LENGTH, _("Version %s%s%s%s"), version_getVersionString(), wc_state, build_date, build_type);
|
||||
snprintf(versionString, MAX_STR_LENGTH, _("Version %s-%s%s%s%s"), BACKEND, version_getVersionString(), wc_state, build_date, build_type);
|
||||
}
|
||||
|
||||
return versionString;
|
||||
|
|
Loading…
Reference in New Issue