made image cache flush occur when switching video modes...
...in an effort to solve colour distortion problem on MacOSX
This commit is contained in:
parent
aed93900ed
commit
a1057c2d49
1 changed files with 10 additions and 4 deletions
|
@ -102,6 +102,14 @@ SDL_Surface* get_tinted(const std::string& filename, TINT tint)
|
|||
return surface;
|
||||
}
|
||||
|
||||
void flush_cache()
|
||||
{
|
||||
clear_surfaces(images_);
|
||||
clear_surfaces(scaledImages_);
|
||||
clear_surfaces(greyedImages_);
|
||||
clear_surfaces(brightenedImages_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace image {
|
||||
|
@ -110,15 +118,13 @@ manager::manager() {}
|
|||
|
||||
manager::~manager()
|
||||
{
|
||||
clear_surfaces(images_);
|
||||
clear_surfaces(scaledImages_);
|
||||
clear_surfaces(greyedImages_);
|
||||
clear_surfaces(brightenedImages_);
|
||||
flush_cache();
|
||||
}
|
||||
|
||||
void set_pixel_format(SDL_PixelFormat* format)
|
||||
{
|
||||
pixel_format = format;
|
||||
flush_cache();
|
||||
}
|
||||
|
||||
void set_colour_adjustment(int r, int g, int b)
|
||||
|
|
Loading…
Add table
Reference in a new issue