new surface pixel format for main window: ST_PIXEL_XRGB565

This commit is contained in:
Vincent Wei
2021-05-19 11:14:05 +08:00
parent 4013dbf70a
commit 70535c6cb4
3 changed files with 11 additions and 1 deletions
+2 -1
View File
@@ -6916,13 +6916,14 @@ static inline BOOL MainWindowThreadCleanup (HWND hMainWnd)
#define ST_PIXEL_ARGB4444 0x0001
#define ST_PIXEL_ARGB1555 0x0002
#define ST_PIXEL_ARGB8888 0x0003
#define ST_PIXEL_XRGB565 0x0004
/* other flags for future use */
/* for default surface flags */
#define ST_DEFAULT (ST_PIXEL_DEFAULT)
#define CT_SYSTEM_MASK 0X0000FF
#define CT_SYSTEM_MASK 0x0000FF
#define CT_OPAQUE 0x000000
#define CT_COLORKEY 0x000001
#define CT_ALPHACHANNEL 0x000002
+1
View File
@@ -631,6 +631,7 @@ GAL_Surface *GAL_CreateSharedRGBSurface (GAL_VideoDevice* video,
#define ST_PIXEL_ARGB4444 0x0001
#define ST_PIXEL_ARGB1555 0x0002
#define ST_PIXEL_ARGB8888 0x0003
#define ST_PIXEL_XRGB565 0x0004
#endif /* not define ST_PIXEL_MASK */
/* Allocate a shared RGB surface from the current video device. */
+8
View File
@@ -558,6 +558,14 @@ GAL_Surface *GAL_CreateSurfaceForZNode (unsigned surf_flag, int width, int heigh
Bmask = 0x000000FF;
break;
case ST_PIXEL_XRGB565:
bpp = 16;
Amask = 0x0000;
Rmask = 0xF800;
Gmask = 0x07E0;
Bmask = 0x001F;
break;
default:
bpp = __gal_screen->format->BitsPerPixel;
Amask = __gal_screen->format->Amask;