I am developing with Gapidraw, which allows to share the same code between win32 platform (it works well with PocketPC and Desktop platform) and I am starting to compile my project for Smartphone devices.
I don't have to compile the functions that manage touchscreen support so I need to know the difference between PocketPC and Smartphone devices, is there a #define that can tell me ?
I think I would be exactly the same way to make the difference between the desktop and the PocketPC device in the code using the #define _WIN32_WCE
I found this :
- Code:
BOOL IsSmartphone()
{
TCHAR szPlatform[30];
SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(szPlatform), szPlatform, 0);
return (_tcscmp(szPlatform, _T("SmartPhone")) == 0);
// On Pocket PC, szPlatform would be "PocketPC"
}
Sources :
[url=http://msdn2.microsoft.com/en-us/library/ms838244.aspx]http://msdn2.microsoft.com/en-us/library/ms838244.aspx
[/url]
http://channel9.msdn.com/wiki/default.aspx/MobileDeveloper.SystemParametersInfo
Just define whatever you want in your project settings and use that in your smartphone configuration?
Yes norwy, use that code you found, it is much better to do it at runtime than to compile 2 different binaries, actually there is no point in compiling 2 binaries at all now, even the same installer works on both PPC and SP now.
You're only right if your app don't support WM2003 (I think that millions of people still have 2003 devices like the X30, A620BT, hx4700, SPV...), 2003 SP can't run Pocket PC binairies (yep ?).
Hm, maybe you aren't compiling it correctly then, all of my games work on all 2003 and up pocket pcs and smartphones, all of my installers work on all platforms 2003 and up as well. One binary and one installer for 2003 and up, last I counted this was 97%+ of my customer base before doing this conversion over a year ago, by now the number of people buying games for pre 2003 systems is less than 1% I would guess.