Android - wrong physical size

Open
#3,663 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, rust
Domain
mobile

Research direction

Start by reproducing the Resize event behavior in winit 0.29.15 on the reported Samsung M21 running Android 12, comparing the 1080px physical width with the 810px value and the logical size. Compare the result with winit 0.28 to establish whether this is a regression; done means the reported physical size is explained or corrected and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Description

B - bug DS - android
Description

Hi I am getting this weird bug with screen resolution recently. On Android I am determining my screen size from the Resize event (as on the app start the window is not there yet). Despite having a 1080px wide screen I am getting 810px reported from winit. (the logical size being 400 something).

I am pretty sure that this happened somewhere between 0.28 an 0.29. I scale my game UI based on this value and noticed something suspicious when comparing old screenshots. (unfortunately it'd be hard for me to revert the entire code back to 0.28)

I've just bumped the game to 0.29.15 to check if it didn't get fix during a minor revision but it's the same.

Device and Android version

Samsung M21, Android 12

Winit version

0.29.15

Dominant language
Rust
Stars
6.2k
Forks
1.3k
Avg merge
2d 19h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-windowing/winit

All issues in rust-windowing/winit

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.