X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/16a12a3d27d3d3e2557bcde15365245ef2675bb4..850ff4855026066770d80c376ee6fc864169509c:/src/xpm/create.c diff --git a/src/xpm/create.c b/src/xpm/create.c index 1b1e592182..29fa8a5089 100644 --- a/src/xpm/create.c +++ b/src/xpm/create.c @@ -1441,22 +1441,11 @@ MSWSetImagePixels(Display *dc, XImage *image, unsigned int width, unsigned int h unsigned int x, y; SelectObject(*dc, image->bitmap); - if (image->depth == 1) - { - for (y = 0; y < height; y++) { - for (x = 0; x < width; x++) { - SetPixel(*dc, x, y, (pixels[*(data++)] ? RGB(255,255,255) : 0)); /* data is [x+y*width] */ - } - } - } - else - { - for (y = 0; y < height; y++) { - for (x = 0; x < width; x++) { - SetPixel(*dc, x, y, pixels[*(data++)]); /* data is [x+y*width] */ - } - } - } + for (y = 0; y < height; y++) { + for (x = 0; x < width; x++) { + SetPixel(*dc, x, y, pixels[*(data++)]); /* data is [x+y*width] */ + } + } } #else void MSWSetImagePixels(Display *dc, XImage *image, unsigned int width, unsigned int height,