diff options
author | Nicolas Bacca | 2005-10-16 22:37:17 +0000 |
---|---|---|
committer | Nicolas Bacca | 2005-10-16 22:37:17 +0000 |
commit | e1e60aa6318314ae68b12007c0677319dfb87257 (patch) | |
tree | cffb8378b7cbed8a467495a4c260f7cbb3bc9ffc /backends/wince/CEDevice.cpp | |
parent | 1135e05ccd1d0e1a860542f1c2633c6ed5a4bd4a (diff) | |
download | scummvm-rg350-e1e60aa6318314ae68b12007c0677319dfb87257.tar.gz scummvm-rg350-e1e60aa6318314ae68b12007c0677319dfb87257.tar.bz2 scummvm-rg350-e1e60aa6318314ae68b12007c0677319dfb87257.zip |
Newer Smartphones detection for Windows Mobile 5.0 - add some simulation options when debugging on a Pocket PC platform
svn-id: r19117
Diffstat (limited to 'backends/wince/CEDevice.cpp')
-rw-r--r-- | backends/wince/CEDevice.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/backends/wince/CEDevice.cpp b/backends/wince/CEDevice.cpp index c91ffe4507..d9bf205a5f 100644 --- a/backends/wince/CEDevice.cpp +++ b/backends/wince/CEDevice.cpp @@ -19,6 +19,9 @@ * */ +//#define SIMU_SMARTPHONE 1 +//#define SIMU_SMARTPHONE_2005 1 + #include "common/stdafx.h" #include "CEDevice.h" @@ -100,8 +103,12 @@ 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; return (OSystem_WINCE3::getScreenWidth() < 320 && OSystem_WINCE3::getScreenWidth() >= 240); @@ -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]; |