Mercurial > sdl-ios-xcode
comparison src/video/gem/SDL_gemvideo.c @ 902:99f439d6ee4a
Forgot to initialize video mode list
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Sat, 17 Jul 2004 08:58:24 +0000 |
parents | 60a4293ffea9 |
children | 24852aeb0657 |
comparison
equal
deleted
inserted
replaced
901:fd4a6847ddc0 | 902:99f439d6ee4a |
---|---|
435 /* Setup VDI fill functions */ | 435 /* Setup VDI fill functions */ |
436 vsf_color(VDI_handle,0); | 436 vsf_color(VDI_handle,0); |
437 vsf_interior(VDI_handle,1); | 437 vsf_interior(VDI_handle,1); |
438 vsf_perimeter(VDI_handle,0); | 438 vsf_perimeter(VDI_handle,0); |
439 | 439 |
440 /* Fill video modes list */ | |
441 SDL_modelist[0] = malloc(sizeof(SDL_Rect)); | |
442 SDL_modelist[0]->x = 0; | |
443 SDL_modelist[0]->y = 0; | |
444 SDL_modelist[0]->w = VDI_w; | |
445 SDL_modelist[0]->h = VDI_h; | |
446 | |
447 SDL_modelist[1] = NULL; | |
448 | |
440 #ifdef DEBUG_VIDEO_GEM | 449 #ifdef DEBUG_VIDEO_GEM |
441 printf("sdl:video:gem: VideoInit(): done\n"); | 450 printf("sdl:video:gem: VideoInit(): done\n"); |
442 #endif | 451 #endif |
443 | 452 |
444 /* We're done! */ | 453 /* We're done! */ |
445 return(0); | 454 return(0); |
446 } | 455 } |
447 | 456 |
448 SDL_Rect **GEM_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags) | 457 SDL_Rect **GEM_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags) |
449 { | 458 { |
450 if (format->BitsPerPixel == VDI_bpp) { | 459 if (format->BitsPerPixel != VDI_bpp) { |
451 return((SDL_Rect **)-1); | |
452 } else { | |
453 return ((SDL_Rect **)NULL); | 460 return ((SDL_Rect **)NULL); |
454 } | 461 } |
462 | |
463 if (flags & SDL_FULLSCREEN) { | |
464 return (SDL_modelist); | |
465 } | |
466 | |
467 return((SDL_Rect **)-1); | |
455 } | 468 } |
456 | 469 |
457 static void GEM_FreeBuffers(_THIS) | 470 static void GEM_FreeBuffers(_THIS) |
458 { | 471 { |
459 /* Release buffer */ | 472 /* Release buffer */ |