From 77d0f043e5fc87c91906ee54c265dd3d876a2d62 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Fri, 16 Oct 2020 23:50:00 +0300 Subject: [PATCH] os2video.c: add missing FOURCC_R666 define, enable FOURCC_R666 case in _getSDLPixelFormatData(). --- src/video/os2/SDL_os2video.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/video/os2/SDL_os2video.c b/src/video/os2/SDL_os2video.c index c73046ef2..8f4737fe3 100644 --- a/src/video/os2/SDL_os2video.c +++ b/src/video/os2/SDL_os2video.c @@ -18,6 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ + #include "../../SDL_internal.h" #if SDL_VIDEO_DRIVER_OS2 @@ -30,9 +31,14 @@ #include "SDL_os2video.h" #include "SDL_syswm.h" #include "SDL_os2util.h" + +#define __MEERROR_H__ #define _MEERROR_H_ #include #include +#ifndef FOURCC_R666 +#define FOURCC_R666 mmioFOURCC('R','6','6','6') +#endif #define WIN_CLIENT_CLASS "SDL2" #define OS2DRIVER_NAME_DIVE "DIVE" @@ -104,13 +110,13 @@ static BOOL _getSDLPixelFormatData(SDL_PixelFormat *pSDLPixelFormat, ulRmask = 0xFC00; ulGmask = 0x03F0; ulBmask = 0x000F; ulRloss = 2; ulGloss = 4; ulBloss = 3; break; - /* + case FOURCC_R666: ulRshift = 12; ulGshift = 6; ulBshift = 0; ulRmask = 0x03F000; ulGmask = 0x000FC0; ulBmask = 0x00003F; ulRloss = 2; ulGloss = 2; ulBloss = 2; break; - */ + case FOURCC_RGB3: case FOURCC_RGB4: ulRshift = 0; ulGshift = 8; ulBshift = 16;