1. add supported for 480*320 on scenetest.

This commit is contained in:
zhangcheng 2013-09-14 19:03:15 +08:00
parent 0121943c11
commit acf9754814
1 changed files with 6 additions and 2 deletions

View File

@ -37,16 +37,20 @@ bool AppDelegate::applicationDidFinishLaunching()
auto designSize = Size(480, 320);
auto pFileUtils = FileUtils::getInstance();
std::vector<std::string> searchPaths;
if (screenSize.height > 320)
{
auto resourceSize = Size(960, 640);
std::vector<std::string> searchPaths;
searchPaths.push_back("hd");
searchPaths.push_back("hd/scenetest");
pFileUtils->setSearchPaths(searchPaths);
director->setContentScaleFactor(resourceSize.height/designSize.height);
}
else
{
searchPaths.push_back("scenetest");
}
pFileUtils->setSearchPaths(searchPaths);
EGLView::getInstance()->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::NO_BORDER);