mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
Newer Smartphones detection for Windows Mobile 5.0 - add some simulation options when debugging on a Pocket PC platform
svn-id: r19117
This commit is contained in:
parent
1135e05ccd
commit
e1e60aa631
@ -19,6 +19,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
//#define SIMU_SMARTPHONE 1
|
||||
//#define SIMU_SMARTPHONE_2005 1
|
||||
|
||||
#include "common/stdafx.h"
|
||||
#include "CEDevice.h"
|
||||
|
||||
@ -100,7 +103,11 @@ void CEDevice::wakeUp() {
|
||||
|
||||
bool CEDevice::hasPocketPCResolution() {
|
||||
#ifdef SIMU_SMARTPHONE
|
||||
#ifndef SIMU_SMARTPHONE_2005
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
#else
|
||||
if (OSystem_WINCE3::isOzone() && hasWideResolution())
|
||||
return true;
|
||||
@ -128,12 +135,28 @@ bool CEDevice::hasWideResolution() {
|
||||
|
||||
bool CEDevice::hasSmartphoneResolution() {
|
||||
#ifdef SIMU_SMARTPHONE
|
||||
#ifndef SIMU_SMARTPHONE_2005
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
#else
|
||||
return (OSystem_WINCE3::getScreenWidth() < 240);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool CEDevice::isSmartphone() {
|
||||
#ifdef SIMU_SMARTPHONE
|
||||
return true;
|
||||
#else
|
||||
TCHAR platformType[100];
|
||||
BOOL result = SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(platformType), platformType, 0);
|
||||
if (!result && GetLastError() == ERROR_ACCESS_DENIED)
|
||||
return true;
|
||||
return (wcsnicmp(platformType, TEXT("SmartPhone"), 10) == 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
Common::String CEDevice::getKeyName(unsigned int keyCode) {
|
||||
char key_name[10];
|
||||
|
||||
|
@ -38,6 +38,7 @@ class CEDevice {
|
||||
static bool hasDesktopResolution();
|
||||
static bool hasWideResolution();
|
||||
static bool hasSmartphoneResolution();
|
||||
static bool isSmartphone();
|
||||
static Common::String getKeyName(unsigned int keyCode);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user