Handle video aspect ratio correction in a more general way.
This improves mouse motion resolution.