mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 14:05:39 +00:00
fix compile error with disabled SDL_HAVE_YUV (vita)
- UpdateTextureYUV is not defined if SDL_HAVE_YUV is not defined/zero + calling SDL_free suffice if the VITA_GXM_RenderData was just allocated
This commit is contained in:
parent
14db417e12
commit
ce1883e1e7
|
@ -217,7 +217,7 @@ VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||||
|
|
||||||
data = (VITA_GXM_RenderData *) SDL_calloc(1, sizeof(VITA_GXM_RenderData));
|
data = (VITA_GXM_RenderData *) SDL_calloc(1, sizeof(VITA_GXM_RenderData));
|
||||||
if (!data) {
|
if (!data) {
|
||||||
VITA_GXM_DestroyRenderer(renderer);
|
SDL_free(renderer);
|
||||||
SDL_OutOfMemory();
|
SDL_OutOfMemory();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,9 @@ VITA_GXM_CreateRenderer(SDL_Window *window, Uint32 flags)
|
||||||
renderer->SupportsBlendMode = VITA_GXM_SupportsBlendMode;
|
renderer->SupportsBlendMode = VITA_GXM_SupportsBlendMode;
|
||||||
renderer->CreateTexture = VITA_GXM_CreateTexture;
|
renderer->CreateTexture = VITA_GXM_CreateTexture;
|
||||||
renderer->UpdateTexture = VITA_GXM_UpdateTexture;
|
renderer->UpdateTexture = VITA_GXM_UpdateTexture;
|
||||||
|
#if SDL_HAVE_YUV
|
||||||
renderer->UpdateTextureYUV = VITA_GXM_UpdateTextureYUV;
|
renderer->UpdateTextureYUV = VITA_GXM_UpdateTextureYUV;
|
||||||
|
#endif
|
||||||
renderer->LockTexture = VITA_GXM_LockTexture;
|
renderer->LockTexture = VITA_GXM_LockTexture;
|
||||||
renderer->UnlockTexture = VITA_GXM_UnlockTexture;
|
renderer->UnlockTexture = VITA_GXM_UnlockTexture;
|
||||||
renderer->SetTextureScaleMode = VITA_GXM_SetTextureScaleMode;
|
renderer->SetTextureScaleMode = VITA_GXM_SetTextureScaleMode;
|
||||||
|
|
Loading…
Reference in a new issue