From ef87cd132515147a3629e162ec1ff2f8e8218f2b Mon Sep 17 00:00:00 2001 From: Simon Heath Date: Fri, 21 Oct 2016 12:17:03 -0400 Subject: [PATCH] Fixed bug in Event::to_ll that was making test case fail --- src/sdl2/event.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdl2/event.rs b/src/sdl2/event.rs index e3006df8..040821d6 100644 --- a/src/sdl2/event.rs +++ b/src/sdl2/event.rs @@ -1154,11 +1154,11 @@ impl Event { } => { let buttonval = button.to_ll(); let event = ll::SDL_ControllerButtonEvent { - type_: ll::SDL_CONTROLLERBUTTONDOWN, + type_: ll::SDL_CONTROLLERBUTTONUP, timestamp: timestamp, which: which, button: buttonval as u8, - state: ll::SDL_PRESSED, + state: ll::SDL_RELEASED, padding1: 0, padding2: 0, };