X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flibgame%2Fx11.c;h=f03e961cd8c461e1d1abf5368ee5139ca24a9909;hb=08cbfb7b24ed1170a91e5e9d6d683d6162f120f9;hp=2a21abcc89af91b55eb78c2c134cb0d1042bb5d6;hpb=1c636a51bb573815d24a27dcc20b3283d89d1b8b;p=rocksndiamonds.git diff --git a/src/libgame/x11.c b/src/libgame/x11.c index 2a21abcc..f03e961c 100644 --- a/src/libgame/x11.c +++ b/src/libgame/x11.c @@ -106,8 +106,8 @@ static DrawWindow *X11InitWindow() #endif int screen_width, screen_height; int win_xpos, win_ypos; - unsigned long pen_fg = WhitePixel(display,screen); - unsigned long pen_bg = BlackPixel(display,screen); + unsigned long pen_fg = WhitePixel(display, screen); + unsigned long pen_bg = BlackPixel(display, screen); const int width = video.width, height = video.height; int i; @@ -425,12 +425,14 @@ inline Pixel X11GetPixelFromRGB(unsigned int color_r, unsigned int color_g, inline void X11DestroyImage(XImage *ximage) { +#if defined(TARGET_X11_NATIVE) /* this seems to be needed for OS/2, but does not hurt on other platforms */ if (ximage->data != NULL) { free(ximage->data); ximage->data = NULL; } +#endif /* TARGET_X11_NATIVE */ XDestroyImage(ximage); }