From cb8fe5b7fd31e02d077e0cefa660c4e9ed7e84cd Mon Sep 17 00:00:00 2001 From: Patrick Towles Date: Fri, 18 Nov 2022 22:16:54 +0000 Subject: [PATCH] Removed Mobile Touch event y-axis flip (#6597) # Objective Fix android touch events being flipped. Only removed test for android, don't have ios device to test with. Tested with emulator and physical device. ## Solution Remove check, no longer needed with coordinate change in 0.9 --- crates/bevy_winit/src/lib.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs index 0b1b544eec..295a88a044 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -471,15 +471,7 @@ pub fn winit_runner_with(mut app: App) { } }, WindowEvent::Touch(touch) => { - let mut location = touch.location.to_logical(window.scale_factor()); - - // On a mobile window, the start is from the top while on PC/Linux/OSX from - // bottom - if cfg!(target_os = "android") || cfg!(target_os = "ios") { - let window_height = windows.primary().height(); - location.y = window_height - location.y; - } - + let location = touch.location.to_logical(window.scale_factor()); world.send_event(converters::convert_touch_input(touch, location)); } WindowEvent::ReceivedCharacter(c) => {