From 3e810b98149852d82b607fcf25ea7623ae1a4a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sun, 7 May 2023 15:34:28 +0200 Subject: [PATCH] Also print platform, game and OS version in assertion popup --- src/engine/client/client.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 223862129..cb7737486 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -4590,8 +4590,11 @@ int main(int argc, const char **argv) pClient->RegisterInterfaces(); dbg_assert_set_handler([pClient](const char *pMsg) { - char aMessage[256]; - 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); + char aVersionStr[128]; + 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); });