diff --git a/Source/Core/VideoCommon/Src/XFStructs.cpp b/Source/Core/VideoCommon/Src/XFStructs.cpp index 5fd25d31d1..0ccc09c398 100644 --- a/Source/Core/VideoCommon/Src/XFStructs.cpp +++ b/Source/Core/VideoCommon/Src/XFStructs.cpp @@ -175,8 +175,8 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData) // Killer 7 writes 16777216.0f here case XFMEM_SETZSCALE: VertexManager::Flush(); - VertexShaderManager::SetZScale((float)data); - PixelShaderManager::SetZScale((float)data); + VertexShaderManager::SetZScale(*(float*)&data); + PixelShaderManager::SetZScale(*(float*)&data); INFO_LOG(VIDEO, "Set ZScale : %x=%x\n", address, data); break; @@ -184,8 +184,8 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData) // Killer 7 alterns this between 16777216.0f and 16710107.0f case XFMEM_SETZOFFSET: VertexManager::Flush(); - VertexShaderManager::SetZOffset((float)data); - PixelShaderManager::SetZOffset((float)data); + VertexShaderManager::SetZOffset(*(float*)&data); + PixelShaderManager::SetZOffset(*(float*)&data); INFO_LOG(VIDEO, "Set ZOffset : %x=%x\n", address, data); break;