Open PalMusicFan opened 5 years ago
Display error appears
Can you be more specific? e.g. what does SDL_GetError()
return in this case?
One thing i see in the SDL port is, that we use an indexed shadow surface for 8 bit mode. I guess there is some cleanup missing, when there are multiple calls to reset the mode.
I have made a demo to demonstrate the error. The following screenshot shows what the error looks like.
Here is the demo with source code. This demo displays a bmp with a palette for 5 seconds, then do the same thing again, and we could see the error. Then it switchs to bpp 16 mode, which works well.
It seems SDL_GetError() returns an empty string.
Hello! The homebrew game I am porting is a 256-color game with bpp 16 video clips. So repeated SDL_SetVideoMode calling is needed. Although there is no problem of setting bpp to 8 for the first time and then setting bpp to 16 for the video clips, I found that once the bpp 8 SDL_SetVideoMode is called again, Display error appears. After that, bpp 16 SDL_SetVideoMode works but I can not get a correct bpp 8 Video Mode again. Even setting bpp to 8 twice without bpp 16 Video Mode causes the error.
Thanks!