changeset 32395:aca925e56969

Fix handling of invalid values in aspect_save_screenres to not overwrite valid values.
author reimar
date Mon, 11 Oct 2010 17:09:33 +0000
parents 914208d188b9
children 6e65cda7f150
files libvo/aspect.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/aspect.c	Mon Oct 11 12:33:57 2010 +0000
+++ b/libvo/aspect.c	Mon Oct 11 17:09:33 2010 +0000
@@ -71,12 +71,11 @@
 #ifdef ASPECT_DEBUG
   printf("aspect_save_screenres %dx%d \n",scrw,scrh);
 #endif
-  if (!scrw && !scrh) {
+  if (scrw <= 0 && scrh <= 0)
     scrw = 1024;
-    scrh = 768;
-  } else if (scrw) {
+  if (scrh <= 0)
     scrh = (scrw * 3 + 3) / 4;
-  } else
+  if (scrw <= 0)
     scrw = (scrh * 4 + 2) / 3;
   aspdat.scrw = scrw;
   aspdat.scrh = scrh;