Fix PeekZ when not using native resolution

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3643 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
sl1nk3.s
2009-07-02 01:49:28 +00:00
parent b69d218a82
commit ae2a5b8587
3 changed files with 14 additions and 6 deletions

View File

@ -714,6 +714,7 @@ void Renderer::Swap(u32 xfbAddr, u32 srcWidth, u32 srcHeight, s32 yOffset)
float u_max;
float v_min;
float v_max;
if (g_Config.bAutoScale)
{
u_max = (xfbSource->sourceRc.right - xfbSource->sourceRc.left);
@ -725,6 +726,7 @@ void Renderer::Swap(u32 xfbAddr, u32 srcWidth, u32 srcHeight, s32 yOffset)
u_max = (float)xfbSource->texWidth;
v_max = (float)xfbSource->texHeight;
}
v_min -= yOffset;
v_max -= yOffset;
@ -909,6 +911,7 @@ void Renderer::Swap(u32 xfbAddr, u32 srcWidth, u32 srcHeight, s32 yOffset)
// Place messages on the picture, then copy it to the screen
SwapBuffers();
// Why save this as s_bNativeResolution if we updated it every frame?
s_bNativeResolution = g_Config.bNativeResolution;
@ -921,7 +924,6 @@ void Renderer::Swap(u32 xfbAddr, u32 srcWidth, u32 srcHeight, s32 yOffset)
// Renderer::SetZBufferRender();
// SaveTexture("tex.tga", GL_TEXTURE_RECTANGLE_ARB, s_FakeZTarget, GetTargetWidth(), GetTargetHeight());
}
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////