the precision on fractional absolute mouse positions.
Changed CL_VM_InputEvent passing of relative mouse moves to no longer
scale by vid_conwidth, vid_conheight as this goes against the intention
in most cases (where mouse turning or similar is being achieved).
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12031
d7cf8633-e32d-0410-b094-
e92efae38249
::stable-branch::merge=
52e98268042cbf9d4460898e4fa8ebaa023977e2
static int oldwindowmouse[2];
if (oldwindowmouse[0] != in_windowmouse_x || oldwindowmouse[1] != in_windowmouse_y)
{
- CL_VM_InputEvent(3, in_windowmouse_x * vid_conwidth.integer / vid.width, in_windowmouse_y * vid_conheight.integer / vid.height);
+ CL_VM_InputEvent(3, in_windowmouse_x * vid_conwidth.value / vid.width, in_windowmouse_y * vid_conheight.value / vid.height);
oldwindowmouse[0] = in_windowmouse_x;
oldwindowmouse[1] = in_windowmouse_y;
}
else
{
if (in_mouse_x || in_mouse_y)
- CL_VM_InputEvent(2, in_mouse_x * vid_conwidth.integer / vid.width, in_mouse_y * vid_conheight.integer / vid.height);
+ CL_VM_InputEvent(2, in_mouse_x, in_mouse_y);
}
}
// 1 = keyup, key, character (EXT_CSQC)
// 2 = mousemove relative, x, y (EXT_CSQC)
// 3 = mousemove absolute, x, y (DP_CSQC)
-qboolean CL_VM_InputEvent (int eventtype, int x, int y)
+qboolean CL_VM_InputEvent (int eventtype, float x, float y)
{
prvm_prog_t *prog = CLVM_prog;
qboolean r;
void CL_VM_ShutDown(void);
void CL_VM_UpdateIntermissionState(int intermission);
void CL_VM_UpdateShowingScoresState(int showingscores);
-qboolean CL_VM_InputEvent(int eventtype, int x, int y);
+qboolean CL_VM_InputEvent(int eventtype, float x, float y);
qboolean CL_VM_ConsoleCommand(const char *cmd);
void CL_VM_UpdateDmgGlobals(int dmg_take, int dmg_save, vec3_t dmg_origin);
void CL_VM_UpdateIntermissionState(int intermission);