Make sure all the GL bits of sdltheoraplay.c are wrapped in #if SUPPORT_OPENGL.
authorEthan Lee <flibitijibibo@gmail.com>
Tue, 23 Apr 2013 10:02:24 -0400
changeset 54 fcda007df25d
parent 53 6be6aecf660e
child 55 8174c4ef22dc
Make sure all the GL bits of sdltheoraplay.c are wrapped in #if SUPPORT_OPENGL.
test/sdltheoraplay.c
--- a/test/sdltheoraplay.c	Mon Jan 28 18:46:03 2013 -0500
+++ b/test/sdltheoraplay.c	Tue Apr 23 10:02:24 2013 -0400
@@ -391,9 +391,11 @@
     int has_audio = 0;
     int has_video = 0;
     Uint32 sdlinitflags = 0;
+    #if SUPPORT_OPENGL
     GLenum glfmt = GL_NONE;
     GLenum gltype = GL_NONE;
     GLuint texture[3] = { 0, 0, 0 };
+    #endif
     SDL_Event event;
     Uint32 framems = 0;
     int opened_audio = 0;
@@ -727,13 +729,16 @@
                         SDL_Rect dstrect = { 0, 0, screen->w, screen->h };
                         SDL_DisplayYUVOverlay(overlay, &dstrect);
                     } // if
+                    #if SUPPORT_OPENGL
                     else if (opengl)
                     {
                         glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
                         SDL_GL_SwapBuffers();
                     } // else if
+                    #endif
                     break;
 
+                #if SUPPORT_OPENGL
                 case SDL_VIDEORESIZE:
                     assert(opengl);
                     screen = SDL_SetVideoMode(event.resize.w, event.resize.h, 0, vidmodeflags);
@@ -742,6 +747,7 @@
                     glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
                     SDL_GL_SwapBuffers();
                     break;
+                #endif
 
                 case SDL_QUIT:
                     quit = 1;