GHOST: add back-trace handler to the API

Add a back-trace handler to GHOST, so error handlers can include a
back-trace (when supported).

No functional changes.
This commit is contained in:
Campbell Barton
2022-06-10 15:13:25 +10:00
parent eb9fa052a1
commit 2601b9832d
7 changed files with 36 additions and 0 deletions

View File

@@ -33,6 +33,7 @@
#include "BLI_path_util.h"
#include "BLI_rect.h"
#include "BLI_string.h"
#include "BLI_system.h"
#include "BLI_utildefines.h"
#include "IMB_colormanagement.h"
@@ -1536,6 +1537,8 @@ static char *wm_main_playanim_intern(int argc, const char **argv)
GHOST_EventConsumerHandle consumer = GHOST_CreateEventConsumer(ghost_event_proc, &ps);
GHOST_SetBacktraceHandler((GHOST_TBacktraceFn)BLI_system_backtrace);
g_WS.ghost_system = GHOST_CreateSystem();
GHOST_AddEventConsumer(g_WS.ghost_system, consumer);

View File

@@ -23,6 +23,7 @@
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_system.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
@@ -1543,6 +1544,8 @@ void wm_ghost_init(bContext *C)
consumer = GHOST_CreateEventConsumer(ghost_event_proc, C);
}
GHOST_SetBacktraceHandler((GHOST_TBacktraceFn)BLI_system_backtrace);
g_system = GHOST_CreateSystem();
GHOST_Debug debug = {0};