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

Sizing problem between desktop and mobile (UI/2D) #8322

Closed
SergioRibera opened this issue Apr 7, 2023 · 3 comments
Closed

Sizing problem between desktop and mobile (UI/2D) #8322

SergioRibera opened this issue Apr 7, 2023 · 3 comments
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-Android Specific to the Android mobile operating system S-Blocked This cannot move forward until something else changes

Comments

@SergioRibera
Copy link

Bevy version

0.10.1

Relevant system information

Bevy can run successfully, but these are my OS

  • Rust version: cargo 1.70.0-nightly (0e474cfd7 2023-03-31)

  • PC: Arch Linux - Linux Kernel 6.1.21-1

  • Android: 12 - MIUI 13.0.5 Stable

Sizing problem between desktop and mobile

// desktop 
AdapterInfo { name: "AMD Radeon Vega 10 Graphics", vendor: 4098, device: 5592, device_type: IntegratedGpu, driver: "AMD proprietary driver", driver_info: "(AMD proprietary shader compiler)", backend: Vulkan }

// Mobile
AdapterInfo { name: "Adreno (TM) 619", vendor: 20803, device: 100731137, device_type: IntegratedGpu, driver: "Qualcomm Technologies Inc. Adreno Vulkan Driver", driver_info: "Driver Build: 3e33337ce3, I07ee46fc66, 1633699849\nDate: 10/08/21\nCompiler Version: EV031.35.01.10\nDriver Branch: \n", backend: Vulkan }

What you did

The size of the elements look correct on the desktop but when you run the same programme on the mobile you get distortions

What went wrong

The size of the elements look correct on the desktop but when you run the same programme on the mobile you get distortions.

  • what were you expecting?
    • Same aspect
  • what actually happened?
    • Diferent aspect

Additional information

Here you can find the code for the mobile and desktop applications

Screenshots:

  • Mobile
    Screenshot_2023-04-07-01-38-08-479_com sergioribera simple
  • Desktop
    image
@SergioRibera SergioRibera added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Apr 7, 2023
@mockersf mockersf added A-Windowing Platform-agnostic interface layer to run your app in O-Android Specific to the Android mobile operating system and removed S-Needs-Triage This issue needs to be labelled labels Apr 7, 2023
@mockersf
Copy link
Member

mockersf commented Apr 7, 2023

I can reproduce something similar, and it's fixed by rust-mobile/android-activity#70

You can test with

[patch.crates-io]
android-activity = { git = "https://github.com/MarijnS95/android-activity/", branch = "na-resize"}

in your Cargo.toml

@mockersf mockersf added the S-Blocked This cannot move forward until something else changes label Apr 7, 2023
@SergioRibera
Copy link
Author

I can reproduce something similar, and it's fixed by rust-mobile/android-activity#70

You can test with

[patch.crates-io]
android-activity = { git = "https://github.com/MarijnS95/android-activity/", branch = "na-resize"}

in your Cargo.toml

This works for me, I think it can serve as a temporary fix
Screenshot_2023-04-07-17-59-13-120_com sergioribera simple

@NiklasEi
Copy link
Member

NiklasEi commented Jun 27, 2023

android-activityversion 0.4.2 was just released including the fix that you already verified. If you run cargo update in your project, the sizing issues will be gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-Android Specific to the Android mobile operating system S-Blocked This cannot move forward until something else changes
Projects
None yet
Development

No branches or pull requests

3 participants