Implement YuvEnable flag
This commit is contained in:
parent
d3506b8a45
commit
ad8a181a19
|
@ -5965,10 +5965,6 @@ ULONG WINAPI XTL::EMUPATCH(D3DResource_Release)
|
||||||
g_pCachedDepthStencil = nullptr;
|
g_pCachedDepthStencil = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pThis == g_pCachedYuvSurface) {
|
|
||||||
g_pCachedYuvSurface = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Also release the host copy (if it exists!)
|
// Also release the host copy (if it exists!)
|
||||||
FreeHostResource(key);
|
FreeHostResource(key);
|
||||||
}
|
}
|
||||||
|
@ -6619,6 +6615,7 @@ VOID WINAPI XTL::EMUPATCH(D3DDevice_EnableOverlay)
|
||||||
//FUNC_EXPORTS
|
//FUNC_EXPORTS
|
||||||
|
|
||||||
LOG_FUNC_ONE_ARG(Enable);
|
LOG_FUNC_ONE_ARG(Enable);
|
||||||
|
g_fYuvEnabled = Enable;
|
||||||
|
|
||||||
// We can safely ignore this, as long as we properly handle UpdateOverlay
|
// We can safely ignore this, as long as we properly handle UpdateOverlay
|
||||||
}
|
}
|
||||||
|
@ -6645,6 +6642,10 @@ VOID WINAPI XTL::EMUPATCH(D3DDevice_UpdateOverlay)
|
||||||
LOG_FUNC_ARG(ColorKey)
|
LOG_FUNC_ARG(ColorKey)
|
||||||
LOG_FUNC_END;
|
LOG_FUNC_END;
|
||||||
|
|
||||||
|
if (!g_fYuvEnabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (pSurface == NULL) {
|
if (pSurface == NULL) {
|
||||||
EmuWarning("pSurface == NULL!");
|
EmuWarning("pSurface == NULL!");
|
||||||
} else {
|
} else {
|
||||||
|
@ -7540,11 +7541,6 @@ VOID WINAPI XTL::EMUPATCH(D3DDevice_SetRenderState_YuvEnable)
|
||||||
|
|
||||||
EMUPATCH(D3DDevice_EnableOverlay)(g_fYuvEnabled);
|
EMUPATCH(D3DDevice_EnableOverlay)(g_fYuvEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g_fYuvEnabled)
|
|
||||||
{
|
|
||||||
EMUPATCH(D3DDevice_UpdateOverlay)(g_pCachedYuvSurface, NULL, NULL, FALSE, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
|
Loading…
Reference in New Issue