Skip to content

Commit 6e0510f

Browse files
committed
Use correct integer types in touch
1 parent 31cbd4e commit 6e0510f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/sdl2/touch.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ pub use sys::touch as ll;
55
pub type Finger = ll::Finger;
66
pub type TouchDevice = ll::TouchDevice;
77

8-
pub fn get_num_touch_devices() -> isize {
9-
unsafe { ll::SDL_GetNumTouchDevices() as isize }
8+
pub fn get_num_touch_devices() -> i32 {
9+
unsafe { ll::SDL_GetNumTouchDevices() }
1010
}
1111

12-
pub fn get_touch_device(index: isize) -> TouchDevice {
13-
unsafe { ll::SDL_GetTouchDevice(index as i32) }
12+
pub fn get_touch_device(index: i32) -> TouchDevice {
13+
unsafe { ll::SDL_GetTouchDevice(index) }
1414
}
1515

1616
pub fn get_num_touch_fingers(touch: TouchDevice) -> isize {
1717
unsafe { ll::SDL_GetNumTouchFingers(touch) as isize }
1818
}
1919

20-
pub fn get_touch_finger(touch: TouchDevice, index: isize) -> Option<Finger> {
21-
let raw = unsafe { ll::SDL_GetTouchFinger(touch, index as i32) };
20+
pub fn get_touch_finger(touch: TouchDevice, index: i32) -> Option<Finger> {
21+
let raw = unsafe { ll::SDL_GetTouchFinger(touch, index) };
2222

2323
if raw == ptr::null() {
2424
None

0 commit comments

Comments
 (0)