mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-03 21:45:32 +02:00
Set color bitmasks when saving a Bitmap to a file
This commit is contained in:
parent
5cee380992
commit
7641bbe59f
1 changed files with 1 additions and 1 deletions
|
@ -926,7 +926,7 @@ void Bitmap::saveToFile(const char *filename)
|
|||
|
||||
GUARD_MEGA;
|
||||
|
||||
SDL_Surface *surf = SDL_CreateRGBSurface(0, width(), height(),p->format->BitsPerPixel, 0,0,0,0);
|
||||
SDL_Surface *surf = SDL_CreateRGBSurface(0, width(), height(),p->format->BitsPerPixel, p->format->Rmask,p->format->Gmask,p->format->Bmask,p->format->Amask);
|
||||
|
||||
if (!surf)
|
||||
throw new Exception(Exception::SDLError, "Failed to save bitmap: %s", SDL_GetError());
|
||||
|
|
Loading…
Add table
Reference in a new issue