[SDL] SDL-1.1.0, Win32, GDI, Fullscreen, 8-bit Again
Facundo Dominguez - INCO
fdomin at fing.edu.uy
Mon Oct 2 16:19:10 PDT 2006
Hello:
The following code shows wrong colors with the windib video driver.
I test it on a Pentium II and AMD athlon both with WIN98.
I want to know if it's a bug I should report (found nothing on bugzilla).
I found an email from March 2000 with the same warning
([SDL] SDL-1.1.0, Win32, GDI, Fullscreen, 8-bit)
#include "SDL.h"
int main(int argc,char** argv){
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE);
SDL_Surface * screen = SDL_SetVideoMode(640, 480, 8,SDL_HWPALETTE);
SDL_Surface * s=SDL_LoadBMP("planet1.bmp");
SDL_SetColors(screen, s->format->palette->colors,
0,s->format->palette->ncolors);
SDL_FillRect(screen,NULL,SDL_MapRGB(screen->format,0,0,0));
SDL_Rect r={(screen->w-s->w)>>1,(screen->h-s->h)>>1,s->w,s->h};
SDL_BlitSurface(s,NULL,screen,&r);
SDL_Flip(screen);
SDL_Delay(1000);
SDL_Quit();
return 0;
}
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the SDL
mailing list