Fixed a bug in detecting surface mapping changes
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40846
This commit is contained in:
parent
5de765a423
commit
54478fc8ca
2 changed files with 7 additions and 2 deletions
|
@ -246,7 +246,12 @@ SDL_PixelFormat *SDL_ReallocFormat(SDL_Surface *surface, int bpp,
|
|||
*/
|
||||
void SDL_FormatChanged(SDL_Surface *surface)
|
||||
{
|
||||
surface->format_version++;
|
||||
static int format_version = 0;
|
||||
++format_version;
|
||||
if ( format_version < 0 ) { /* It wrapped... */
|
||||
format_version = 1;
|
||||
}
|
||||
surface->format_version = format_version;
|
||||
SDL_InvalidateMap(surface->map);
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue