View Single Post
Old 03-31-2010, 02:28 PM   #21
Mr. X
Connoisseur
Mr. X is on a distinguished road
 
Posts: 68
Karma: 64
Join Date: Mar 2010
Location: Philadelphia
Device: iRex DR800SG
So if anyone else is using the 180° flip sysd, you will have noticed that it annoyingly switches to landscape after connecting via USB... I finally got annoyed enough and tracked this down to several places where the get_orientation IPC call assumes that any orientation other than portrait means landscape... Combined with the fact that get_orientation() returns the exact orientation while set_orientation() (which should really be called set_rotated()) takes a relative orientation, my patch has become a bit bigger...

Reading through all the open sourced irex code, it doesn't look like the get_orientation IPC call is ever used to check anything other than rotation status. So rather than push "portrait" == "flip" into every module, I have changed get_orientation() to only return "portrait" or "landscape" to match set_rotation() which only takes "portrait" "landscape" or "flip". I can't think of a case where something outside of sysd would care about clockwise/anticlockwise landscape or normal/flip portrait, they just care if its 1024x768 or 768x1024.

Hopefully this feature makes it into the official source at some point...

Both the first diff and this one are needed.
Attached Files
File Type: txt changeset_r1616.diff.txt (3.7 KB, 174 views)
Mr. X is offline   Reply With Quote