mupen64plus-ui-python
mupen64plus-ui-python copied to clipboard
Set correct resolution for high DPI displays (with vidext).
Resolution is still screwy in general for me (e.g. video is slightly too high; window is resizable even though video plugin doesn't want it to be...), but that happens regardless of whether I have high DPI enabled, so it seems to be unrelated.
Not sure if this is the best way to do this.
With your patch I am getting this after resize http://imagizer.imageshack.com/img924/9485/GTh81b.png , the image is cut off, where it should be like this http://imagizer.imageshack.com/img924/4248/VVVoG2.png . Note that the resize will only work correctly with rice video plugin, other plugins don't have resizing implemented.
Oops, typo - I had real_height = int(width * ratio).
After fixing that, resizing is still rather broken on my system, but that happens with or without this patch. Sigh...
Looks ok now, but I am not sure what would this suppose to fix. Do you have some examples, what video card you are using, does it happens in all games etc. So far nobody reported such problems.
I didn't know about the http://doc.qt.io/qt-5/qwindow.html#devicePixelRatio but it was probably not available in Qt4 or I missed it somehow.
Thanks for the response.
Qt documentation for "High DPI Displays"
As far as I can tell from there, scaling is only enabled by default on macOS, although it can be manually enabled on other platforms. On all Macs with a Retina display, devicePixelRatio will be 2. Without this patch, the video only covers a quarter of the window (and the rest is red).