Commit 5e874a89b9

Nick Erdmann <n@nirf.de>
2019-09-02 22:31:59
std/os/uefi: fix ordering of packed bit fields
1 parent 8db41b7
std/os/uefi/protocols/absolute_pointer_protocol.zig
@@ -35,10 +35,9 @@ pub const AbsolutePointerMode = extern struct {
     absolute_max_y: u64,
     absolute_max_z: u64,
     attributes: packed struct {
-        _pad1: u6,
-        supports_pressure_as_z: bool,
         supports_alt_active: bool,
-        _pad2: u24,
+        supports_pressure_as_z: bool,
+        _pad1: u30,
     },
 };
 
@@ -47,9 +46,8 @@ pub const AbsolutePointerState = extern struct {
     current_y: u64 = undefined,
     current_z: u64 = undefined,
     active_buttons: packed struct {
-        _pad1: u6,
-        alt_active: bool,
         touch_active: bool,
-        _pad2: u24,
+        alt_active: bool,
+        _pad1: u30,
     } = undefined,
 };
std/os/uefi/protocols/edid_override_protocol.zig
@@ -22,8 +22,7 @@ pub const EdidOverrideProtocol = extern struct {
 };
 
 pub const EdidOverrideProtocolAttributes = packed struct {
-    _pad1: u6,
-    enable_hot_plug: bool,
     dont_override: bool,
-    _pad2: u24,
+    enable_hot_plug: bool,
+    _pad1: u30,
 };
std/os/uefi/protocols/simple_text_input_ex_protocol.zig
@@ -48,28 +48,26 @@ pub const KeyData = extern struct {
 
 pub const KeyState = extern struct {
     key_shift_state: packed struct {
-        left_logo_pressed: bool,
-        right_logo_pressed: bool,
-        left_alt_pressed: bool,
-        right_alt_pressed: bool,
-        left_control_pressed: bool,
-        right_control_pressed: bool,
-        left_shift_pressed: bool,
         right_shift_pressed: bool,
-        _pad1: u6,
-        sys_req_pressed: bool,
+        left_shift_pressed: bool,
+        right_control_pressed: bool,
+        left_control_pressed: bool,
+        right_alt_pressed: bool,
+        left_alt_pressed: bool,
+        right_logo_pressed: bool,
+        left_logo_pressed: bool,
         menu_key_pressed: bool,
-        _pad2: u15,
+        sys_req_pressed: bool,
+        _pad1: u21,
         shift_state_valid: bool,
     },
     key_toggle_state: packed struct {
-        toggle_state_valid: bool,
-        _pad1: u2,
-        key_state_exposed: bool,
-        caps_lock_active: bool,
-        _pad2: u1,
-        num_lock_active: bool,
         scroll_lock_active: bool,
+        num_lock_active: bool,
+        caps_lock_active: bool,
+        _pad1: u3,
+        key_state_exposed: bool,
+        toggle_state_valid: bool,
     },
 };