render: D3D12 Xbox buildfixes

This commit is contained in:
Ethan Lee
2026-02-02 10:10:08 -05:00
parent 5072b3d252
commit 5640647e14

View File

@@ -322,7 +322,7 @@ static SDL_PixelFormat D3D12_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat)
for (int i = 0; i < SDL_arraysize(dxgi_format_map); i++) {
if (dxgi_format_map[i].unorm == dxgiFormat ||
dxgi_format_map[i].srgb == dxgiFormat) {
return dxgi_format_map[i].sdl;
return (SDL_PixelFormat) dxgi_format_map[i].sdl;
}
}
return SDL_PIXELFORMAT_UNKNOWN;
@@ -3547,7 +3547,7 @@ bool D3D12_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_Proper
if ((unorm.Support1 & D3D12_FORMAT_SUPPORT1_TEXTURE2D) &&
(srgb.Support1 & D3D12_FORMAT_SUPPORT1_TEXTURE2D)) {
SDL_AddSupportedTextureFormat(renderer, dxgi_format_map[i].sdl);
SDL_AddSupportedTextureFormat(renderer, (SDL_PixelFormat) dxgi_format_map[i].sdl);
}
}
SDL_AddSupportedTextureFormat(renderer, SDL_PIXELFORMAT_INDEX8);