mupen64plus-ui-python icon indicating copy to clipboard operation
mupen64plus-ui-python copied to clipboard

Set correct resolution for high DPI displays (with vidext).

Open comex opened this issue 8 years ago • 5 comments

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.

comex avatar May 29 '17 02:05 comex

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.

gen2brain avatar May 29 '17 11:05 gen2brain

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...

screen shot 2017-05-29 at 5 57 54 pm

comex avatar May 29 '17 21:05 comex

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.

gen2brain avatar May 29 '17 22:05 gen2brain

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.

gen2brain avatar May 29 '17 22:05 gen2brain

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).

comex avatar May 29 '17 23:05 comex