# HG changeset patch # User Patrice Mandin # Date 1090054704 0 # Node ID 99f439d6ee4a526a9d1b7743c0bb34ae38929166 # Parent fd4a6847ddc06aca2c3668ddd4cbf3380bb6d03e Forgot to initialize video mode list diff -r fd4a6847ddc0 -r 99f439d6ee4a src/video/gem/SDL_gemvideo.c --- a/src/video/gem/SDL_gemvideo.c Fri Jun 25 05:24:50 2004 +0000 +++ b/src/video/gem/SDL_gemvideo.c Sat Jul 17 08:58:24 2004 +0000 @@ -437,6 +437,15 @@ 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 @@ 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)