Screen size for Samsung phone outputting reverse dimensions

I have been testing mobile for my GUIs and everything works fine in emulator mode in studio. I’ve had some friends do some tests and it seems to work well on iPhone and iPad, but on Samsung I was getting some abnormal behaviour that I wasn’t observing on the Samsung emulator in studio.

The issue is that the text size on mobile requires a decrease for smaller resolution displays - I would use TextScaled but it ends up scaling text unequally based on length, which I am trying to avoid. Samsung phones, however, output their dimensions in reverse - their “X” parameter is really their “Y” parameter, and vice-versa.

i.e., when I run the following script:

local SCREEN = workspace.Camera.ViewportSize

it outputs the reverse -> SCREEN.Y, SCREEN.X.

This occurred on a Samsung Galaxy S6. I don’t have any other Samsung users to test for me. All you need to do is copy the 2 lines above and put it any local script to repro. Please let me know the results, in case this is a local issue and is not widespread. Thanks

Looks like it works fine on Pixel 4 XL, which runs vanilla Android, so it might possibly be something to do with Samsung’s modifications to Android. I don’t have any Samsung products to test on either unfortunately.

1 Like