1
votes

I'm running into an issue now when exporting my cocos2d based games out of Xcode 4.3+.

While I'm not intending on including iPad Retina graphics with my game, it seems the game wants Retina iPad graphics and is now loading everything incorrectly on iPad Retina Only.

Is there a quick and simple way to disable iPad Retina images only when loading assets from a scale based UI?

Thanks!

2
Came up with a VERY simple solution that seems to work perfectly. Just to recap I'm trying to use all resolutions (Retina, Non-Retina iPhone) and iPad but not Retina iPad. I've Added answer to the bottom of original post.Mike Result

2 Answers

2
votes

So it was quite simple. Added this code to the AppDelegate.m File

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
    [director enableRetinaDisplay:NO];


} else {

    [director enableRetinaDisplay:YES];

}

Boom. Hope this can help someone else as I didn't see any readily available solutions.

1
votes

as of july 2015 this still works great. you just have to change it like this:

if ( [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad )
    {
        [director_ enableRetinaDisplay:NO];
    } else {
        if( ! [director_ enableRetinaDisplay:YES] )
    }