Sign in to follow this  
sepsys

[.net] Screen Rotation bug on some phones

Recommended Posts

Hi! I'm fighting a bug for several hours now... I'm coding a game that needs to be in landscape mode. On the emulator, the HTC Touch Diamond and the HTC Touch HD2 my code works like a charm, but on the HTC Touch HD it doesn't. In the constructor of the main form I do a
Microsoft.WindowsCE.Forms.SystemSettings.ScreenOrientation =
Microsoft.WindowsCE.Forms.ScreenOrientation.Angle90;
That does it on the two mentioned phones. But the situation on the other phone is that: http://www.bitoholics.net/rotation_problem.png I already tried to: PInvoke ChangeDisplaySettingsEx from coredll.dll and set the screen to portrait, then set it to 90 degrees with the above code (Angle90). I tried only to set 90 degrees over ChangeDisplaySettingsEx... and I tried not to rotate the display at all. But it always shows in one of the cases shown in the picture. It kind of seems like that the phone doesn't really change to landscape (only the form does). Like the phone doesn't rotate the display, but only shows the content rotated... how can I fix that? Thanks! sepsys

Share this post


Link to post
Share on other sites
It looks like the phone is interpreting the angles 90 degrees from what they're supposed to be. Perhaps it considers 0 degrees to be facing right instead of facing up? I wonder if you just need to write special logic for that phone.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this