From d2ee3368eff9dd3942c04c1a85d4709cedf62cf9 Mon Sep 17 00:00:00 2001 From: Patrice Mandin <patmandin@gmail.com> Date: Sat, 17 Jul 2004 08:58:24 +0000 Subject: [PATCH] Forgot to initialize video mode list --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40903 --- src/video/gem/SDL_gemvideo.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/video/gem/SDL_gemvideo.c b/src/video/gem/SDL_gemvideo.c index c7c774bb..abf7bc7e 100644 --- a/src/video/gem/SDL_gemvideo.c +++ b/src/video/gem/SDL_gemvideo.c @@ -437,6 +437,15 @@ int GEM_VideoInit(_THIS, SDL_PixelFormat *vformat) vsf_interior(VDI_handle,1); vsf_perimeter(VDI_handle,0); + /* Fill video modes list */ + SDL_modelist[0] = malloc(sizeof(SDL_Rect)); + SDL_modelist[0]->x = 0; + SDL_modelist[0]->y = 0; + SDL_modelist[0]->w = VDI_w; + SDL_modelist[0]->h = VDI_h; + + SDL_modelist[1] = NULL; + #ifdef DEBUG_VIDEO_GEM printf("sdl:video:gem: VideoInit(): done\n"); #endif @@ -447,11 +456,15 @@ int GEM_VideoInit(_THIS, SDL_PixelFormat *vformat) SDL_Rect **GEM_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags) { - if (format->BitsPerPixel == VDI_bpp) { - return((SDL_Rect **)-1); - } else { + if (format->BitsPerPixel != VDI_bpp) { return ((SDL_Rect **)NULL); } + + if (flags & SDL_FULLSCREEN) { + return (SDL_modelist); + } + + return((SDL_Rect **)-1); } static void GEM_FreeBuffers(_THIS) -- 2.18.1