From f20afa6474b3d601bc55e9d06ea9ea55d208018c Mon Sep 17 00:00:00 2001 From: Lucas Petherbridge Date: Mon, 13 Dec 2021 10:17:14 -0800 Subject: [PATCH] Renamed Unhandled to Unsupported --- src/event.rs | 24 ++++++++++++------------ src/renderer/sdl/event.rs | 16 ++++++++-------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/event.rs b/src/event.rs index 0de8c50..487dac1 100644 --- a/src/event.rs +++ b/src/event.rs @@ -240,12 +240,12 @@ pub enum Event { iscapture: bool, }, /// An unknown/unsupported event. - Unhandled, + Unsupported, } impl Default for Event { fn default() -> Self { - Self::Unhandled + Self::Unsupported } } @@ -306,12 +306,12 @@ pub enum WindowEvent { /// Window closed. Close, /// An unknown/unsupported window event. - Unhandled, + Unsupported, } impl Default for WindowEvent { fn default() -> Self { - Self::Unhandled + Self::Unsupported } } @@ -327,12 +327,12 @@ pub enum Mouse { /// Right mouse button. Right, /// An unknown/unsupported mouse button. - Unhandled, + Unsupported, } impl Default for Mouse { fn default() -> Self { - Self::Unhandled + Self::Unsupported } } @@ -369,12 +369,12 @@ pub enum Key { F7, F8, F9, F10, F11, F12, PrintScreen, ScrollLock, Pause, Insert, Home, PageUp, End, PageDown, Right, Left, Down, Up, NumLock, KpDivide, KpMultiply, KpMinus, KpPlus, KpEnter, Kp1, Kp2, Kp3, Kp4, Kp5, Kp6, Kp7, Kp8, Kp9, Kp0, KpPeriod, KpEquals, KpComma, LCtrl, LShift, LAlt, LGui, - RCtrl, RShift, RAlt, RGui, Unhandled + RCtrl, RShift, RAlt, RGui, Unsupported } impl Default for Key { fn default() -> Self { - Self::Unhandled + Self::Unsupported } } @@ -396,12 +396,12 @@ pub enum Axis { /// Right trigger switch. TriggerRight, /// An unknown/unsupported axis. - Unhandled, + Unsupported, } impl Default for Axis { fn default() -> Self { - Self::Unhandled + Self::Unsupported } } @@ -487,12 +487,12 @@ pub enum ControllerButton { /// PS4/PS5 touchpad button Touchpad, /// An unknown/unsupported button - Unhandled, + Unsupported, } impl Default for ControllerButton { fn default() -> Self { - Self::Unhandled + Self::Unsupported } } diff --git a/src/renderer/sdl/event.rs b/src/renderer/sdl/event.rs index aa11123..f2eecba 100644 --- a/src/renderer/sdl/event.rs +++ b/src/renderer/sdl/event.rs @@ -198,8 +198,8 @@ impl From for Event { iscapture, }, evt => { - warn!("Unhandled SDL `Event`: {:?}", evt); - Self::Unhandled + warn!("Unsupported SDL `Event`: {:?}", evt); + Self::Unsupported } } } @@ -224,8 +224,8 @@ impl From for WindowEvent { SdlWindowEvent::FocusLost => Self::FocusLost, SdlWindowEvent::Close => Self::Close, evt => { - warn!("Unhandled SDL `WindowEvent`: {:?}", evt); - Self::Unhandled + warn!("Unsupported SDL `WindowEvent`: {:?}", evt); + Self::Unsupported } } } @@ -358,8 +358,8 @@ impl From for Key { SdlKeycode::RAlt => Self::RAlt, SdlKeycode::RGui => Self::RGui, keycode => { - warn!("Unhandled SDL `Keycode`: {:?}", keycode); - Self::Unhandled + warn!("Unsupported SDL `Keycode`: {:?}", keycode); + Self::Unsupported } } } @@ -393,8 +393,8 @@ impl From for Mouse { SdlMouseButton::Middle => Self::Middle, SdlMouseButton::Right => Self::Right, btn => { - warn!("Unhandled SDL `MouseButton`: {:?}", btn); - Self::Unhandled + warn!("Unsupported SDL `MouseButton`: {:?}", btn); + Self::Unsupported } } }