decouple renderer/events on mac

This commit is contained in:
2018-08-08 17:42:56 +02:00
parent d57d4f3490
commit 72fbbb08a3
3 changed files with 156 additions and 61 deletions

View File

@@ -49,8 +49,10 @@ void App::pick_image(std::function<void(std::string path)> callback)
#ifdef __IOS__
[ios_view pick_photo:callback];
#elif __OSX__
std::string path = [osx_view pick_file];
callback(path);
dispatch_async(dispatch_get_main_queue(), ^{
std::string path = [osx_view pick_file];
callback(path);
});
#elif __ANDROID__
//displayKeyboard(and_app, false);
#elif _WIN32