Skip to content

Commit

Permalink
Renamed Unhandled to Unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
lukexor committed Dec 13, 2021
1 parent aa5762b commit f20afa6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
24 changes: 12 additions & 12 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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
}
}

Expand All @@ -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
}
}

Expand Down Expand Up @@ -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
}
}

Expand All @@ -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
}
}

Expand Down Expand Up @@ -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
}
}

Expand Down
16 changes: 8 additions & 8 deletions src/renderer/sdl/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ impl From<SdlEvent> for Event {
iscapture,
},
evt => {
warn!("Unhandled SDL `Event`: {:?}", evt);
Self::Unhandled
warn!("Unsupported SDL `Event`: {:?}", evt);
Self::Unsupported
}
}
}
Expand All @@ -224,8 +224,8 @@ impl From<SdlWindowEvent> 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
}
}
}
Expand Down Expand Up @@ -358,8 +358,8 @@ impl From<SdlKeycode> 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
}
}
}
Expand Down Expand Up @@ -393,8 +393,8 @@ impl From<SdlMouseButton> 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
}
}
}
Expand Down

0 comments on commit f20afa6

Please sign in to comment.