mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-26 12:27:58 +08:00
new surface pixel format for main window: ST_PIXEL_XRGB565
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user