diff options
author | dhewg | 2011-02-23 20:35:27 +0100 |
---|---|---|
committer | dhewg | 2011-02-24 23:18:33 +0100 |
commit | d8acbc0311fd126b0b3a2298082dadc98022f933 (patch) | |
tree | 6777da4d3618749beca357ad49f0165b29895e2a | |
parent | 867fa2696def58300cd376d03be6755007abbe43 (diff) | |
download | scummvm-rg350-d8acbc0311fd126b0b3a2298082dadc98022f933.tar.gz scummvm-rg350-d8acbc0311fd126b0b3a2298082dadc98022f933.tar.bz2 scummvm-rg350-d8acbc0311fd126b0b3a2298082dadc98022f933.zip |
ANDROID: Deuglify overlay gfx
Use the native surface resolution of the device if its not too big.
If it is, use a clean scale factor of 2 to prevent eyecancer.
-rw-r--r-- | backends/platform/android/gfx.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp index 838e5bc223..d4d96a239c 100644 --- a/backends/platform/android/gfx.cpp +++ b/backends/platform/android/gfx.cpp @@ -121,9 +121,22 @@ void OSystem_Android::initSize(uint width, uint height, _game_texture->allocBuffer(width, height); - // Cap at 320x200 or the ScummVM themes abort :/ - GLuint overlay_width = MIN(_egl_surface_width, 320); - GLuint overlay_height = MIN(_egl_surface_height, 200); + GLuint overlay_width = _egl_surface_width; + GLuint overlay_height = _egl_surface_height; + + // the 'normal' theme layout uses a max height of 400 pixels. if the + // surface is too big we use only a quarter of the size so that the widgets + // don't get too small. if the surface height has less than 800 pixels, this + // enforces the 'lowres' layout, which will be scaled back up by factor 2x, + // but this looks way better than the 'normal' layout scaled by some + // calculated factors + if (overlay_height > 480) { + overlay_width /= 2; + overlay_height /= 2; + } + + LOGI("overlay size is %ux%u", overlay_width, overlay_height); + _overlay_texture->allocBuffer(overlay_width, overlay_height); // Don't know mouse size yet - it gets reallocated in |