authorgravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-09-02 22:31:59+02:00
committergravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-09-02 22:31:59+02:00
log5e874a89b991fcabe8177c551c220894593c1632
treeaea91d811b3ea187b3d4774afcb99e8a5f7c36b6
parent8db41b7adbd0d1112a914d05ed94e9b55cfaf2db
signaturelock-open Commit is signed but in an unrecognized format.

std/os/uefi: fix ordering of packed bit fields


3 files changed, 20 insertions(+), 25 deletions(-)

std/os/uefi/protocols/absolute_pointer_protocol.zig+4-6
......@@ -35,10 +35,9 @@ pub const AbsolutePointerMode = extern struct {
3535 absolute_max_y: u64,
3636 absolute_max_z: u64,
3737 attributes: packed struct {
38 _pad1: u6,
39 supports_pressure_as_z: bool,
4038 supports_alt_active: bool,
41 _pad2: u24,
39 supports_pressure_as_z: bool,
40 _pad1: u30,
4241 },
4342};
4443
......@@ -47,9 +46,8 @@ pub const AbsolutePointerState = extern struct {
4746 current_y: u64 = undefined,
4847 current_z: u64 = undefined,
4948 active_buttons: packed struct {
50 _pad1: u6,
51 alt_active: bool,
5249 touch_active: bool,
53 _pad2: u24,
50 alt_active: bool,
51 _pad1: u30,
5452 } = undefined,
5553};
std/os/uefi/protocols/edid_override_protocol.zig+2-3
......@@ -22,8 +22,7 @@ pub const EdidOverrideProtocol = extern struct {
2222};
2323
2424pub const EdidOverrideProtocolAttributes = packed struct {
25 _pad1: u6,
26 enable_hot_plug: bool,
2725 dont_override: bool,
28 _pad2: u24,
26 enable_hot_plug: bool,
27 _pad1: u30,
2928};
std/os/uefi/protocols/simple_text_input_ex_protocol.zig+14-16
......@@ -48,28 +48,26 @@ pub const KeyData = extern struct {
4848
4949pub const KeyState = extern struct {
5050 key_shift_state: packed struct {
51 left_logo_pressed: bool,
52 right_logo_pressed: bool,
53 left_alt_pressed: bool,
54 right_alt_pressed: bool,
55 left_control_pressed: bool,
56 right_control_pressed: bool,
57 left_shift_pressed: bool,
5851 right_shift_pressed: bool,
59 _pad1: u6,
60 sys_req_pressed: bool,
52 left_shift_pressed: bool,
53 right_control_pressed: bool,
54 left_control_pressed: bool,
55 right_alt_pressed: bool,
56 left_alt_pressed: bool,
57 right_logo_pressed: bool,
58 left_logo_pressed: bool,
6159 menu_key_pressed: bool,
62 _pad2: u15,
60 sys_req_pressed: bool,
61 _pad1: u21,
6362 shift_state_valid: bool,
6463 },
6564 key_toggle_state: packed struct {
66 toggle_state_valid: bool,
67 _pad1: u2,
68 key_state_exposed: bool,
69 caps_lock_active: bool,
70 _pad2: u1,
71 num_lock_active: bool,
7265 scroll_lock_active: bool,
66 num_lock_active: bool,
67 caps_lock_active: bool,
68 _pad1: u3,
69 key_state_exposed: bool,
70 toggle_state_valid: bool,
7371 },
7472};
7573