From cec594ed0d5a8a35576bf070353111975d8bcaf0 Mon Sep 17 00:00:00 2001 From: Sebastian Richter Date: Thu, 8 Aug 2019 17:10:54 +0200 Subject: [PATCH 1/2] -Changed the datatype for 'which' to i32 according to the official sdl documentation. --- src/sdl2/event.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sdl2/event.rs b/src/sdl2/event.rs index 8ff46871..5f2a5f4a 100644 --- a/src/sdl2/event.rs +++ b/src/sdl2/event.rs @@ -557,7 +557,7 @@ pub enum Event { JoyDeviceAdded { timestamp: u32, /// The newly added joystick's `joystick_index` - which: u32 + which: i32 }, JoyDeviceRemoved { timestamp: u32, @@ -589,7 +589,7 @@ pub enum Event { ControllerDeviceAdded { timestamp: u32, /// The newly added controller's `joystick_index` - which: u32 + which: i32 }, ControllerDeviceRemoved { timestamp: u32, @@ -1405,7 +1405,7 @@ impl Event { let event = raw.jdevice; Event::JoyDeviceAdded { timestamp: event.timestamp, - which: event.which as u32 + which: event.which as i32 } } EventType::JoyDeviceRemoved => { @@ -1451,7 +1451,7 @@ impl Event { let event = raw.cdevice; Event::ControllerDeviceAdded { timestamp: event.timestamp, - which: event.which as u32 + which: event.which as i32 } } EventType::ControllerDeviceRemoved => { From b7e51ca784a166fe064cc5cdd710f045694be60e Mon Sep 17 00:00:00 2001 From: Sebastian Richter Date: Tue, 27 Aug 2019 14:04:17 +0200 Subject: [PATCH 2/2] -Added my path change to the changelog as required in the contribution guide. --- changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.md b/changelog.md index 0d7fd24f..28c46ff5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,10 @@ In this file will be listed the changes, especially the breaking ones that one should be careful of when upgrading from a version of rust-sdl2 to another. +### v0.32.1 +[PR #907](https://github.com/Rust-SDL2/rust-sdl2/pull/907) +Changed the data type to i32 for the `which` field for the events `ControllerDeviceAdded` and `JoyDeviceAdded`. + ### v0.32.2 [PR #898](https://github.com/Rust-SDL2/rust-sdl2/pull/898):