We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72d1d9d commit 7f08e41Copy full SHA for 7f08e41
crates/bevy_winit/src/lib.rs
@@ -96,9 +96,11 @@ fn change_window(_: &mut World, resources: &mut Resources) {
96
}
97
bevy_window::WindowCommand::SetCursorPosition { position } => {
98
let window = winit_windows.get_window(id).unwrap();
99
+ let inner_size = window.inner_size().to_logical::<f32>(window.scale_factor());
100
window
101
.set_cursor_position(winit::dpi::LogicalPosition::new(
- position.x, position.y,
102
+ position.x,
103
+ inner_size.height - position.y,
104
))
105
.unwrap_or_else(|e| error!("Unable to set cursor position: {}", e));
106
0 commit comments