X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fsystem.c;h=c600152f46636180f9964c4fa0f9798f6ff7ee79;hb=b96c3dc500494652748c24f0aa48a8201ea202dd;hp=d0c948a64dd360e59e43c94351715e845144e8d7;hpb=7d958613de0b14e460ebca1a651b73cfadf9213c;p=rocksndiamonds.git diff --git a/src/system.c b/src/system.c index d0c948a6..c600152f 100644 --- a/src/system.c +++ b/src/system.c @@ -69,6 +69,15 @@ inline Bitmap CreateBitmap(int width, int height, int depth) #endif } +inline void FreeBitmap(Bitmap bitmap) +{ +#ifdef USE_SDL_LIBRARY + SDL_FreeSurface(bitmap); +#else + XFreePixmap(display, bitmap); +#endif +} + inline void ClearRectangle(Bitmap bitmap, int x, int y, int width, int height) { #ifdef USE_SDL_LIBRARY @@ -241,7 +250,7 @@ inline Key GetEventKey(KeyEvent *event, boolean with_modifiers) inline boolean SetVideoMode(void) { #ifdef USE_SDL_LIBRARY - return SDLSetVideoMode(&backbuffer, &window); + return SDLSetVideoMode(&backbuffer); #else boolean success = TRUE;