mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
UI: Fix D3D9 half-pixel offset at 1x.
Since we scale by 0.5x for small window, we need to adjust the half pixel offset to match real pixels.
This commit is contained in:
parent
aa0cc6712f
commit
84f5f633df
@ -814,7 +814,8 @@ void NativeRender(GraphicsContext *graphicsContext) {
|
||||
case GPUBackend::DIRECT3D9:
|
||||
ortho.setOrthoD3D(0.0f, xres, yres, 0.0f, -1.0f, 1.0f);
|
||||
Matrix4x4 translation;
|
||||
translation.setTranslation(Vec3(-0.5f, -0.5f, 0.0f));
|
||||
// Account for the small window adjustment.
|
||||
translation.setTranslation(Vec3(-0.5f * g_dpi_scale_x / g_dpi_scale_real_x, -0.5f * g_dpi_scale_y / g_dpi_scale_real_y, 0.0f));
|
||||
ortho = translation * ortho;
|
||||
break;
|
||||
case GPUBackend::DIRECT3D11:
|
||||
|
Loading…
Reference in New Issue
Block a user