From e3e8067db7f7dfdb36c4697687dc9026c9a2669b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 20 May 2005 14:11:11 +0000 Subject: use MAX_SCREENS instead of hard-coded number --- progs/egl/eglinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'progs') diff --git a/progs/egl/eglinfo.c b/progs/egl/eglinfo.c index ec50468cab5..7d71640310a 100644 --- a/progs/egl/eglinfo.c +++ b/progs/egl/eglinfo.c @@ -33,6 +33,7 @@ #define MAX_CONFIGS 1000 #define MAX_MODES 1000 +#define MAX_SCREENS 10 /** @@ -98,11 +99,11 @@ PrintModes(EGLDisplay d) #ifdef EGL_MESA_screen_surface const char *extensions = eglQueryString(d, EGL_EXTENSIONS); if (strstr(extensions, "EGL_MESA_screen_surface")) { - EGLScreenMESA screens[20]; + EGLScreenMESA screens[MAX_SCREENS]; EGLint numScreens = 1, scrn; EGLModeMESA modes[MAX_MODES]; - eglGetScreensMESA(d, screens, 20, &numScreens); + eglGetScreensMESA(d, screens, MAX_SCREENS, &numScreens); printf("Number of Screens: %d\n\n", numScreens); for (scrn = 0; scrn < numScreens; scrn++) { -- cgit v1.2.3