diff --git a/tools/simulator/libsimulator/lib/runtime/Runtime.cpp b/tools/simulator/libsimulator/lib/runtime/Runtime.cpp index b21627b2a3..bfff76b9f7 100644 --- a/tools/simulator/libsimulator/lib/runtime/Runtime.cpp +++ b/tools/simulator/libsimulator/lib/runtime/Runtime.cpp @@ -96,7 +96,13 @@ void resetDesignResolution() cocos2d::Size size = ConfigParser::getInstance()->getInitViewSize(); if (!ConfigParser::getInstance()->isLanscape()) { - std::swap(size.width, size.height); + if (size.width > size.height) + std::swap(size.width, size.height); + } + else + { + if (size.width < size.height) + std::swap(size.width, size.height); } Director::getInstance()->getOpenGLView()->setDesignResolutionSize(size.width, size.height, ResolutionPolicy::EXACT_FIT); }