Own log worker and trim Apple platform hooks
This commit is contained in:
@@ -143,6 +143,12 @@ public:
|
||||
[ios_view hide_keyboard];
|
||||
});
|
||||
};
|
||||
bridge.trigger_crash_test = [ios_view] {
|
||||
[ios_view crash];
|
||||
};
|
||||
bridge.start_sonarpen = [ios_view] {
|
||||
[App::I->ios_app sonarpen_start];
|
||||
};
|
||||
bridge.acquire_render_context = [ios_view] {
|
||||
[ios_view async_lock];
|
||||
};
|
||||
@@ -209,6 +215,14 @@ public:
|
||||
[osx_view share_file:[NSString stringWithUTF8String:path.c_str()]];
|
||||
});
|
||||
};
|
||||
bridge.trigger_crash_test = [osx_view] {
|
||||
[osx_view hockeyapp_crash];
|
||||
};
|
||||
bridge.request_app_close = [osx_view] {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[osx_view close];
|
||||
});
|
||||
};
|
||||
bridge.acquire_render_context = [osx_view] {
|
||||
[osx_view async_lock];
|
||||
};
|
||||
@@ -318,9 +332,9 @@ public:
|
||||
void trigger_crash_test() override
|
||||
{
|
||||
#ifdef __IOS__
|
||||
[App::I->ios_view crash];
|
||||
active_apple_document_platform_services().trigger_crash_test();
|
||||
#elif __OSX__
|
||||
[App::I->osx_view hockeyapp_crash];
|
||||
active_apple_document_platform_services().trigger_crash_test();
|
||||
#elif defined(__ANDROID__)
|
||||
int *x = nullptr; *x = 42;
|
||||
LOG("%d", *x);
|
||||
@@ -663,7 +677,7 @@ public:
|
||||
void start_sonarpen() override
|
||||
{
|
||||
#if __IOS__
|
||||
[App::I->ios_app sonarpen_start];
|
||||
active_apple_document_platform_services().start_sonarpen();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -727,9 +741,7 @@ public:
|
||||
void request_app_close() override
|
||||
{
|
||||
#ifdef __OSX__
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[App::I->osx_view close];
|
||||
});
|
||||
active_apple_document_platform_services().request_app_close();
|
||||
#elif __LINUX__
|
||||
glfwSetWindowShouldClose(App::I->glfw_window, GLFW_TRUE);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user