Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
vor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added .gitignore, stopped tracking data/font.png.
[vor.git]
/
SFont.c
diff --git
a/SFont.c
b/SFont.c
index
a13e75d
..
9665d98
100644
(file)
--- a/
SFont.c
+++ b/
SFont.c
@@
-79,7
+79,7
@@
SFont_InitFont(SDL_Surface* Surface)
Font = (SFont_Font *) malloc(sizeof(SFont_Font));
Font->Surface = Surface;
Font = (SFont_Font *) malloc(sizeof(SFont_Font));
Font->Surface = Surface;
- SDL_LockSurface(Surface);
+ if(SDL_MUSTLOCK(Surface)) { SDL_LockSurface(Surface); }
pink = SDL_MapRGB(Surface->format, 255, 0, 255);
while (x < Surface->w) {
pink = SDL_MapRGB(Surface->format, 255, 0, 255);
while (x < Surface->w) {
@@
-94,7
+94,7
@@
SFont_InitFont(SDL_Surface* Surface)
Font->MaxPos = x-1;
pixel = GetPixel(Surface, 0, Surface->h-1);
Font->MaxPos = x-1;
pixel = GetPixel(Surface, 0, Surface->h-1);
- SDL_UnlockSurface(Surface);
+ if(SDL_MUSTLOCK(Surface)) { SDL_UnlockSurface(Surface); }
SDL_SetColorKey(Surface, SDL_SRCCOLORKEY, pixel);
return Font;
SDL_SetColorKey(Surface, SDL_SRCCOLORKEY, pixel);
return Font;