mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
Also print platform, game and OS version in assertion popup
This commit is contained in:
parent
cfd003d9c5
commit
3e810b9814
|
@ -4590,8 +4590,11 @@ int main(int argc, const char **argv)
|
||||||
pClient->RegisterInterfaces();
|
pClient->RegisterInterfaces();
|
||||||
|
|
||||||
dbg_assert_set_handler([pClient](const char *pMsg) {
|
dbg_assert_set_handler([pClient](const char *pMsg) {
|
||||||
char aMessage[256];
|
char aVersionStr[128];
|
||||||
str_format(aMessage, sizeof(aMessage), "An assertion error occured. Please write down or take a screenshot of the following information and report this error.\n\n%s", pMsg);
|
if(os_version_str(aVersionStr, sizeof(aVersionStr)))
|
||||||
|
str_copy(aVersionStr, "unknown");
|
||||||
|
char aMessage[512];
|
||||||
|
str_format(aMessage, sizeof(aMessage), "An assertion error occured. Please write down or take a screenshot of the following information and report this error.\nPlease also share the assert log which you should find in the 'dumps' folder in your config directory.\n\n%s\n\nPlatform: %s\nGame version: %s %s\nOS version: %s", pMsg, CONF_PLATFORM_STRING, GAME_RELEASE_VERSION, GIT_SHORTREV_HASH != nullptr ? GIT_SHORTREV_HASH : "", aVersionStr);
|
||||||
pClient->ShowMessageBox("Assertion Error", aMessage);
|
pClient->ShowMessageBox("Assertion Error", aMessage);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue