Changes
/* Get mouse position on screen */
// get the relative mouse displacement since last call
deltaX = rawX - oldX;
deltaY = rawY - oldY - rawY; // Kempston mouse Y-axis is inverted compared to screen coordinates!
// store raw mouse values
oldX = rawX;
// calculate new unclipped virtual position
virtualX = virtualX + deltaX;
virtualY = virtualY + - deltaY;// Kempston mouse Y-axis is inverted compared to screen coordinates!
// perform clipping
if (virtualX < 0) then virtualX = 0;