mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-30 10:12:12 +00:00
SDL_GetPixelFormatEnumForMasks() returns SDL_PixelFormatEnum
This commit is contained in:
@@ -337,7 +337,7 @@ SDL_DYNAPI_PROC(void,SDL_GetOriginalMemoryFunctions,(SDL_malloc_func *a, SDL_cal
|
||||
SDL_DYNAPI_PROC(char*,SDL_GetUserFolder,(SDL_Folder a),(a),return)
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_GetPerformanceCounter,(void),(),return)
|
||||
SDL_DYNAPI_PROC(Uint64,SDL_GetPerformanceFrequency,(void),(),return)
|
||||
SDL_DYNAPI_PROC(Uint32,SDL_GetPixelFormatEnumForMasks,(int a, Uint32 b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(SDL_PixelFormatEnum,SDL_GetPixelFormatEnumForMasks,(int a, Uint32 b, Uint32 c, Uint32 d, Uint32 e),(a,b,c,d,e),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetPixelFormatName,(SDL_PixelFormatEnum a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetPlatform,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_PowerState,SDL_GetPowerInfo,(int *a, int *b),(a,b),return)
|
||||
|
||||
@@ -486,7 +486,7 @@ static int SW_RenderCopyEx(SDL_Renderer *renderer, SDL_Surface *surface, SDL_Tex
|
||||
* to be created. This makes all source pixels opaque and the colors get copied correctly.
|
||||
*/
|
||||
SDL_Surface *src_rotated_rgb;
|
||||
int f = SDL_GetPixelFormatEnumForMasks(src_rotated->format->bits_per_pixel,
|
||||
SDL_PixelFormatEnum f = SDL_GetPixelFormatEnumForMasks(src_rotated->format->bits_per_pixel,
|
||||
src_rotated->format->Rmask,
|
||||
src_rotated->format->Gmask,
|
||||
src_rotated->format->Bmask,
|
||||
|
||||
@@ -427,7 +427,7 @@ SDL_Surface *SDL_LoadBMP_RW(SDL_RWops *src, SDL_bool freesrc)
|
||||
|
||||
/* Create a compatible surface, note that the colors are RGB ordered */
|
||||
{
|
||||
Uint32 format;
|
||||
SDL_PixelFormatEnum format;
|
||||
|
||||
/* Get the pixel format */
|
||||
format = SDL_GetPixelFormatEnumForMasks(biBitCount, Rmask, Gmask, Bmask, Amask);
|
||||
|
||||
@@ -333,7 +333,7 @@ SDL_bool SDL_GetMasksForPixelFormatEnum(SDL_PixelFormatEnum format, int *bpp, Ui
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
Uint32 SDL_GetPixelFormatEnumForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
|
||||
SDL_PixelFormatEnum SDL_GetPixelFormatEnumForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
|
||||
{
|
||||
switch (bpp) {
|
||||
case 1:
|
||||
|
||||
Reference in New Issue
Block a user