mirror of https://github.com/snes9xgit/snes9x.git
d3d: only lock a small region in case the driver tries to readback.
This commit is contained in:
parent
bd9db57262
commit
f51734d68c
|
@ -734,10 +734,11 @@ void CDirect3D::Render(SSurface Src)
|
||||||
if (GUI.ReduceInputLag)
|
if (GUI.ReduceInputLag)
|
||||||
{
|
{
|
||||||
IDirect3DSurface9 *surface;
|
IDirect3DSurface9 *surface;
|
||||||
|
RECT r = { 0, 0, 2, 2 };
|
||||||
|
|
||||||
if (pDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &surface) == D3D_OK)
|
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();
|
surface->UnlockRect();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue