decouple renderer/events on mac
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -577,7 +577,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
||||
tasklist.emplace_back([wp] {
|
||||
App::I.key_down(convert_key((int)wp));
|
||||
});
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case WM_SYSKEYUP:
|
||||
@@ -640,7 +639,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
||||
tasklist.emplace_back([lp]{
|
||||
App::I.mouse_up(1, (float)GET_X_LPARAM(lp), (float)GET_Y_LPARAM(lp), kEventSource::Mouse);
|
||||
});
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case WM_MOUSEWHEEL:
|
||||
|
||||
Reference in New Issue
Block a user