Is there are way to detect at runtime whether the user has their device (PocketPC) in Landscape or Portrait mode? And in addition, Left or Right hand Landscape?
I want to force our game to always be Portrait and I can do that just by rotating the graphics, but then the input from the PPC would still think its Landscape wouldn't it?
Or even more advanced can I just force the PPC to Portrait mode when our game starts?
Hi Jeffer,
I doesn't matter if a game compiled with Edge is started in portrait or landscape mode, the controls and graphics will be adjusted depending on the rotation option of the Edge configuration. If the rotation is set to ROT_NONE, the game will always run in portrait mode.
I'm still having an issue here. I guess I better explain more what my problem is.
I'm trying to always force the game to run in portrait mode and that seems to work as you say setting rotation as none - for displaying anyways.
However, this doesn't seem to work for input and especially for VGA devices.
Unless the rotation is set to ROT_90DEG the input coordinates are not adjusted for the fact that the physcial device is in landscape mode.
VGA seems to be worse because if this is set:
config->resolution = ERS_REQUIREHIGHRES;
The input coordinates seem to still be coming out at 240x320 and landscape on VGA becomes useless.
Any thoughts?
Oh, and in addition there doesn't seem to be a way to detect at runtime if the physical device is in landscape mode or not.
Even with ENABLE_HIRES set config->videowidth and config->videoheight report as 240 and 320 in ClassMain::OnCreate
Can you tell me which version of the Edge SDK you're currently using? I remember fixing this bug in one of our earlier releases. Which device are you testing on and which version of Windows Mobile is installed on this device?
I'm using an HP IPAQ HX4700, WINCE 4.21, VGA display and Edge 2.3
I tried to update to 2.4
I had to add DirectX 9.0c lib folder to additional libraries in my project because it was complaining about not finding ddraw.lib (2.3 didn't required that apparently) but I'm getting this error when I try to build:
edge.lib(edsp_2d.obj) : error LNK2019: unresolved external symbol DirectDrawCreate referenced in function "private: long __cdecl ClassEDisplay::OpenDirectX(struct HWND__ *,unsigned char,unsigned long,unsigned long,bool)" (?OpenDirectX@ClassEDisplay@@AAAJPAUHWND__@@EKK_N@Z)
It also looks like in 2.4 the display videowidth and videoheight class vars are now "private". How will I access the screen size now? After I get the build to work of course!
That's very strange, when building the helloworld sample in the Edge 2.40 installation folder, do you get this error as well?
Maybe you can tell me more about the compiler you're using and the target platform you're compiling for (For example: using Visual Studio 2005 to compile for Pocket PC 2005 and running it on an Ipaq with Windows Mobile 5).
In the meantime, I will create a sample to display the screen size and testing stylus input. If the sample is done, to which e-mail address I can send it to?
jleigh@yucatech.com
I'm using VS.NET 2005 on WinXP, targeting Mobile 2003 and 5.0, VGA devices (various manufacturers HP among them).
It also appears that edge does not recognize right versus left handed landscape, is that true?
Yes, previously I was checking against the real screen width/height, but this fix doesn't apply to displays which can be rotated to the left and to the right.
Currently I'm fixing this for the Edge SDK 2.50 release, which will be released soon. I will also add an option to take the active display rotation as default.
Are you still on target for releasing 2.5 before the end of the month (with this patch)?
Yes, it will probably be released on March 31.