mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
(RGUI) Try again - D3D10/11/12 actually seem to use bgra4444
This commit is contained in:
parent
d8d4fefb48
commit
0ce40be87e
@ -913,13 +913,13 @@ static uint16_t argb32_to_abgr4444(uint32_t col)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* D3D10/11/12 */
|
/* D3D10/11/12 */
|
||||||
static uint16_t argb32_to_argb4444(uint32_t col)
|
static uint16_t argb32_to_bgra4444(uint32_t col)
|
||||||
{
|
{
|
||||||
unsigned a = ((col >> 24) & 0xff) >> 4;
|
unsigned a = ((col >> 24) & 0xff) >> 4;
|
||||||
unsigned r = ((col >> 16) & 0xff) >> 4;
|
unsigned r = ((col >> 16) & 0xff) >> 4;
|
||||||
unsigned g = ((col >> 8) & 0xff) >> 4;
|
unsigned g = ((col >> 8) & 0xff) >> 4;
|
||||||
unsigned b = ((col & 0xff) ) >> 4;
|
unsigned b = ((col & 0xff) ) >> 4;
|
||||||
return (a << 12) | (r << 8) | (g << 4) | b;
|
return (b << 12) | (g << 8) | (r << 4) | a;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* All other platforms */
|
/* All other platforms */
|
||||||
@ -954,7 +954,7 @@ static void rgui_set_pixel_format_function(void)
|
|||||||
else if (string_is_equal(driver_ident, "d3d10") || /* D3D10/11/12 */
|
else if (string_is_equal(driver_ident, "d3d10") || /* D3D10/11/12 */
|
||||||
string_is_equal(driver_ident, "d3d11") ||
|
string_is_equal(driver_ident, "d3d11") ||
|
||||||
string_is_equal(driver_ident, "d3d12"))
|
string_is_equal(driver_ident, "d3d12"))
|
||||||
argb32_to_pixel_platform_format = argb32_to_argb4444;
|
argb32_to_pixel_platform_format = argb32_to_bgra4444;
|
||||||
else
|
else
|
||||||
argb32_to_pixel_platform_format = argb32_to_rgba4444;
|
argb32_to_pixel_platform_format = argb32_to_rgba4444;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user