mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #6568
6568: Also print platform, game and OS version in assertion popup r=def- a=Robyt3 ## Checklist - [X] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Robert Müller <robytemueller@gmail.com>
This commit is contained in:
commit
262a2a83a6
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue