changeset 1512:d3364cc1f792

small changes to erase only needed place (rectangles doesn't overlap)
author atlka
date Tue, 14 Aug 2001 12:51:23 +0000
parents f29e0c2bb675
children 60ec209710b6
files libvo/vo_svga.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_svga.c	Tue Aug 14 12:30:56 2001 +0000
+++ b/libvo/vo_svga.c	Tue Aug 14 12:51:23 2001 +0000
@@ -514,10 +514,14 @@
   if (y_pos) {
     gl_fillbox(0, 0, WIDTH, y_pos, 0);
     gl_fillbox(0, HEIGHT - y_pos, WIDTH, y_pos, 0);
-  }
-  if (x_pos) {
-    gl_fillbox(0, 0, x_pos, HEIGHT, 0);
-    gl_fillbox(WIDTH - x_pos, 0, x_pos, HEIGHT, 0);
+    if (x_pos) {
+       int hmy=HEIGHT - (y_pos<<1); 
+       gl_fillbox(0, y_pos, x_pos, hmy, 0);
+       gl_fillbox(WIDTH - x_pos, y_pos, x_pos, hmy, 0);
+    }
+  } else if (x_pos) {
+    gl_fillbox(0, y_pos, x_pos, HEIGHT, 0);
+    gl_fillbox(WIDTH - x_pos, y_pos, x_pos, HEIGHT, 0);
   }
 
   vo_draw_text(WIDTH, HEIGHT, draw_alpha);