HiDPI detection improvement