mirror of https://github.com/axmolengine/axmol.git
issue #1712: Adding win32 support.
This commit is contained in:
parent
ac17f67686
commit
9f6df60be0
|
@ -5,7 +5,7 @@
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class CCDevice
|
||||
class CC_DLL CCDevice
|
||||
{
|
||||
private:
|
||||
CCDevice();
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#include "platform/CCDevice.h"
|
||||
#include "CCStdC.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
float CCDevice::getDPI()
|
||||
{
|
||||
HDC hScreenDC = GetDC( NULL );
|
||||
int PixelsX = GetDeviceCaps( hScreenDC, HORZRES );
|
||||
int MMX = GetDeviceCaps( hScreenDC, HORZSIZE );
|
||||
ReleaseDC( NULL, hScreenDC );
|
||||
return 254.0f*PixelsX/MMX/10;
|
||||
}
|
||||
|
||||
NS_CC_END
|
|
@ -195,6 +195,7 @@ xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir
|
|||
<ClCompile Include="..\platform\win32\CCAccelerometer.cpp" />
|
||||
<ClCompile Include="..\platform\win32\CCApplication.cpp" />
|
||||
<ClCompile Include="..\platform\win32\CCCommon.cpp" />
|
||||
<ClCompile Include="..\platform\win32\CCDevice.cpp" />
|
||||
<ClCompile Include="..\platform\win32\CCEGLView.cpp" />
|
||||
<ClCompile Include="..\platform\win32\CCFileUtilsWin32.cpp" />
|
||||
<ClCompile Include="..\platform\win32\CCImage.cpp" />
|
||||
|
|
|
@ -447,6 +447,9 @@
|
|||
<Filter>platform</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\support\tinyxml2\tinyxml2.cpp" />
|
||||
<ClCompile Include="..\platform\win32\CCDevice.cpp">
|
||||
<Filter>platform</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\base_nodes\CCAtlasNode.h">
|
||||
|
|
Loading…
Reference in New Issue