• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Game resolution being downscaled on Android by Samsung Game Booster

EDIT: The resolution seems to be automatically downscaled by Samsung Game Booster


-Original post-

On Android the game window does not scale up properly as it detects the wrong resolution on Samsung devices.
Display_get_width() and display_get_height() are also returning wrong values.

However, this only occurs on my Samsung device and only when building an .apk first. If the game is launched through the runner, it works correctly.

I have a Samsung Galaxy A41 with a resolution of 2400x1080.

If I run the game through the runner (VM and YYC) it works correctly, this is what the compiler shows:
05-30 09:32:56.546 14005 19203 I yoyo : Device supports 32bit display formats
05-30 09:32:56.547 14005 19203 I yoyo : 16 bit colour depth forced
05-30 09:32:56.548 14005 19203 I yoyo : Trying EGL config : EGLConfig 7: rgba=5650 depth=24 stencil=8 EGL_ALPHA_MASK_SIZE=0 EGL_BUFFER_SIZE=16 EGL_COLOR_BUFFER_TYPE=12430 EGL_CONFIG_CAVEAT=0x3038 EGL_LEVEL=0 EGL_LUMINANCE_SIZE=0 EGL_MAX_PBUFFER_WIDTH=8192 EGL_MAX_PBUFFER_HEIGHT=8192 EGL_MAX_PBUFFER_PIXELS=67108864 EGL_MAX_PBUFFER_HEIGHT=8192 EGL_MAX_PBUFFER_HEIGHT=8192 EGL_NATIVE_RENDERABLE=0 EGL_NATIVE_VISUAL_TYPE=4 EGL_RENDERABLE_TYPE=69 EGL_SAMPLE_BUFFERS=0 EGL_SAMPLES=0 EGL_SURFACE_TYPE=5125 EGL_TRANSPARENT_TYPE=12344 EGL_TRANSPARENT_RED_VALUE=0 EGL_TRANSPARENT_GREEN_VALUE=0 EGL_TRANSPARENT_BLUE_VALUE=0
05-30 09:32:56.554 14005 19203 I yoyo : Selected EGL config working
05-30 09:32:56.558 14005 19203 I yoyo : Renderer instance is gl2.0, framebuffer object is: 0
05-30 09:32:56.561 14005 19203 I yoyo : APK File Path :: /data/app/com.company.game-VOR7tTe1UV2XQ3EGqiuTqA==/base.apk
05-30 09:32:56.567 14005 19203 I yoyo : OpenGL ES-2.0 is supported: 196610
05-30 09:32:56.637 14005 14005 I yoyo : onWindowFocusChanged(true|false)
05-30 09:32:56.638 14005 14005 I yoyo : Setting vis flags to 5894
05-30 09:32:56.859 14005 19203 I yoyo : @@@@@@@@@@@@ isTablet - 0
05-30 09:32:56.861 14005 19203 I yoyo : @@@@@@@@@@@@ temporary directory - /data/user/0/com.company.game/cache
05-30 09:32:56.861 14005 19203 I yoyo : @@@@@@@@@@@@ lanaguage - nl
05-30 09:32:56.861 14005 19203 I yoyo : @@@@@@@@@@@@ dpiX - 420
05-30 09:32:56.861 14005 19203 I yoyo : @@@@@@@@@@@@ dpiY - 420

05-30 09:32:56.861 14005 19203 I yoyo : @@@@@@@@@@@@ os-version - 29(10)
05-30 09:32:56.861 14005 19203 I yoyo : @@@@@@@@@@@@ region - NL
05-30 09:32:56.861 14005 19203 I yoyo : onSurfaceChanged :: width=2400 height=1080
05-30 09:32:56.862 14005 19203 I yoyo : State->Splash
05-30 09:32:56.868 14005 19203 I yoyo : State->Splash time: 1622359976868
05-30 09:32:56.868 14005 19203 I yoyo : State->Splash endTime: 1622359976868
05-30 09:32:56.868 14005 19203 I yoyo : State->InitRunner
05-30 09:32:56.888 14005 14005 I yoyo : Setting vis flags to 5894
05-30 09:32:56.909 14005 14005 D yoyo : doSetup called - /data/app/com.company.game-VOR7tTe1UV2XQ3EGqiuTqA==/base.apk
05-30 09:32:56.909 14005 14005 I yoyo : No extensions defined prior to advertising check
05-30 09:32:56.909 14005 14005 I yoyo : RestrictOrientation setting from YYPrefs
05-30 09:32:56.909 14005 14005 I yoyo : RestrictOrientation("true", "false"true"false")
05-30 09:32:56.922 14005 14005 I yoyo : Setting vis flags to 5894
05-30 09:32:56.947 14005 19203 I yoyo : Sleepmargin: 0

