mirror of https://github.com/axmolengine/axmol.git
merge commit 0e8a8c04a21b7e96a7386237d0e4e4eef2269c89
This commit is contained in:
parent
75d6972da8
commit
29be687f0b
|
@ -54,7 +54,7 @@ public:
|
||||||
bool canSetContentScaleFactor();
|
bool canSetContentScaleFactor();
|
||||||
void setContentScaleFactor(float contentScaleFactor);
|
void setContentScaleFactor(float contentScaleFactor);
|
||||||
|
|
||||||
float getMainScreenScale() { return 1.0f; }
|
float getMainScreenScale() { return -1.0f; }
|
||||||
|
|
||||||
virtual bool Create(LPCTSTR pTitle, int w, int h);
|
virtual bool Create(LPCTSTR pTitle, int w, int h);
|
||||||
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
|
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
|
@ -25,6 +25,8 @@ THE SOFTWARE.
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "CCDirector.h"
|
#include "CCDirector.h"
|
||||||
|
|
||||||
|
#define CC_RETINA_DISPLAY_FILENAME_SUFFIX "-hd"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
NS_CC_BEGIN;
|
NS_CC_BEGIN;
|
||||||
|
@ -76,7 +78,7 @@ const char* CCFileUtils::fullPathFromRelativePath(const char *pszRelativePath)
|
||||||
pRet->m_sString = s_pszResourcePath;
|
pRet->m_sString = s_pszResourcePath;
|
||||||
pRet->m_sString += pszRelativePath;
|
pRet->m_sString += pszRelativePath;
|
||||||
}
|
}
|
||||||
#if (CC_IS_RETINA_DISPLAY_SUPPORTED)
|
|
||||||
if (CC_CONTENT_SCALE_FACTOR() != 1.0f)
|
if (CC_CONTENT_SCALE_FACTOR() != 1.0f)
|
||||||
{
|
{
|
||||||
std::string hiRes = pRet->m_sString.c_str();
|
std::string hiRes = pRet->m_sString.c_str();
|
||||||
|
@ -98,7 +100,7 @@ const char* CCFileUtils::fullPathFromRelativePath(const char *pszRelativePath)
|
||||||
pRet->m_sString.swap(hiRes);
|
pRet->m_sString.swap(hiRes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return pRet->m_sString.c_str();
|
return pRet->m_sString.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue