Permalink
Browse files

Update XbSymbolDatabase again + fix a crash when SetViewPort is calle…

…d with a null value
  • Loading branch information...
LukeUsher committed Oct 3, 2018
1 parent de87ffd commit cbb2bce17fc92b095f8793b028e51a40e90f991c
Showing with 9 additions and 3 deletions.
  1. +1 −1 import/XbSymbolDatabase
  2. +8 −2 src/core/HLE/D3D8/Direct3D9/Direct3D9.cpp
@@ -3220,12 +3220,18 @@ VOID WINAPI XTL::EMUPATCH(D3DDevice_SetViewport)
{
LOG_FUNC_ONE_ARG(pViewport);
D3DVIEWPORT HostViewPort = *pViewport;
// Always call the Xbox SetViewPort to update D3D Internal State
XB_trampoline(VOID, WINAPI, D3DDevice_SetViewport, (CONST X_D3DVIEWPORT8 *));
XB_D3DDevice_SetViewport(pViewport);
// Host does not support pViewPort = nullptr
if (pViewport == nullptr) {
LOG_TEST_CASE("pViewport = null");
return;
}
D3DVIEWPORT HostViewPort = *pViewport;
if (g_pXboxRenderTarget) {
// Get current Xbox render target dimensions
DWORD XboxRenderTarget_Width = GetPixelContainerWidth(g_pXboxRenderTarget);

0 comments on commit cbb2bce

Please sign in to comment.