Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 420b219

Browse files
Merge pull request #822 from nicholasbishop/bishop-fix-tuple
uefi: Fix use of tuples in pointer structs
2 parents d9cca99 + fe9576a commit 420b219

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)

AltStyle によって変換されたページ (->オリジナル) /