mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(D3D11/D3D12) Fix crashes with completely black or white thumbnail
textures in XMB
This commit is contained in:
parent
be5e0dfb1f
commit
008900e73d
@ -137,6 +137,9 @@ void d3d11_update_texture(
|
||||
D3D11_MAPPED_SUBRESOURCE mapped_texture;
|
||||
D3D11_BOX frame_box = { 0, 0, 0, width, height, 1 };
|
||||
|
||||
if (!texture || !texture->staging)
|
||||
return;
|
||||
|
||||
D3D11MapTexture2D(ctx, texture->staging, 0, D3D11_MAP_WRITE, 0, &mapped_texture);
|
||||
|
||||
dxgi_copy(
|
||||
|
@ -733,6 +733,9 @@ void d3d12_update_texture(
|
||||
uint8_t* dst;
|
||||
D3D12_RANGE read_range = { 0, 0 };
|
||||
|
||||
if (!texture || !texture->upload_buffer)
|
||||
return;
|
||||
|
||||
D3D12Map(texture->upload_buffer, 0, &read_range, (void**)&dst);
|
||||
|
||||
dxgi_copy(
|
||||
|
Loading…
x
Reference in New Issue
Block a user