“PDirector-> setDeviceOrientation (kCCDeviceOrientationPortrait);” is strange.
When I can not enter in the correct orientation for the IME text input
We use the device orientation since 0.9.0. Please read this wiki [[About device orientation]], it may answer your question.
Thank You.