Created
July 21, 2014 12:49
-
-
Save webmonch/fef8a1e1c43b863c9bf7 to your computer and use it in GitHub Desktop.
Mac changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool AppDelegate::applicationDidFinishLaunching() { | |
// initialize director | |
auto director = Director::getInstance(); | |
auto glview = director->getOpenGLView(); | |
if(!glview) { | |
glview = GLView::create("SimpleRPG"); | |
director->setOpenGLView(glview); | |
} | |
//glview->setFrameSize(1024, 768); | |
glview->setDesignResolutionSize(DESIGN_WIDTH, | |
DESIGN_HEIGHT, | |
kResolutionShowAll); | |
std::vector<std::string> paths; | |
paths.push_back("pyramid"); | |
Size frameSize = glview->getFrameSize(); | |
if (frameSize.width == 2048) { | |
paths.push_back(RETINA_RESOLUTION_PATH); | |
} else { | |
paths.push_back(REGULAR_RESOLUTION_PATH); | |
} | |
FileUtils::getInstance()->setSearchPaths(paths); | |
// turn on display FPS | |
director->setDisplayStats(true); | |
director->setAnimationInterval(1.0 / 60); | |
App::get()->showSplash(); | |
return true; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment