Tweaked the widescreen hack: It now "hacks" to and from any aspect ratio, not just from 4:3 to 16:9. When "Stretch to Window" is chosen, the aspect ratio will be adjusted to 5:4, 16:10, or anything (whatever the aspect ratio of the window is). Works for 4:3 and 16:9 games.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5280 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Jordan Woyak
2010-04-04 22:52:27 +00:00
parent 675fc84255
commit 758bcf17cb
3 changed files with 53 additions and 2 deletions

View File

@ -289,13 +289,13 @@ void VertexShaderManager::SetConstants()
{
// Perspective
g_fProjectionMatrix[0] = xfregs.rawProjection[0] * (g_ActiveConfig.bWidescreenHack ? 0.75f : 1.0f);
g_fProjectionMatrix[0] = xfregs.rawProjection[0] * g_ActiveConfig.fAspectRatioHackW;
g_fProjectionMatrix[1] = 0.0f;
g_fProjectionMatrix[2] = xfregs.rawProjection[1];
g_fProjectionMatrix[3] = 0.0f;
g_fProjectionMatrix[4] = 0.0f;
g_fProjectionMatrix[5] = xfregs.rawProjection[2];
g_fProjectionMatrix[5] = xfregs.rawProjection[2] * g_ActiveConfig.fAspectRatioHackH;
g_fProjectionMatrix[6] = xfregs.rawProjection[3];
g_fProjectionMatrix[7] = 0.0f;