Dan Schuller SetDeviceOrientation doesn't seem to be exposed to Lua
Posts 4
Added by Dan Schuller about 1 year ago

Is this a design decision or just something that was missed?

YuLei Liao RE: SetDeviceOrientation doesn't seem to be exposed to Lua
Posts 59
Added by YuLei Liao about 1 year ago

SetDeviceOrientation() should be call in the AppDelegate::applicationDidFinishLaunching()

Dan Schuller RE: SetDeviceOrientation doesn't seem to be exposed to Lua
Posts 4
Added by Dan Schuller about 1 year ago

Cool thanks. I take that as - it should never be called from Lua only from that method.

Dan Schuller RE: SetDeviceOrientation doesn't seem to be exposed to Lua
Posts 4
Added by Dan Schuller about 1 year ago

I think I'm still missing something with this.

In cocos2dx\HelloLua\Classes\AppDelegate.cpp in the applicationDidFinishLaunching function just before return true at the end of the function I added pDirector->setDeviceOrientation(kCCDeviceOrientationPortrait).

Then I run build_native.sh from cygwin and package in ecplise but when the apk runs on the device it's still landscape. Any idea what might be the problem?


(1-3/3)