diff test/testgl2.c @ 1967:01e29c3e9a29

In general, fill in pointers to structures, rather than return them.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 05 Aug 2006 22:34:23 +0000
parents a788656ca29a
children 8055185ae4ed
line wrap: on
line diff
--- a/test/testgl2.c	Sat Aug 05 17:12:22 2006 +0000
+++ b/test/testgl2.c	Sat Aug 05 22:34:23 2006 +0000
@@ -165,6 +165,7 @@
     int fsaa, accel;
     int value;
     int i, done;
+    SDL_DisplayMode mode;
     SDL_Event event;
     Uint32 then, now, frames;
 
@@ -235,8 +236,8 @@
         SDL_GL_SetSwapInterval(0);
     }
 
-    printf("Screen BPP: %d\n",
-           SDL_BITSPERPIXEL(SDL_GetCurrentDisplayMode()->format));
+    SDL_GetCurrentDisplayMode(&mode);
+    printf("Screen BPP: %d\n", SDL_BITSPERPIXEL(mode.format));
     printf("\n");
     printf("Vendor     : %s\n", glGetString(GL_VENDOR));
     printf("Renderer   : %s\n", glGetString(GL_RENDERER));