changeset 387:43acef8f7c74

Requested resolution (d_width) added.
author se7encode
date Fri, 13 Apr 2001 13:02:13 +0000
parents 020ca66964e4
children ccb5ebfaaeac
files libvo/vo_svga.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_svga.c	Fri Apr 13 13:00:07 2001 +0000
+++ b/libvo/vo_svga.c	Fri Apr 13 13:02:13 2001 +0000
@@ -77,13 +77,15 @@
 static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width,
                      uint32_t d_height, uint32_t fullscreen, char *title, 
 		     uint32_t format) {
+  uint32_t wid = (d_width > 0 ? d_width : width);
+  
   if (!checked) {
     checksupportedmodes(); // Looking for available video modes
   }
   pformat = format;
   if (format == IMGFMT_YV12) bpp = 32;
   else bpp = format & 255;
-  if (d_width > 800)
+  if (wid > 800)
     switch (bpp) {
       case 32: vid_mode = 36; break;
       case 24: vid_mode = 25; break;
@@ -91,7 +93,7 @@
       case 15: vid_mode = 23; break;
     }
   else
-    if (d_width > 640)
+    if (wid > 640)
       switch (bpp) {
         case 32: vid_mode = 35; break;
         case 24: vid_mode = 22; break;