diff options
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/Src/GlobalControl.cpp | 11 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/GlobalControl.h | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/VertexShaderManager.cpp | 3 |
3 files changed, 15 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/Src/GlobalControl.cpp b/Source/Core/VideoCommon/Src/GlobalControl.cpp index 53f29bc932..00cd8710a0 100644 --- a/Source/Core/VideoCommon/Src/GlobalControl.cpp +++ b/Source/Core/VideoCommon/Src/GlobalControl.cpp @@ -24,6 +24,7 @@ static bool g_ProjHack0; static ProjectionHack g_ProjHack1;
static ProjectionHack g_ProjHack2;
static bool g_FreeLook;
+static bool g_Widescreen;
} // Namespace
@@ -47,6 +48,11 @@ void Projection_SetFreeLook(bool enabled) g_FreeLook = enabled;
}
+void Projection_SetWidescreen(bool enabled)
+{
+ g_Widescreen = enabled;
+}
+
bool Projection_GetHack0()
{
return g_ProjHack0;
@@ -66,3 +72,8 @@ bool Projection_GetFreeLook() {
return g_FreeLook;
}
+
+bool Projection_GetWidescreen()
+{
+ return g_Widescreen;
+}
diff --git a/Source/Core/VideoCommon/Src/GlobalControl.h b/Source/Core/VideoCommon/Src/GlobalControl.h index ad48e6c50d..3c0fc72c00 100644 --- a/Source/Core/VideoCommon/Src/GlobalControl.h +++ b/Source/Core/VideoCommon/Src/GlobalControl.h @@ -44,8 +44,10 @@ void Projection_SetHack0(bool value); void Projection_SetHack1(ProjectionHack value);
void Projection_SetHack2(ProjectionHack value);
void Projection_SetFreeLook(bool enabled);
+void Projection_SetWidescreen(bool enabled);
bool Projection_GetHack0();
ProjectionHack Projection_GetHack1();
ProjectionHack Projection_GetHack2();
bool Projection_GetFreeLook();
+bool Projection_GetWidescreen();
\ No newline at end of file diff --git a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp index a742ec0a84..eaf46a3a37 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp @@ -226,8 +226,9 @@ void VertexShaderManager::SetConstants() if (xfregs.rawProjection[6] == 0) { + bool bWidescreenHack = Projection_GetWidescreen(); // Perspective - g_fProjectionMatrix[0] = xfregs.rawProjection[0]; + g_fProjectionMatrix[0] = (bWidescreenHack ? xfregs.rawProjection[0]*0.75f : xfregs.rawProjection[0]); g_fProjectionMatrix[1] = 0.0f; g_fProjectionMatrix[2] = xfregs.rawProjection[1]; g_fProjectionMatrix[3] = 0.0f; |
