[Libretro] Change VMUs scaling for GL/D3D11
This commit is contained in:
parent
b9601d26e3
commit
665ef86cf0
|
@ -28,14 +28,17 @@ void DX11Overlay::draw(u32 width, u32 height, bool vmu, bool crosshair)
|
|||
deviceContext->RSSetScissorRects(1, &rect);
|
||||
if (vmu)
|
||||
{
|
||||
#ifndef LIBRETRO
|
||||
float vmu_padding = 8.f * settings.display.uiScale;
|
||||
float vmu_height = 70.f * settings.display.uiScale;
|
||||
float vmu_width = 48.f / 32.f * vmu_height;
|
||||
|
||||
#ifndef LIBRETRO
|
||||
const float blend_factor[4] = { 0.75f, 0.75f, 0.75f, 0.75f };
|
||||
deviceContext->OMSetBlendState(blendStates.getState(true, 8, 8), blend_factor, 0xffffffff);
|
||||
#else
|
||||
float vmu_padding = 8.f * config::RenderResolution / 480.f;
|
||||
float vmu_height = 32.f * config::RenderResolution / 480.f;
|
||||
float vmu_width = 48.f * config::RenderResolution / 480.f;
|
||||
deviceContext->OMSetBlendState(blendStates.getState(true, 4, 5), nullptr, 0xffffffff);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -828,11 +828,11 @@ static void updateVmuTexture(int vmu_screen_number)
|
|||
|
||||
void DrawVmuTexture(u8 vmu_screen_number, int width, int height)
|
||||
{
|
||||
constexpr float vmu_padding = 8.f;
|
||||
float vmu_padding = 8.f * config::RenderResolution / 480.f;
|
||||
float x = vmu_padding;
|
||||
float y = vmu_padding;
|
||||
float w = (float)VMU_SCREEN_WIDTH * vmu_screen_params[vmu_screen_number].vmu_screen_size_mult * 4.f / 3.f / gl.ofbo.aspectRatio;
|
||||
float h = (float)VMU_SCREEN_HEIGHT * vmu_screen_params[vmu_screen_number].vmu_screen_size_mult;
|
||||
float w = (float)VMU_SCREEN_WIDTH * vmu_screen_params[vmu_screen_number].vmu_screen_size_mult * 4.f / 3.f / gl.ofbo.aspectRatio * config::RenderResolution / 480.f;
|
||||
float h = (float)VMU_SCREEN_HEIGHT * vmu_screen_params[vmu_screen_number].vmu_screen_size_mult * config::RenderResolution / 480.f;
|
||||
|
||||
if (vmu_lcd_changed[vmu_screen_number * 2] || vmuTextureId[vmu_screen_number] == 0)
|
||||
updateVmuTexture(vmu_screen_number);
|
||||
|
|
Loading…
Reference in New Issue