Skip to content

Commit 34d32ea

Browse files
committed
Prevent Widescreen from Breaking Applications
1 parent 04bdc3c commit 34d32ea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/gc_gl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,8 @@ void glEnd()
10151015

10161016
void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
10171017
{
1018+
// Since thw max the framebuffer
1019+
if (width > 640) width = 640;
10181020
glparamstate.viewport[0] = x;
10191021
glparamstate.viewport[1] = y;
10201022
glparamstate.viewport[2] = width;
@@ -1031,6 +1033,7 @@ void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
10311033

10321034
void glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
10331035
{
1036+
if (width > 640) width = 640;
10341037
glparamstate.scissor[0] = x;
10351038
glparamstate.scissor[1] = y;
10361039
glparamstate.scissor[2] = width;

0 commit comments

Comments
 (0)