Mercurial > sdl-ios-xcode
diff src/video/dummy/SDL_nullvideo.c @ 1676:e136f3ffdc1b SDL-1.3
Adding software renderer implementation
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 12 Jun 2006 09:10:06 +0000 |
parents | 9857d21967bb |
children | 5e4c5e095925 |
line wrap: on
line diff
--- a/src/video/dummy/SDL_nullvideo.c Sun Jun 11 07:30:16 2006 +0000 +++ b/src/video/dummy/SDL_nullvideo.c Mon Jun 12 09:10:06 2006 +0000 @@ -101,10 +101,7 @@ /* Set the function pointers */ device->VideoInit = DUMMY_VideoInit; device->SetDisplayMode = DUMMY_SetDisplayMode; - device->CreateWindowSurface = DUMMY_CreateWindowSurface; - device->UpdateWindowSurface = DUMMY_UpdateWindowSurface; device->VideoQuit = DUMMY_VideoQuit; - device->InitOSKeymap = DUMMY_InitOSKeymap; device->PumpEvents = DUMMY_PumpEvents; device->free = DUMMY_DeleteDevice; @@ -139,35 +136,6 @@ return 0; } -static void -DUMMY_CreateWindowSurface(_THIS, SDL_Window * window, Uint32 flags) -{ - int bpp; - Uint32 Rmask, Gmask, Bmask, Amask; - - SDL_PixelFormatEnumToMasks(SDL_GetCurrentDisplayMode()->format, &bpp, - &Rmask, &Gmask, &Bmask, &Amask); - window->surface = - SDL_CreateRGBSurface(flags, window->w, window->h, bpp, Rmask, Gmask, - Bmask, Amask); -} - -static void -DUMMY_UpdateWindowSurface(_THIS, SDL_Window * window, int numrects, - SDL_Rect * rects) -{ - static int frame_number; - if (SDL_getenv("SDL_VIDEO_DUMMY_SAVE_FRAMES")) { - char file[128]; - SDL_snprintf(file, sizeof(file), "SDL_screen-%8.8d.bmp", - ++frame_number); - SDL_SaveBMP(window->surface, file); - } -} - -/* Note: If we are terminated, this could be called in the middle of - another SDL video routine -- notably UpdateRects. -*/ void DUMMY_VideoQuit(_THIS) {