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()
|
||||||
{
|
{
|
||||||
|
// save whether to load iPad resources so if the window is resized, we are consistent
|
||||||
|
static bool isSet = false;
|
||||||
|
static bool isIPad = false;
|
||||||
|
if( !isSet )
|
||||||
|
{
|
||||||
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
|
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
|
||||||
return (winSize.width >= 1024 && winSize.height >= 768);
|
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