Permalink
Browse files

Merge pull request #1499 from LukeUsher/ltcg-related-tweaks

Fix a crash within LTCG SetBorderColor, fix off-by-one error in mip-map level test
  • Loading branch information...
PatrickvL committed Oct 30, 2018
2 parents 123d6d9 + ed8c313 commit 73b6aea7da9ea804a654d3e63a9c00f72f44a18c
Showing with 8 additions and 4 deletions.
  1. +3 −1 src/CxbxKrnl/EmuX86.cpp
  2. +5 −3 src/core/HLE/D3D8/Direct3D9/Direct3D9.cpp
View
@@ -3145,7 +3145,9 @@ bool EmuX86_DecodeException(LPEXCEPTION_POINTERS e)
goto opcode_error;
case I_NEG:
if (EmuX86_Opcode_NEG(e, info)) break;
goto opcode_error;
goto opcode_error;
case I_NOP:
break;
case I_NOT:
if (EmuX86_Opcode_NOT(e, info)) break;
goto opcode_error;
@@ -4977,9 +4977,9 @@ void CreateHostResource(XTL::X_D3DResource *pResource, DWORD D3DUsage, int iText
// If the desired mip-map level was higher than the maximum possible, cap it
// Test case: Shin Megami Tensei: Nine
if (dwMipMapLevels > highestMipMapLevel) {
if (dwMipMapLevels > highestMipMapLevel + 1) {
LOG_TEST_CASE("Too many mip-map levels");
dwMipMapLevels = highestMipMapLevel;
dwMipMapLevels = highestMipMapLevel + 1;
}
}
@@ -5734,7 +5734,9 @@ VOID XTL::EMUPATCH(D3DDevice_SetTextureState_BorderColor_0)
}
return EMUPATCH(D3DDevice_SetTextureState_BorderColor)(Stage, Value);
HRESULT hRet;
hRet = g_pD3DDevice->SetSamplerState(Stage, D3DSAMP_BORDERCOLOR, Value);
//DEBUG_D3DRESULT(hRet, "g_pD3DDevice->SetTextureStageState");
}
// This uses a custom calling convention where parameter is passed in EAX

0 comments on commit 73b6aea

Please sign in to comment.