d3d: only lock a small region in case the driver tries to readback.

This commit is contained in:
Brandon Wright 2018-05-06 11:05:09 -05:00
parent bd9db57262
commit f51734d68c
1 changed files with 2 additions and 1 deletions

View File

@ -734,10 +734,11 @@ void CDirect3D::Render(SSurface Src)
if (GUI.ReduceInputLag)
{
IDirect3DSurface9 *surface;
RECT r = { 0, 0, 2, 2 };
if (pDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &surface) == D3D_OK)
{
if (surface->LockRect(&lr, NULL, D3DLOCK_READONLY) == D3D_OK)
if (surface->LockRect(&lr, &r, D3DLOCK_READONLY) == D3D_OK)
{
surface->UnlockRect();
}