mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-02-20 19:12:11 +00:00
Shorten file path in backtraces
The build dir isn't relevant, only the source path starting with neo/ is Also removed instances of nullptr
This commit is contained in:
parent
3e039ca898
commit
8cb4843022
3 changed files with 7 additions and 2 deletions
|
@ -450,6 +450,11 @@ static int bt_pcinfo_callback( void *data, uintptr_t pc, const char *filename, i
|
|||
if (name != NULL) {
|
||||
function = name;
|
||||
}
|
||||
|
||||
const char* fileNameNeo = strstr(filename, "/neo/");
|
||||
if (fileNameNeo != NULL) {
|
||||
filename = fileNameNeo+1; // I want "neo/bla/blub.cpp:42"
|
||||
}
|
||||
printf(" %zu %s:%d %s\n", pc, filename, lineno, function);
|
||||
free(name);
|
||||
}
|
||||
|
|
|
@ -677,7 +677,7 @@ void *Sys_DLL_GetProcAddress( uintptr_t dllHandle, const char *procName ) {
|
|||
if (!adr)
|
||||
{
|
||||
DWORD e = GetLastError();
|
||||
LPVOID msgBuf = nullptr;
|
||||
LPVOID msgBuf = NULL;
|
||||
|
||||
FormatMessage(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
|
|
|
@ -97,7 +97,7 @@ private:
|
|||
void UpdateTitle ( void );
|
||||
void UpdateCallstack ( void );
|
||||
void UpdateRecentFiles ( void );
|
||||
bool OpenScript ( const char* filename, int lineNumber = -1, idProgram* program = nullptr );
|
||||
bool OpenScript ( const char* filename, int lineNumber = -1, idProgram* program = NULL );
|
||||
void EnableWindows ( bool state );
|
||||
|
||||
int GetSelectedText ( idStr& text );
|
||||
|
|
Loading…
Reference in a new issue