[.net] Screen Rotation bug on some phones

Started by
0 comments, last by CGameProgrammer 13 years, 11 months ago
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
Advertisement
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.
~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.

This topic is closed to new replies.

Advertisement