From 0532deb9a69b8490a5d97ae8f8a7be4c3b3b11cb Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Sun, 13 Sep 2015 16:03:16 -0400 Subject: [PATCH] Fix a couple SDL_pixels macros --- src/SDL2.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/SDL2.cs b/src/SDL2.cs index 63433e8..56fa31a 100644 --- a/src/SDL2.cs +++ b/src/SDL2.cs @@ -2186,9 +2186,14 @@ namespace SDL2 return (byte) ((X >> 20) & 0x0F); } + public static byte SDL_PIXELLAYOUT(uint X) + { + return (byte) ((X >> 16) & 0x0F); + } + public static byte SDL_BITSPERPIXEL(uint X) { - return (byte) ((X << 16) & 0x0F); + return (byte) ((X >> 8) & 0x0F); } public static byte SDL_BYTESPERPIXEL(uint X)