+ if (!in_scene_p)
+ {
+ double rot = current_device_rotation();
+
+ glLoadIdentity();
+ glOrtho (0, window_width, 0, window_height, -1, 1);
+
+ if (rot > 135 || rot < -135)
+ {
+ glTranslatef (window_width, window_height, 0);
+ glRotatef (180, 0, 0, 1);
+ }
+ else if (rot > 45)
+ {
+ glTranslatef (window_width, 0, 0);
+ glRotatef (90, 0, 0, 1);
+ y -= (window_height - window_width);
+ if (y < line_height * lines + 10)
+ y = line_height * lines + 10;
+ }
+ else if (rot < -45)
+ {
+ glTranslatef(0, window_height, 0);
+ glRotatef (-90, 0, 0, 1);
+ y -= (window_height - window_width);
+ if (y < line_height * lines + 10)
+ y = line_height * lines + 10;
+ }
+ }