+/*
+ {
+ double rot = current_device_rotation();
+ glRotatef(rot, 0, 0, 1);
+ if ((rot > 45 && rot < 135) ||
+ (rot < -45 && rot > -135))
+ {
+ GLfloat s = MI_WIDTH(mi) / (GLfloat) MI_HEIGHT(mi);
+ glScalef (s, 1/s, 1);
+ }
+ }
+*/
+
+# ifdef HAVE_MOBILE
+ if (MI_WIDTH(mi) < MI_HEIGHT(mi)) /* portrait orientation */
+ {
+ GLfloat s = (MI_WIDTH(mi) / (GLfloat) MI_HEIGHT(mi));
+ glScalef (s, s, s);
+ glTranslatef(-s/2, 0, 0);
+ }
+# endif
+
+ glOrtho(0, MI_WIDTH(mi), 0, MI_HEIGHT(mi), -1, 1);