[vlc-commits] commit: Replace a run-time assertion with a pre-processor check ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Mon Nov 8 18:56:12 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Nov 8 19:54:55 2010 +0200| [caa737e1253eb2eef135f8d36045a937754eeeaa] | committer: Rémi Denis-Courmont
Replace a run-time assertion with a pre-processor check
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=caa737e1253eb2eef135f8d36045a937754eeeaa
---
modules/video_output/opengl.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index b2e2224..170f38c 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -425,10 +425,11 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
#if VLCGL_TARGET == GL_TEXTURE_2D
const float f_normw = vgl->tex_width;
const float f_normh = vgl->tex_height;
-#else
- assert(VLCGL_TARGET == GL_TEXTURE_RECTANGLE_EXT);
+#elif VLCGL_TARGET == GL_TEXTURE_RECTANGLE_EXT
const float f_normw = 1.0;
const float f_normh = 1.0;
+#else
+# error Unknown texture type!
#endif
float f_x = (source->i_x_offset + 0 ) / f_normw;
More information about the vlc-commits
mailing list