+# ifdef DEBUG
+ check_gl_error ("glPushMatrix");
+# endif
+
+ if (!in_scene_p)
+ {
+ int rot = (int) current_device_rotation();
+ while (rot <= -180) rot += 360;
+ while (rot > 180) rot -= 360;
+
+ glLoadIdentity();
+ glViewport (0, 0, window_width, window_height);
+ glOrtho (0, window_width, 0, window_height, -1, 1);
+
+ if (rot > 135 || rot < -135) /* 180 */
+ {
+ glTranslatef (window_width, window_height, 0);
+ glRotatef (180, 0, 0, 1);
+ }
+ else if (rot > 45) /* 90 */
+ {
+ glTranslatef (window_width, 0, 0);
+ glRotatef (90, 0, 0, 1);
+ }
+ else if (rot < -45) /* 270 */
+ {
+ glTranslatef(0, window_height, 0);
+ glRotatef (-90, 0, 0, 1);
+ }
+ }
+
+# ifdef DEBUG
+ check_gl_error ("glOrtho");
+# endif
+
+ /* Let's always dropshadow the FPS and Title text. */
+ if (! in_scene_p)
+ clear_background_p = True;
+
+
+ /* draw the text */
+
+ glTranslatef (x, y, 0);