The issue occurs when I create an .apk and install it on my phone, suddenly the resolution is 1800x810.
I was able to trick the runner in using the already installed version, this is what the compiler showed:

05-30 09:22:55.263 10311 11973 I yoyo : Device supports 32bit display formats
05-30 09:22:55.265 10311 11973 I yoyo : 16 bit colour depth forced
05-30 09:22:55.270 10311 11973 I yoyo : Trying EGL config : EGLConfig 7: rgba=5650 depth=24 stencil=8 EGL_ALPHA_MASK_SIZE=0 EGL_BUFFER_SIZE=16 EGL_COLOR_BUFFER_TYPE=12430 EGL_CONFIG_CAVEAT=0x3038 EGL_LEVEL=0 EGL_LUMINANCE_SIZE=0 EGL_MAX_PBUFFER_WIDTH=8192 EGL_MAX_PBUFFER_HEIGHT=8192 EGL_MAX_PBUFFER_PIXELS=67108864 EGL_MAX_PBUFFER_HEIGHT=8192 EGL_MAX_PBUFFER_HEIGHT=8192 EGL_NATIVE_RENDERABLE=0 EGL_NATIVE_VISUAL_TYPE=4 EGL_RENDERABLE_TYPE=69 EGL_SAMPLE_BUFFERS=0 EGL_SAMPLES=0 EGL_SURFACE_TYPE=5125 EGL_TRANSPARENT_TYPE=12344 EGL_TRANSPARENT_RED_VALUE=0 EGL_TRANSPARENT_GREEN_VALUE=0 EGL_TRANSPARENT_BLUE_VALUE=0
05-30 09:22:55.275 10311 11973 I yoyo : Selected EGL config working
05-30 09:22:55.282 10311 11973 I yoyo : Renderer instance is gl2.0, framebuffer object is: 0
05-30 09:22:55.286 10311 11973 I yoyo : APK File Path :: /data/app/com.company.game-_zL6t8EA00BmzCP1AVWJPQ==/base.apk
05-30 09:22:55.287 10311 11973 I yoyo : OpenGL ES-2.0 is supported: 196610
05-30 09:22:55.401 10311 10311 I yoyo : onWindowFocusChanged(true|false)
05-30 09:22:55.403 10311 10311 I yoyo : Setting vis flags to 5894
05-30 09:22:55.454 10311 10311 I yoyo : Setting vis flags to 5894
05-30 09:22:55.581 10311 10311 I yoyo : Setting vis flags to 5894
05-30 09:22:55.604 10311 11973 I yoyo : @@@@@@@@@@@@ isTablet - 0
05-30 09:22:55.607 10311 11973 I yoyo : @@@@@@@@@@@@ temporary directory - /data/user/0/com.company.game/cache
05-30 09:22:55.607 10311 11973 I yoyo : @@@@@@@@@@@@ lanaguage - nl
05-30 09:22:55.607 10311 11973 I yoyo : @@@@@@@@@@@@ dpiX - 315
05-30 09:22:55.607 10311 11973 I yoyo : @@@@@@@@@@@@ dpiY - 315

