port: fix mouse X speed using wrong aspect in split screen

This commit is contained in:
fgsfds committed 2024-12-20 13:38:19 +01:00
1 parent 0701f43d6b
commit 23d5a5771a
1 file changed
+1 -1
+1 -1
View File
@@ -2206,7 +2206,7 @@ void bmoveProcessInput(bool allowc1x, bool allowc1y, bool allowc1buttons, bool i
// joystick is inactive, move crosshair using the mouse // joystick is inactive, move crosshair using the mouse
const f32 xcoeff = 320.f / 1080.f; const f32 xcoeff = 320.f / 1080.f;
const f32 ycoeff = 240.f / 1080.f; const f32 ycoeff = 240.f / 1080.f;
const f32 xscale = (PLAYER_EXTCFG().mouseaimspeedx * xcoeff) / videoGetAspect(); const f32 xscale = (PLAYER_EXTCFG().mouseaimspeedx * xcoeff) / g_Vars.currentplayer->aspect;
const f32 yscale = PLAYER_EXTCFG().mouseaimspeedy * ycoeff; const f32 yscale = PLAYER_EXTCFG().mouseaimspeedy * ycoeff;
f32 x = g_Vars.currentplayer->swivelpos[0] + movedata.freelookdx * xscale; f32 x = g_Vars.currentplayer->swivelpos[0] + movedata.freelookdx * xscale;
f32 y = g_Vars.currentplayer->swivelpos[1] + movedata.freelookdy * yscale; f32 y = g_Vars.currentplayer->swivelpos[1] + movedata.freelookdy * yscale;