Scale factor override crossing screens with different native scale factors causes odd behaviour #2751
Labels
A-Rendering
Drawing game state to the screen
A-Windowing
Platform-agnostic interface layer to run your app in
C-Bug
An unexpected or incorrect behavior
Bevy version
c5717b5
Operating system & version
Windows 10
What you did
Created a program which locks the window size, includes two sprites and:
Code
What you expected to happen
The same image should be rendered in the game window, no matter which monitor it is on. The window should have the size
(1200, 400)
, since that is the window size times the scale factor:What actually happened
When I move the game window from my primary monitor (which is a 4k screen with 125% scale factor) to my secondary screen (1080p, at 100% scale factor), the visible content changes to only show the blue sprite:
Additional information
This second version actually has a smaller window, which suggests that the bug is that something in this code
bevy/crates/bevy_winit/src/lib.rs
Lines 387 to 427 in f6b42b8
doesn't correctly handle a scale factor override properly (or at all).
CC @TheRawMeatball, who originally added this code in #1131
The text was updated successfully, but these errors were encountered: