Skip to content

Commit fe9576a

Browse files
uefi: Fix use of tuples in pointer structs
Tuples are not FFI safe, so replace them with arrays.
1 parent d9cca99 commit fe9576a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
- Renamed `FileSystemIOErrorContext` to `IoErrorContext`.
88
- `ResetType` is now a newtype-enum instead of a Rust enum. Its members now have
99
upper-case names.
10+
- `PointerMode` and `PointerState` now contain arrays rather than tuples, as
11+
tuples are not FFI safe.
1012

1113
## uefi-macros - [Unreleased]
1214

uefi/src/proto/console/pointer/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ impl Pointer {
6464
pub struct PointerMode {
6565
/// The pointer device's resolution on the X/Y/Z axis in counts/mm.
6666
/// If a value is 0, then the device does _not_ support that axis.
67-
pub resolution: (u64, u64, u64),
67+
pub resolution: [u64; 3],
6868
/// Whether the devices has a left button / right button.
69-
pub has_button: (bool, bool),
69+
pub has_button: [bool; 2],
7070
}
7171

7272
/// The relative change in the pointer's state.
@@ -76,9 +76,9 @@ pub struct PointerState {
7676
/// The relative movement on the X/Y/Z axis.
7777
///
7878
/// If `PointerMode` indicates an axis is not supported, it must be ignored.
79-
pub relative_movement: (i32, i32, i32),
79+
pub relative_movement: [i32; 3],
8080
/// Whether the left / right mouse button is currently pressed.
8181
///
8282
/// If `PointerMode` indicates a button is not supported, it must be ignored.
83-
pub button: (bool, bool),
83+
pub button: [bool; 2],
8484
}

0 commit comments

Comments
 (0)