remove objc references from ui task lambda

This commit is contained in:
2019-07-21 13:46:54 +02:00
parent 18daf6ab73
commit 14e0716696

View File

@@ -240,10 +240,9 @@ std::recursive_mutex lock_mutex;
frame.size.height -= kbSize.height;
view.frame = frame;
App::I->ui_task_async([=]
App::I->ui_task_async([size=frame.size, f=self.view.contentScaleFactor]
{
App::I->resize(frame.size.width * view.contentScaleFactor,
frame.size.height * view.contentScaleFactor);
App::I->resize(size.width * f, size.height * f);
});
App::I->animate = false;
}
@@ -253,10 +252,9 @@ std::recursive_mutex lock_mutex;
{
CGRect frame = [[UIScreen mainScreen] bounds];
self.view.frame = frame;
App::I->ui_task_async([=]
App::I->ui_task_async([size=frame.size, f=self.view.contentScaleFactor]
{
App::I->resize(frame.size.width * self.view.contentScaleFactor,
frame.size.height * self.view.contentScaleFactor);
App::I->resize(size.width * f, size.height * f);
});
App::I->animate = true;
}
@@ -400,10 +398,9 @@ std::set<UITouch*> ignored_touch;
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{
App::I->ui_task_async([=]
App::I->ui_task_async([f=self.view.contentScaleFactor, size]
{
App::I->resize(size.width * self.view.contentScaleFactor,
size.height * self.view.contentScaleFactor);
App::I->resize(size.width * f, size.height * f);
});
}