From 49ff9bb1560c72476d4c34228d567996531eced3 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 c8df1552bc2b1..13307d7718e58 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -465,15 +465,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) => {