Open hrydgard opened 6 months ago
Had a quick mess around with this, this one-liner is a cheap fix that (in conjunction with removing any temp code in SDLMain.cpp to force the DPI scale to 1.0 on Mac Vulkan) sets the Metal DPI scale factors correctly in SDLCocoaMetalLayer.mm:
[[view layer] setContentsScale:[window backingScaleFactor]];
after setting the view layer on line 19.
Only issue is this doesn't update accordingly when, e.g. you move PPSSPP to a low-DPI external display or vice versa, or when you change macOS resolution between a high and low DPI mode for testing. Can't imagine a better solution for that than continuously polling for whether the backing scale factor has changed or not, and correcting the content scale accordingly.
Hm, ok. Thanks for the one-liner! I think I'll mess around with an external display later and see if I can find a way to get notifications for the change, or something.. don't know how it's supposed to work on macOS...
It seems I get a higher DPI when running with GL than with Vulkan on my Mac - on Vulkan, we seem to be upscaling from a non-native resolution.