Android Question Problem with screen size on devices with Android 11

Dmitriy

New Member
I have a problem with Samsung devices series A and M which update to Android 11.
Game screen size on these devices bigger than device physical size.
I haven't got such device, but my player wrote me screenshot.

I use this code:


Dim k As Int

r.Target = r.GetContext

r.Target = r.RunMethod("getResources")

r.Target = r.RunMethod("getDisplayMetrics")

H = r.GetField("heightPixels")

W = r.GetField("widthPixels")

If w / h >= 2 Then

w = h*16/9

End If

Rx = W / 800

Ry = H / 480



And after I work with virtual screen 800x480 and for expand it I use Rx and Ry.
Maybe anybody knows which code need to use now?

 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…