Register
Site Login
Site Search
Forums
Advertisement
Welcome to PocketMatrix. PocketMatrix is dedicated to providing the best online community for mobile device developers and enthusiests. What's new?

[resolved] Detecting PocketPC and Smartphone devices


[resolved] Detecting PocketPC and Smartphone devices

Postby norwy » Nov 21, 2007 @ 11:41am

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
Last edited by norwy on Nov 28, 2007 @ 10:25pm, edited 1 time in total.
norwy
pm Member
 
Posts: 39
Joined: Aug 13, 2004 @ 4:10pm
Location: Paris


Postby norwy » Nov 28, 2007 @ 10:24pm

I found this :

Code: Select all







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"
}
7 lines; 2 keywds; 3 nums; 25 ops; 1 strs; 1 coms    Syntactic Coloring v0.4 - Dan East  
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
norwy
pm Member
 
Posts: 39
Joined: Aug 13, 2004 @ 4:10pm
Location: Paris


Postby Kzinti » Nov 29, 2007 @ 12:36am

Just define whatever you want in your project settings and use that in your smartphone configuration?
Kzinti
pm Member
 
Posts: 3238
Joined: Jan 13, 2002 @ 5:23am


Postby mm40 » Jan 30, 2008 @ 5:02pm

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.
User avatar
mm40
pm Member
 
Posts: 135
Joined: Feb 21, 2003 @ 9:11pm


Postby norwy » Jan 31, 2008 @ 1:36am

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 ?).
norwy
pm Member
 
Posts: 39
Joined: Aug 13, 2004 @ 4:10pm
Location: Paris


Postby mm40 » Feb 26, 2008 @ 6:53pm

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.
User avatar
mm40
pm Member
 
Posts: 135
Joined: Feb 21, 2003 @ 9:11pm


Return to GapiDraw


Sort


Forum Description

The Cross-platform Graphics SDK for Palms, Pocket PCs, Symbian Devices, and Stationary PCs.

Moderators:

sponge, Johan

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron