I can suggest an idea about how to do it.
Just get the current size of the screen by
auto size = Director::sharedDirector()->getOpenGLView()->getFrameSize();
And then see the ration of screen width and height.
if(size.width / size.height > 1)