axmol/cocos/2d/platform/win32/CCDevice.cpp

26 lines
519 B
C++
Raw Normal View History

2013-02-17 11:34:55 +08:00
#include "platform/CCDevice.h"
#include "CCStdC.h"
NS_CC_BEGIN
int Device::getDPI()
2013-02-17 11:34:55 +08:00
{
static int dpi = -1;
if (dpi == -1)
{
HDC hScreenDC = GetDC( NULL );
int PixelsX = GetDeviceCaps( hScreenDC, HORZRES );
int MMX = GetDeviceCaps( hScreenDC, HORZSIZE );
ReleaseDC( NULL, hScreenDC );
dpi = 254.0f*PixelsX/MMX/10;
}
return dpi;
2013-02-17 11:34:55 +08:00
}
void Device::setAccelerometerEnabled(bool isEnabled)
{}
void Device::setAccelerometerInterval(float interval)
{}
2013-02-17 11:34:55 +08:00
NS_CC_END