mirror of https://github.com/axmolengine/axmol.git
fix: ensure drawing in main thread (layoutSubviews may be called in web thread due to banners)
This commit is contained in:
parent
eb55a0e603
commit
ab17455b18
|
@ -266,7 +266,10 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
||||||
|
|
||||||
// Avoid flicker. Issue #350
|
// Avoid flicker. Issue #350
|
||||||
//[director performSelectorOnMainThread:@selector(drawScene) withObject:nil waitUntilDone:YES];
|
//[director performSelectorOnMainThread:@selector(drawScene) withObject:nil waitUntilDone:YES];
|
||||||
|
if ([NSThread isMainThread])
|
||||||
|
{
|
||||||
cocos2d::Director::getInstance()->drawScene();
|
cocos2d::Director::getInstance()->drawScene();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) swapBuffers
|
- (void) swapBuffers
|
||||||
|
|
Loading…
Reference in New Issue