issue #1712: Adding win32 support.

This commit is contained in:
James Chen 2013-02-17 11:34:55 +08:00
parent ac17f67686
commit 9f6df60be0
4 changed files with 20 additions and 1 deletions

View File

@ -5,7 +5,7 @@
NS_CC_BEGIN
class CCDevice
class CC_DLL CCDevice
{
private:
CCDevice();

View File

@ -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

View File

@ -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" />

View File

@ -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">