Added support for HiDPI displays by scaling mouse coordinate values.