mirror of https://github.com/axmolengine/axmol.git
1. add supported for 480*320 on scenetest.
This commit is contained in:
parent
0121943c11
commit
acf9754814
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue