mirror of https://github.com/axmolengine/axmol.git
Determines whether to use iPad graphics statically, so if the window is resized the graphics loaded are consistent.
This commit is contained in:
parent
dc7ce1cd0f
commit
a4760698ca
|
@ -54,8 +54,16 @@ CCArray* ccFileUtils_arrayWithContentsOfFileThreadSafe(const char* pFileName);
|
||||||
|
|
||||||
static bool isIPad()
|
static bool isIPad()
|
||||||
{
|
{
|
||||||
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
|
// save whether to load iPad resources so if the window is resized, we are consistent
|
||||||
return (winSize.width >= 1024 && winSize.height >= 768);
|
static bool isSet = false;
|
||||||
|
static bool isIPad = false;
|
||||||
|
if( !isSet )
|
||||||
|
{
|
||||||
|
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
|
||||||
|
isIPad = (winSize.width >= 1024 && winSize.height >= 768);
|
||||||
|
isSet = true;
|
||||||
|
}
|
||||||
|
return isIPad;
|
||||||
}
|
}
|
||||||
|
|
||||||
static NSString* removeSuffixFromPath(NSString *suffix, NSString *path)
|
static NSString* removeSuffixFromPath(NSString *suffix, NSString *path)
|
||||||
|
|
Loading…
Reference in New Issue