bevy/crates/bevy_winit/src
Michael "Scott" McBee d48ebdf641
Have WindowPosition::Centered take scale_factor_override into account (#13949)
# Objective

Fixes #8916 

My game has a low resolution pixel art style, and I use
`.with_scale_factor_override()` to make the window larger.
`WindowPosition::Centered` doesn't work for me.

## Solution

If `scale_factor_override` is set, use that over `monitor.scale_factor`

## Testing

Tested on Windows 11 with an Nvidia GPU:

### Main

![image](https://github.com/bevyengine/bevy/assets/3324533/5f9ae90e-b65a-48d9-b601-117df8f08a28)

### This PR

![image](https://github.com/bevyengine/bevy/assets/3324533/cd860611-7b6a-4ae5-b690-28d9ba8ea6ad)
2024-06-24 20:56:46 +00:00
..
accessibility.rs fix: upgrade to winit v0.30 (#13366) 2024-06-03 13:06:48 +00:00
converters.rs Add logical key data to KeyboardInput (#11400) 2024-01-22 15:25:17 +00:00
lib.rs fix: upgrade to winit v0.30 (#13366) 2024-06-03 13:06:48 +00:00
state.rs Fix phantom key presses in winit on focus change (#13299) (#13696) 2024-06-17 14:49:16 +00:00
system.rs apply window scale to window size when creating it (#13967) 2024-06-21 18:04:57 +00:00
winit_config.rs Fix lints introduced in Rust beta 1.80 (#13899) 2024-06-17 17:22:01 +00:00
winit_event.rs flush key_input cache when Bevy loses focus (Adopted) (#13678) 2024-06-05 02:06:47 +00:00
winit_windows.rs Have WindowPosition::Centered take scale_factor_override into account (#13949) 2024-06-24 20:56:46 +00:00