mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-23 07:45:38 +00:00
SDL_QueryTexture() fills in a pointer to SDL_PixelFormatEnum
This commit is contained in:
@@ -388,7 +388,7 @@ static int render_testBlit(void *arg)
|
||||
SDL_FRect rect;
|
||||
SDL_Texture *tface;
|
||||
SDL_Surface *referenceSurface = NULL;
|
||||
Uint32 tformat;
|
||||
SDL_PixelFormatEnum tformat;
|
||||
int taccess, tw, th;
|
||||
int i, j, ni, nj;
|
||||
int checkFailCount1;
|
||||
@@ -456,7 +456,7 @@ static int render_testBlitColor(void *arg)
|
||||
SDL_FRect rect;
|
||||
SDL_Texture *tface;
|
||||
SDL_Surface *referenceSurface = NULL;
|
||||
Uint32 tformat;
|
||||
SDL_PixelFormatEnum tformat;
|
||||
int taccess, tw, th;
|
||||
int i, j, ni, nj;
|
||||
int checkFailCount1;
|
||||
@@ -530,7 +530,7 @@ static int render_testBlitAlpha(void *arg)
|
||||
SDL_FRect rect;
|
||||
SDL_Texture *tface;
|
||||
SDL_Surface *referenceSurface = NULL;
|
||||
Uint32 tformat;
|
||||
SDL_PixelFormatEnum tformat;
|
||||
int taccess, tw, th;
|
||||
int i, j, ni, nj;
|
||||
int checkFailCount1;
|
||||
@@ -604,7 +604,7 @@ static void
|
||||
testBlitBlendMode(SDL_Texture *tface, int mode)
|
||||
{
|
||||
int ret;
|
||||
Uint32 tformat;
|
||||
SDL_PixelFormatEnum tformat;
|
||||
int taccess, tw, th;
|
||||
int i, j, ni, nj;
|
||||
SDL_FRect rect;
|
||||
@@ -659,7 +659,7 @@ static int render_testBlitBlend(void *arg)
|
||||
SDL_FRect rect;
|
||||
SDL_Texture *tface;
|
||||
SDL_Surface *referenceSurface = NULL;
|
||||
Uint32 tformat;
|
||||
SDL_PixelFormatEnum tformat;
|
||||
int taccess, tw, th;
|
||||
int i, j, ni, nj;
|
||||
int mode;
|
||||
|
||||
@@ -285,7 +285,7 @@ static void MoveSprite(void)
|
||||
}
|
||||
}
|
||||
|
||||
static Uint32 GetTextureFormat(enum AVPixelFormat format)
|
||||
static SDL_PixelFormatEnum GetTextureFormat(enum AVPixelFormat format)
|
||||
{
|
||||
switch (format) {
|
||||
case AV_PIX_FMT_RGB8:
|
||||
@@ -509,7 +509,7 @@ static SDL_Colorspace GetFrameColorspace(AVFrame *frame)
|
||||
return colorspace;
|
||||
}
|
||||
|
||||
static SDL_PropertiesID CreateVideoTextureProperties(AVFrame *frame, Uint32 format, int access)
|
||||
static SDL_PropertiesID CreateVideoTextureProperties(AVFrame *frame, SDL_PixelFormatEnum format, int access)
|
||||
{
|
||||
AVFrameSideData *pSideData;
|
||||
SDL_PropertiesID props;
|
||||
@@ -569,8 +569,8 @@ static void SDLCALL FreeSwsContextContainer(void *userdata, void *value)
|
||||
static SDL_bool GetTextureForMemoryFrame(AVFrame *frame, SDL_Texture **texture)
|
||||
{
|
||||
int texture_width = 0, texture_height = 0;
|
||||
Uint32 texture_format = SDL_PIXELFORMAT_UNKNOWN;
|
||||
Uint32 frame_format = GetTextureFormat(frame->format);
|
||||
SDL_PixelFormatEnum texture_format = SDL_PIXELFORMAT_UNKNOWN;
|
||||
SDL_PixelFormatEnum frame_format = GetTextureFormat(frame->format);
|
||||
|
||||
if (*texture) {
|
||||
SDL_QueryTexture(*texture, &texture_format, NULL, &texture_width, &texture_height);
|
||||
|
||||
Reference in New Issue
Block a user