I'm using Xcode IDE and Cocos2dx for developing multi platform game. i have just started development and 'm stuccoed at one place. I want to change the resource folder in accordance to the size of the screen.
CCSize screenSize = pEGLView->getFrameSize();
CCEGLView::sharedOpenGLView()->setDesignResolutionSize(768, 1024,
kResolutionExactFit);
if (screenSize.width > 768) {
CCFileUtils::sharedFileUtils()->setResourceDirectory("hd");
pDirector->setContentScaleFactor(2);
} else {
CCFileUtils::sharedFileUtils()->setResourceDirectory("sd");
pDirector->setContentScaleFactor(1);
}
but since the setResourceDirectory() is deprecated i can use any other method. I tried using setSearchPaths() but its giving errors. please let me know if anyone have the same thing working. Thanks in advance.