Route diagnostic hooks through platform services

This commit is contained in:
2026-06-03 05:12:00 +02:00
parent e152616d7f
commit 6652127545
8 changed files with 69 additions and 21 deletions

View File

@@ -79,24 +79,12 @@ bool App::clipboard_set_text(const std::string& s)
void App::stacktrace()
{
#if __OSX__
NSString* callstack = [[NSThread callStackSymbols] componentsJoinedByString:@"\n"];
LOG("callstack:\n%s", [callstack cStringUsingEncoding:NSUTF8StringEncoding]);
#endif
active_platform_services().log_stacktrace();
}
void App::crash_test()
{
#ifdef __IOS__
[ios_view crash];
#elif __OSX__
[osx_view hockeyapp_crash];
#elif defined(_WIN32)
__debugbreak();
#elif defined(__ANDROID__)
int *x = nullptr; *x = 42;
LOG("%d", *x);
#endif
active_platform_services().trigger_crash_test();
}
void App::tick(float dt)