speed depends on sample rate, fixes mouse speed in windows 1.01

This commit is contained in:
copy 2014-12-13 00:13:18 +01:00
parent 91b745a372
commit 2e4c5ffe4b

View file

@ -137,9 +137,11 @@ PS2.prototype.mouse_send_delta = function(delta_x, delta_y)
}
// note: delta_x or delta_y can be floating point numbers
var factor = this.resolution * this.sample_rate / 80;
this.mouse_delta_x += delta_x * this.resolution;
this.mouse_delta_y += delta_y * this.resolution;
this.mouse_delta_x += delta_x * factor;
this.mouse_delta_y += delta_y * factor;
if(this.enable_mouse_stream)
{