+static void
+device_rotate(ModeInfo *mi)
+{
+ GLfloat rot = current_device_rotation();
+ glRotatef(rot, 0, 0, 1);
+ if ((rot > 45 && rot < 135) ||
+ (rot < -45 && rot > -135))
+ {
+ GLfloat s = MI_HEIGHT(mi) / (GLfloat) MI_WIDTH(mi);
+ glScalef (1/s, s, 1);
+ }
+}
+
+