I have a Windows CE 6.0 display driver and rotation works fine if the device boots with the display angle set to either 0 or 180 degrees. You can rotate through all rotations with no problem. If I boot the device in 90 or 270 though screen works fine until I try to change the rotation at which point the driver crashes in EmulatedBltFill16 (call through EmulatedBltRotate). The screen then doesn't seem to repaint properly. The physical screen size is 800x480 so in 90 degrees the relative width/height is 480x800. When I rotate to 180 degrees the new relative width/height is now 480x450ish. Nothing is repainted on the left half of the screen or the bottom 30 pixels or so (where the taskbar should be), so you still see the icons from the previous rotation on the unpainted portion of the screen. The mouse is also blocked from going onto that portion of the screen that were not redrawn. The icons have redrawn in the correct orientation and can be clicked on, but the taskbar is still left from the old orientation and hasn't been redrawn for the new one (perhaps this is where the crash occurred?). Each rotation causes more crashing and even rotating back to the original orientation that work on boot no longer works properly. I've searched the web and forums and the closest thing I found was here:
http://www.pocketpcjunkies.com/Uwe/Forum.aspx/wince-pb/17176/CE-6-0-Display-Driver-Rotation
The poster mentioned changing the GetModeInfo() function for the rotation. The display driver I'm working with already accounts for the rotation in this function, so the switch that he added isn't necessary. I did decide to fiddle around in there though and found something interesting. If i hard code the value to always be the physical screen height for the mode(800 x 480), then if i boot in 90 degrees it will crash and not draw properly (trying to draw 800x480 on 480x800). Interestingly though is that after the first rotation I can then rotate through all 4 orientations without a problem. I noticed that the GetModeInfo() function apparently is only called twice when the driver is first starting up. It would seem that if the display driver initializes something in a different order, then perhaps it would work.
Does anyone have any ideas
Thanks in advance.
这辈子没法做太多事情,所以每一件都要做到精彩绝伦