Skip to content

Commit 5ff5ecb

Browse files
authored
Simpler check
1 parent ccb5841 commit 5ff5ecb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/gc_gl.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ static void update_scissor()
194194
params = glparamstate.viewport;
195195
y = params[1];
196196
}
197-
GX_SetScissor(params[0], y, params[2] > 640 ? 640 : params[2], params[3]);
197+
GX_SetScissor(params[0], y, params[2], params[3]);
198198

199199
glparamstate.dirty.bits.dirty_scissor = 0;
200200
}
@@ -1015,11 +1015,13 @@ 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;
10211023
glparamstate.viewport[3] = height;
1022-
GX_SetViewport(x, y, width > 640 ? 640 : width, height, 0.0f, 1.0f);
1024+
GX_SetViewport(x, y, width, height, 0.0f, 1.0f);
10231025
if (glparamstate.scissor[2] < 0) {
10241026
glparamstate.scissor[2] = width;
10251027
glparamstate.scissor[3] = height;

0 commit comments

Comments
 (0)