X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=a88b78cfdb89630d70a96bd83106fa82ea2250e7;hp=fe32a073010a33f7bd92289b9f85d6bcff8c77d4;hb=1465ca1ffdf2104d25b9a46ca9bf8a3f175403fd;hpb=621b6a2c4781c9c3e2f5849f9c184a906e0ce5b6 diff --git a/src/libgame/system.c b/src/libgame/system.c index fe32a073..a88b78cf 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -162,14 +162,14 @@ inline Bitmap CreateBitmap(int width, int height, int depth) if (!(pixmap = XCreatePixmap(display, window->drawable, width, height, real_depth))) Error(ERR_EXIT, "cannot create pixmap"); - new_bitmap->drawable = pixmap; -#endif if (window == NULL) Error(ERR_EXIT, "Window GC needed for Bitmap -- create Window first"); new_bitmap->gc = window->gc; +#endif + return new_bitmap; } @@ -283,7 +283,7 @@ inline void DrawSimpleWhiteLine(Bitmap bitmap, int from_x, int from_y, int to_x, int to_y) { #ifdef TARGET_SDL - SDLDrawSimpleLine(bitmap->drawable, from_x, from_y, to_x, to_y, 0xffffff); + SDLDrawSimpleLine(bitmap->surface, from_x, from_y, to_x, to_y, 0xffffff); #else XSetForeground(display, bitmap->gc, WhitePixel(display, screen)); XDrawLine(display, bitmap->drawable, bitmap->gc, from_x, from_y, to_x, to_y);