From f2a2d0c696bf7a752df3ef3c5f1d8a12d196c8a6 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 15 Feb 2021 22:56:20 +0300 Subject: [PATCH] SDL_render_d3d.c: fix build with SDL_LEAN_AND_MEAN --- src/render/direct3d/SDL_render_d3d.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c index b938bd26b..7cb41b9d8 100644 --- a/src/render/direct3d/SDL_render_d3d.c +++ b/src/render/direct3d/SDL_render_d3d.c @@ -610,6 +610,7 @@ D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, return 0; } +#if SDL_HAVE_YUV static int D3D_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * rect, @@ -636,6 +637,7 @@ D3D_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture, } return 0; } +#endif static int D3D_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, @@ -1710,7 +1712,9 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags) renderer->SupportsBlendMode = D3D_SupportsBlendMode; renderer->CreateTexture = D3D_CreateTexture; renderer->UpdateTexture = D3D_UpdateTexture; +#if SDL_HAVE_YUV renderer->UpdateTextureYUV = D3D_UpdateTextureYUV; +#endif renderer->LockTexture = D3D_LockTexture; renderer->UnlockTexture = D3D_UnlockTexture; renderer->SetTextureScaleMode = D3D_SetTextureScaleMode;