Skip to content

Commit cead8c5

Browse files
authored
Fix mouse
1 parent 3ed8cf9 commit cead8c5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/video/ogc/SDL_ogcmouse.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,11 @@ void OGC_draw_cursor(_THIS)
199199
SDL_ScaleModeNearest);
200200

201201
guMtxIdentity(mv);
202+
if(screen_w == 854)
203+
guMtxScaleApply(mv, mv, screen_w / 854.0f, screen_h / 480.0f, 1.0f);
204+
else
202205
guMtxScaleApply(mv, mv, screen_w / 640.0f, screen_h / 480.0f, 1.0f);
206+
203207
if (angle != 0.0f) {
204208
Mtx rot;
205209
guMtxRotDeg(rot, 'z', angle);
@@ -208,7 +212,7 @@ void OGC_draw_cursor(_THIS)
208212
guMtxTransApply(mv, mv, mouse->x, mouse->y, 0);
209213
GX_LoadPosMtxImm(mv, GX_PNMTX1);
210214

211-
OGC_set_viewport(0, 0, screen_w, screen_h);
215+
OGC_set_viewport(0, 0, screen_w, screen_h, screen_w);
212216

213217
GX_ClearVtxDesc();
214218
GX_SetVtxDesc(GX_VA_POS, GX_DIRECT);

0 commit comments

Comments
 (0)