diff --git a/crates/emulator/src/main.rs b/crates/emulator/src/main.rs index 6afa982f..19fd2f23 100644 --- a/crates/emulator/src/main.rs +++ b/crates/emulator/src/main.rs @@ -376,6 +376,17 @@ fn main() -> Result<(), Error> { _ => (), } }, + SdlEvent::MouseWheel { mut y, direction, .. } => { + if direction == sdl2::mouse::MouseWheelDirection::Flipped { + y = -y; + } + + if y > 0 { + tx.send(Event::Page(plato_core::geom::CycleDir::Previous)).ok(); + } else if y < 0 { + tx.send(Event::Page(plato_core::geom::CycleDir::Next)).ok(); + } + }, _ => { if let Some(dev_evt) = device_event(sdl_evt) { ty.send(dev_evt).ok();