X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fcore%2Fcontroller.rs;h=b3f6201518ea5eae687102f4bd1b10a56281f9e0;hb=fca4e4f02f42efcfe88104ca221e32302b4f4878;hp=7037d810077f627e07cbb15f29b0710a36a7a368;hpb=3f344b6327a83b36aa88c32d7b016edbc3cfc1ef;p=kaka%2Frust-sdl-test.git diff --git a/src/core/controller.rs b/src/core/controller.rs index 7037d81..b3f6201 100644 --- a/src/core/controller.rs +++ b/src/core/controller.rs @@ -31,12 +31,12 @@ impl ControllerManager { pub fn handle_event(&mut self, event: &Event) { match event { - Event::ControllerDeviceAdded { which: id, .. } => { self.add_device(*id) } - Event::ControllerDeviceRemoved { which: id, .. } => { self.remove_device(*id) } - Event::ControllerDeviceRemapped { which: id, .. } => { println!("device remapped ({})!", *id) } - Event::ControllerButtonDown { button: btn, .. } => { println!("button {} down!", btn.string()) } - Event::ControllerButtonUp { button: btn, .. } => { println!("button {} up!", btn.string()) } - Event::ControllerAxisMotion { axis: ax, .. } => { println!("axis motion {}!", ax.string()) } + Event::ControllerDeviceAdded { which, .. } => { self.add_device(*which) } + Event::ControllerDeviceRemoved { which, .. } => { self.remove_device(*which) } + Event::ControllerDeviceRemapped { which, .. } => { println!("device remapped ({})!", *which) } + Event::ControllerButtonDown { button, .. } => { println!("button {} down!", button.string()) } + Event::ControllerButtonUp { button, .. } => { println!("button {} up!", button.string()) } + Event::ControllerAxisMotion { axis, .. } => { println!("axis motion {}!", axis.string()) } _ => {} } }