New multiresolution approach and setContentScaleFactor

New multiresolution approach and setContentScaleFactor
0.0 0


I can’t understand new mechanism.

So, let’s imagine that we make our game in 480x320 design resolution

When we use normal resources - all fine
CCFileUtils::sharedFileUtils()->setResourceDirectory("normal"); CCEGLView::sharedOpenGLView()->setDesignResolutionSize(480, 320, kResolutionShowAll);

But what if i want use -hd resources in same design resolution? It is usefull when you stretch your application on different android resolutions which larger than 480x320.

I expect that
CCFileUtils::sharedFileUtils()->setResourceDirectory("hd"); CCEGLView::sharedOpenGLView()->setDesignResolutionSize(480, 320, kResolutionShowAll); CCDirector::sharedDirector()->setContentScaleFactor(2.f);
should work, but it’s not. Touches handled incorrect and on android design area not fits screen(overfill it)


As i can see, for win32 platform you divide on content_scale_factor twice
first at CCEGLView::handleTouchesBegin and then do it again in CCEGLViewProtocol::handleTouchesBegin