From c69fe941afdea5ef6f3f84ed063554500b6262e8 Mon Sep 17 00:00:00 2001 From: Aevyrie Date: Mon, 20 Dec 2021 14:00:38 -0800 Subject: [PATCH] Reverse horizontal scrolling on windows (#966) * Reverse horizontal scrolling on windows * Add link to winit issue Co-authored-by: Emil Ernerfeldt --- egui-winit/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/egui-winit/src/lib.rs b/egui-winit/src/lib.rs index 7232a14b..4bcc3a42 100644 --- a/egui-winit/src/lib.rs +++ b/egui-winit/src/lib.rs @@ -458,6 +458,9 @@ impl State { // https://github.com/rust-windowing/winit/issues/1695 being closed delta.x *= -1.0; } + if cfg!(target_os = "windows") { + delta.x *= -1.0; // until https://github.com/rust-windowing/winit/pull/2101 is merged + } if self.egui_input.modifiers.ctrl || self.egui_input.modifiers.command { // Treat as zoom instead: