changeset 30969:8a443793daef

Avoid duplicating a condition.
author reimar
date Sun, 04 Apr 2010 19:42:52 +0000
parents 6daa73f57ced
children 600d1bbaf62b
files libvo/vo_gl2.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_gl2.c	Sun Apr 04 19:39:54 2010 +0000
+++ b/libvo/vo_gl2.c	Sun Apr 04 19:42:52 2010 +0000
@@ -198,8 +198,9 @@
     glGetTexLevelParameteriv
       (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format);
 
-    if (format != gl_internal_format)
-    {
+    if (format == gl_internal_format)
+      break;
+
       mp_msg (MSGT_VO, MSGL_V, "[gl2] Needed texture [%dx%d] too big, trying ",
               texture_width, texture_height);
 
@@ -214,9 +215,8 @@
         mp_msg (MSGT_VO, MSGL_FATAL, "[gl2] Give up .. usable texture size not avaiable, or texture config error !\n");
         return -1;
       }
-    }
   }
-  while (format != gl_internal_format && texture_width > 1 && texture_height > 1);
+  while (texture_width > 1 && texture_height > 1);
 #ifdef TEXTURE_WIDTH
   texture_width = TEXTURE_WIDTH;
 #endif