05-30 09:22:55.607 10311 11973 I yoyo : @@@@@@@@@@@@ os-version - 29(10)
05-30 09:22:55.607 10311 11973 I yoyo : @@@@@@@@@@@@ region - NL
05-30 09:22:55.607 10311 11973 I yoyo : onSurfaceChanged :: width=1800 height=810
05-30 09:22:55.608 10311 11973 I yoyo : State->Splash
05-30 09:22:55.618 10311 11973 I yoyo : State->Splash time: 1622359375618
05-30 09:22:55.618 10311 11973 I yoyo : State->Splash endTime: 1622359375618
05-30 09:22:55.618 10311 11973 I yoyo : State->InitRunner
05-30 09:22:55.650 10311 10311 D yoyo : doSetup called - /data/app/com.company.game-_zL6t8EA00BmzCP1AVWJPQ==/base.apk
05-30 09:22:55.651 10311 10311 I yoyo : No extensions defined prior to advertising check
05-30 09:22:55.651 10311 10311 I yoyo : RestrictOrientation setting from YYPrefs
05-30 09:22:55.651 10311 10311 I yoyo : RestrictOrientation("true", "false"true"false")
05-30 09:22:55.688 10311 11973 I yoyo : Sleepmargin: 0

As you can see, it detects the wrong DPI for the screen and this results in a wrong resolution.

What might be causing this is the Samsung Game Booster, as this is launched when I launch the .apk, but is not launched when using the runner. However, this is impossible to turn off without rooting the phone.
Also, on my Motorola G, the issue does not occur.

Settings:
GMS: 2.3.2
Build: SDK 30
Architecture: ARM64
Screen colour depth: 16bit/24bit, makes no difference
Scaling: Keep aspect ratio

I'm going to file a bug report, but in the mean time:
has anyone encountered this issue and maybe found a solution?

EDIT: I made a new build with GMS 2.2.5 and SDK 29 -> but exact same issue
 
Last edited:

Nocturne

Friendly Tyrant
Forum Staff
Admin
IIRC, Samung phones have a function that will dynamically change the pixel resolution for games as an "optimisation" to make them run better... I think t's called simply "Samsung Game Optimisation". I am 100% certain that I've seen this issue discussed before, however I suspect it was on the old forums not this one as I can't find the relevant link. You should be able to disable the game optimisation service and the game will be correct. I know that this issue affects other games, not just GameMaker ones too, as I've seen YouTube videos about PUBG and other games with similar issues.
 
IIRC, Samung phones have a function that will dynamically change the pixel resolution for games as an "optimisation" to make them run better... I think t's called simply "Samsung Game Optimisation". I am 100% certain that I've seen this issue discussed before, however I suspect it was on the old forums not this one as I can't find the relevant link. You should be able to disable the game optimisation service and the game will be correct. I know that this issue affects other games, not just GameMaker ones too, as I've seen YouTube videos about PUBG and other games with similar issues.
Thanks, that's good to know,
It's called the Samsung Game Booster and it's built-in and impossible to disable (without rooting)

Guess that's the root of the problem

Hopefully YoYo will be able to create a fix
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
This would be Samsung's issue - Game Booster detects that system resources are used "sufficiently" and downgrades the resolution to offer what it considers to be better performance. Unless they have an application-side API somewhere, there would be nothing that YYG can do on their end about this.
 
This would be Samsung's issue - Game Booster detects that system resources are used "sufficiently" and downgrades the resolution to offer what it considers to be better performance. Unless they have an application-side API somewhere, there would be nothing that YYG can do on their end about this.
In short, Samsung created a developer's nightmare

**SIGH**

EDIT:

@YellowAfterlife @Nocturne What bothers me though, I tested this with an almost empty project (1 room, 1 object, 1 draw event only).
Why would it need to downgrade the resolution? It's certainly not that my phone can't handle it, in the past I've used much simpler phones that could easily run my projects.

Has this something to do with increased cpu usage for GMS Android builds maybe?
 
Last edited:

Zeritum

Member
Hi, had a similar issue myself that I just posted on reddit before coming here (can't link, new forum account :p)

It wasn't always this way, but one day the Game Booster recognised my program as a "Game" and this began. Makes me wonder if there's a way to unflag games as "Games" so the Game Booster doesn't mess with the dpi. Nothing found so far, but I'll come back here if I find anything!

Mod edit: Supposedly this Reddit thread
 
Last edited by a moderator:
Top