From 69ba5e938078ca988fcd6e23b03a34e94395e59a Mon Sep 17 00:00:00 2001 From: negamartin Date: Mon, 9 Oct 2017 15:14:28 -0300 Subject: [PATCH 1/3] Fix HatState::Leftdown casing into HatState::LeftDown --- src/sdl2/joystick.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdl2/joystick.rs b/src/sdl2/joystick.rs index 8c7cccd63dc..b33dcee3b19 100644 --- a/src/sdl2/joystick.rs +++ b/src/sdl2/joystick.rs @@ -376,7 +376,7 @@ pub enum HatState { RightUp = 0x02 | 0x01, RightDown = 0x02 | 0x04, LeftUp = 0x08 | 0x01, - Leftdown = 0x08 | 0x04, + LeftDown = 0x08 | 0x04, } impl HatState { From ae145e00e79ab485ea78370f0a6a2c4042eda8f6 Mon Sep 17 00:00:00 2001 From: negamartin Date: Thu, 12 Oct 2017 18:00:59 -0300 Subject: [PATCH 2/3] Update joystick.rs --- src/sdl2/joystick.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdl2/joystick.rs b/src/sdl2/joystick.rs index b33dcee3b19..54091687c79 100644 --- a/src/sdl2/joystick.rs +++ b/src/sdl2/joystick.rs @@ -390,7 +390,7 @@ impl HatState { 3 => HatState::RightUp, 6 => HatState::RightDown, 9 => HatState::LeftUp, - 12 => HatState::Leftdown, + 12 => HatState::LeftDown, _ => panic!("Unexpected hat position: {}", raw), } } @@ -405,7 +405,7 @@ impl HatState { HatState::RightUp => 3, HatState::RightDown => 6, HatState::LeftUp => 9, - HatState::Leftdown => 12, + HatState::LeftDown => 12, } } From 8e88e75e37e0467c70926b6a83e015d8cd31a702 Mon Sep 17 00:00:00 2001 From: negamartin Date: Thu, 12 Oct 2017 18:04:40 -0300 Subject: [PATCH 3/3] Add HatState casing change and fix typo Fixed typo in changelog for PR #684 --- changelog.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index b6e23c82a28..9ff4530e7f7 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,10 @@ when upgrading from a version of rust-sdl2 to another. ### v0.31 +[PR #711](https://github.com/Rust-SDL2/rust-sdl2/pull/711) + +* **Breaking change** Change HatState::Leftdown casing into HatState::LeftDown to be consistent with naming. + [PR #673](https://github.com/Rust-sdl2/rust-sdl2/pull/673) * Support Audio Capture in AudioCallbacks. @@ -11,7 +15,7 @@ when upgrading from a version of rust-sdl2 to another. * **Breaking change** Make get\_swap\_interval return an enum instead of i32 * The signature of set\_swap\_interval has been changed as well, but it shouldn't -breaking exisitng code too much. +breaking existing code too much. [PR #683](https://github.com/Rust-sdl2/rust-sdl2/pull/684)