Skip to content

Commit

Permalink
Make sure all the GL bits of sdltheoraplay.c are wrapped in #if SUPPO…
Browse files Browse the repository at this point in the history
…RT_OPENGL.
  • Loading branch information
flibitijibibo committed Apr 23, 2013
1 parent 1cf9609 commit e4fe1dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/sdltheoraplay.c
Expand Up @@ -391,9 +391,11 @@ static void playfile(const char *fname, const THEORAPLAY_VideoFormat vidfmt,
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;
Expand Down Expand Up @@ -727,13 +729,16 @@ static void playfile(const char *fname, const THEORAPLAY_VideoFormat vidfmt,
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);
Expand All @@ -742,6 +747,7 @@ static void playfile(const char *fname, const THEORAPLAY_VideoFormat vidfmt,
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
SDL_GL_SwapBuffers();
break;
#endif

case SDL_QUIT:
quit = 1;
Expand Down

0 comments on commit e4fe1dc

Please sign in to comment.