Skip to content

Fix off-center rendering on some devices#16

Merged
powerje merged 1 commit intomainfrom
fix/off-center-rendering
Mar 28, 2026
Merged

Fix off-center rendering on some devices#16
powerje merged 1 commit intomainfrom
fix/off-center-rendering

Conversation

@powerje
Copy link
Copy Markdown
Owner

@powerje powerje commented Mar 28, 2026

Summary

  • Replaces hasCenteredImages boolean flag with lastCanvasWidth/lastCanvasHeight dimension tracking
  • Re-centers sprites whenever canvas dimensions actually change, rather than relying solely on surfaceChanged callback
  • Two int comparisons per frame; setCenter only called when dimensions differ

Fixes #10

Test plan

  • Verify wallpaper stays centered after rotation
  • Verify wallpaper stays centered during home screen page swipes
  • Verify wallpaper stays centered in split-screen / multi-window mode
  • Verify no visible performance regression (animation smoothness, battery)

@powerje powerje merged commit 8db4f2e into main Mar 28, 2026
1 check passed
@powerje powerje deleted the fix/off-center-rendering branch March 28, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sometimes Droid and rainbow are not located in the center

1 participant