Fix .app bundle crash on macOS
This commit is contained in:
parent
121cead38e
commit
cfce8de0b5
|
@ -328,14 +328,14 @@ static Vector2 get_mouse_pos(NSPoint locationInWindow, CGFloat backingScaleFacto
|
||||||
//_GodotPlatformSetCursorMode(window, window->cursorMode);
|
//_GodotPlatformSetCursorMode(window, window->cursorMode);
|
||||||
[OS_OSX::singleton->context update];
|
[OS_OSX::singleton->context update];
|
||||||
|
|
||||||
get_mouse_pos(
|
if (OS_OSX::singleton->get_main_loop()) {
|
||||||
[OS_OSX::singleton->window_object mouseLocationOutsideOfEventStream],
|
get_mouse_pos(
|
||||||
[OS_OSX::singleton->window_view backingScaleFactor]);
|
[OS_OSX::singleton->window_object mouseLocationOutsideOfEventStream],
|
||||||
if (OS_OSX::singleton->input)
|
[OS_OSX::singleton->window_view backingScaleFactor]);
|
||||||
OS_OSX::singleton->input->set_mouse_position(Point2(mouse_x, mouse_y));
|
OS_OSX::singleton->input->set_mouse_position(Point2(mouse_x, mouse_y));
|
||||||
|
|
||||||
if (OS_OSX::singleton->get_main_loop())
|
|
||||||
OS_OSX::singleton->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_FOCUS_IN);
|
OS_OSX::singleton->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_FOCUS_IN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)windowDidResignKey:(NSNotification *)notification {
|
- (void)windowDidResignKey:(NSNotification *)notification {
|
||||||
|
|
Loading…
Reference in New Issue