[Scummvm-git-logs] scummvm master -> 5585d77e5e4b9ec9fb90928ac384ecc2129c96ac
criezy
criezy at scummvm.org
Thu Apr 16 21:06:00 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5585d77e5e IOS7: Use screen scale to scale the overlay
Commit: 5585d77e5e4b9ec9fb90928ac384ecc2129c96ac
https://github.com/scummvm/scummvm/commit/5585d77e5e4b9ec9fb90928ac384ecc2129c96ac
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-04-16T22:05:35+01:00
Commit Message:
IOS7: Use screen scale to scale the overlay
This should result in a consistent overlay size whatever the pixel
density is for the device.
Changed paths:
backends/platform/ios7/ios7_video.mm
diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm
index 999f3d3678..0853bd9422 100644
--- a/backends/platform/ios7/ios7_video.mm
+++ b/backends/platform/ios7/ios7_video.mm
@@ -192,22 +192,9 @@ uint getSizeNextPOT(uint size) {
- (void)createOverlaySurface {
uint overlayWidth = (uint) MAX(_renderBufferWidth, _renderBufferHeight);
uint overlayHeight = (uint) MIN(_renderBufferWidth, _renderBufferHeight);
-
- if (iOS7_isBigDevice()) {
- // On really big displays, like the iPad Pro, we scale the interface down
- // so that the controls are not too small..
- while (overlayHeight > 1024) {
- overlayWidth /= 2;
- overlayHeight /= 2;
- }
- }
- else {
- // On small devices, we force the user interface to use the small theme
- while (overlayHeight > 480) {
- overlayWidth /= 2;
- overlayHeight /= 2;
- }
- }
+ float hdpi_scaler = [UIScreen mainScreen].scale;
+ overlayWidth = (uint)(overlayWidth / hdpi_scaler);
+ overlayHeight = (uint)(overlayHeight / hdpi_scaler);
_videoContext.overlayWidth = overlayWidth;
_videoContext.overlayHeight = overlayHeight;
More information about the Scummvm-git-logs
mailing list