From 81278f01861671daf2db0a69668aa61c4f387a56 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Sat, 9 Oct 2021 23:37:14 +0200 Subject: [PATCH] Changed to default masks to fix color bug --- src/Image.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/Image.cpp b/src/Image.cpp index afe30a6..57852ca 100644 --- a/src/Image.cpp +++ b/src/Image.cpp @@ -13,19 +13,7 @@ using namespace sc::gui; Image::Image(int w, int h) { - Uint32 rmask, gmask, bmask, amask; -#if SDL_BYTEORDER == SDL_BIG_ENDIAN - rmask = 0xff000000; - gmask = 0x00ff0000; - bmask = 0x0000ff00; - amask = 0x000000ff; -#else - rmask = 0x000000ff; - gmask = 0x0000ff00; - bmask = 0x00ff0000; - amask = 0xff000000; -#endif - SDL_Surface* s {SDL_CreateRGBSurface(0, w, h, 32, rmask, gmask, bmask, amask)}; + SDL_Surface* s {SDL_CreateRGBSurface(0, w, h, 32, 0, 0, 0, 0)}; _s.reset(s); }