# HG changeset patch # User reimar # Date 1280684258 0 # Node ID 41241a72f4d83c1536def213cc35de3b6fccc446 # Parent 1c9d6499e37ce9e99093194a97c9b2eef0304cba Use early return instead of large if block. diff -r 1c9d6499e37c -r 41241a72f4d8 libvo/vo_gl.c --- a/libvo/vo_gl.c Sun Aug 01 17:36:15 2010 +0000 +++ b/libvo/vo_gl.c Sun Aug 01 17:37:38 2010 +0000 @@ -760,7 +760,8 @@ static void do_render_osd(int type) { int draw_osd = (type & RENDER_OSD) && osdtexCnt > 0; int draw_eosd = (type & RENDER_EOSD) && eosdDispList; - if (draw_osd || draw_eosd) { + if (!draw_osd && !draw_eosd) + return; // set special rendering parameters if (!scaled_osd) { mpglMatrixMode(GL_PROJECTION); @@ -788,7 +789,6 @@ if (!scaled_osd) mpglPopMatrix(); mpglBindTexture(gl_target, 0); - } } static void draw_osd(void)