diff --git a/src/gu/pspgu.h b/src/gu/pspgu.h index 35b274c6f6..01f7ba8fd0 100644 --- a/src/gu/pspgu.h +++ b/src/gu/pspgu.h @@ -1460,7 +1460,7 @@ void sceGuScissor(int x, int y, int w, int h); * @param width - Width of viewport * @param height - Height of viewport **/ -void sceGuViewport(int cx, int cy, int width, int height); +void sceGuViewport(float cx, float cy, float width, float height); /** * Draw bezier surface diff --git a/src/gu/sceGuViewport.c b/src/gu/sceGuViewport.c index bb58292937..25f9d7a356 100644 --- a/src/gu/sceGuViewport.c +++ b/src/gu/sceGuViewport.c @@ -8,16 +8,14 @@ #include "guInternal.h" -void sceGuViewport(int cx, int cy, int width, int height) +void sceGuViewport(float cx, float cy, float width, float height) { - float sx, sy, tx, ty; - sx = (float)(width) * 0.5f; - sy = (float)(height) * -0.5f; - tx = (float)cx; - ty = (float)cy; + float sx, sy; + sx = width * 0.5f; + sy = height * -0.5f; sendCommandf(VIEWPORT_X_SCALE, sx); sendCommandf(VIEWPORT_Y_SCALE, sy); - sendCommandf(VIEWPORT_X_CENTER, tx); - sendCommandf(VIEWPORT_Y_CENTER, ty); + sendCommandf(VIEWPORT_X_CENTER, cx); + sendCommandf(VIEWPORT_Y_CENTER, cy); }