Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boot Splash scaling is too small on Android, even with Fullsize enabled #69317

Open
MecoCL opened this issue Nov 28, 2022 · 16 comments
Open

Boot Splash scaling is too small on Android, even with Fullsize enabled #69317

MecoCL opened this issue Nov 28, 2022 · 16 comments

Comments

@MecoCL
Copy link

MecoCL commented Nov 28, 2022

Godot version

3.5.1 stable

System information

Android 11 (GLES2)

Issue description

image

It's scaling so small on phone but it's scalling normally on PCs

Steps to reproduce

N/A

Minimal reproduction project

N/A

@Calinou
Copy link
Member

Calinou commented Nov 28, 2022

Is Fullsize enabled in the splash screen project settings? If not, it's expected that the splash image appears small on Android devices. These devices pretty much always feature displays with higher DPI compared to desktop displays.

@MecoCL
Copy link
Author

MecoCL commented Nov 30, 2022

it is activated and still small on phones

@Calinou
Copy link
Member

Calinou commented Nov 30, 2022

@MecoCL Please upload a minimal reproduction project to make this easier to troubleshoot.

@Calinou Calinou added the bug label Nov 30, 2022
@Calinou Calinou changed the title Boot Splash scaling is so small on Android Boot Splash scaling is too small on Android, even with Fullsize enabled Nov 30, 2022
@Calinou
Copy link
Member

Calinou commented Nov 30, 2022

@MecoCL The minimal reproduction project didn't upload (likely because you clicked away from the text field while it was still uploading). Try editing your post and upload it again.

@MecoCL
Copy link
Author

MecoCL commented Nov 30, 2022

@Calinou Splash Screen.zip

@DissonantVoid
Copy link
Contributor

Can confirm, this is how it looks on my 20:9aspect-ratio, 720x1600pixels phone
Screenshot
Based on provided reproduction project. Godot 3.5.stable
a

@MecoCL
Copy link
Author

MecoCL commented Dec 3, 2022

lol, Imagine my phone is 2408×1080 pixels

@MecoCL

This comment was marked as off-topic.

@akien-mga

This comment was marked as resolved.

@akien-mga akien-mga modified the milestones: 4.0, 3.x Dec 5, 2022
@akien-mga
Copy link
Member

For anyone interested in debugging this further: you can look into places where the application/boot_splash/fullsize setting is used. It seems to be used explicitly to handle scaling but apparently it doesn't work as expected:

@MecoCL
Copy link
Author

MecoCL commented Dec 5, 2022

@akien-mga I wasn't, I just thought you forgot or something.

@Magamex
Copy link

Magamex commented Mar 4, 2023

Hello everybody!
Has a solution to this problem been found?
I have the same problem...

@ghost
Copy link

ghost commented Jun 9, 2023

Doesn't even work properly in 4.0.2 :(

@lawnjelly
Copy link
Member

lawnjelly commented Aug 8, 2023

Wild guess at what is happening, as I haven't debugged (it takes days to set up Android debugging 😀 ):

Looking at RasterizerGLES2::set_boot_image():

	int window_w = OS::get_singleton()->get_video_mode(0).width;
	int window_h = OS::get_singleton()->get_video_mode(0).height;

If these are not set properly the following code won't work:

		if (window_w > window_h) {
			//scale horizontally
			screenrect.size.y = window_h;
			screenrect.size.x = imgrect.size.x * window_h / imgrect.size.y;
			screenrect.position.x = (window_w - screenrect.size.x) / 2;

		} else {
			//scale vertically
			screenrect.size.x = window_w;
			screenrect.size.y = imgrect.size.y * window_w / imgrect.size.x;
			screenrect.position.y = (window_h - screenrect.size.y) / 2;
		}

On Android, the default_videomode is only changed from default in OS_Android::set_display_size.

Which is called from Java_org_godotengine_godot_GodotLib_resize. Which would have to be called by public static native void resize(int width, int height); from java. This would have to be called from onSurfaceChanged in java in GodotRenderer.

Maybe the boot screen is getting set before the window width and height have been set.

So I suspect some debugging of onSurfaceChanged() would reveal the problem. Maybe order of construction / operations. Maybe one for @m4gr3d next time he is debugging?

@0-Vanes-0
Copy link

The issue still exists in v4.2.1.stable.official [b09f793]

@m4gr3d m4gr3d self-assigned this Feb 13, 2024
@chriisduran
Copy link

Still getting the problem of splash screen, Juancho, before launch a new version of godot please fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants