authorgravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-08-06 18:06:18+02:00
committergravatar for n@nirf.deNick Erdmann <n@nirf.de> 2019-08-06 18:06:18+02:00
log88fdb303ff7a33d87207bbd61a648c5c1dbe56ad
tree430d4b69cfd6a4c42159864bfe67fd27f017f762
parent20ce0b9952167d531f0a0e679c1b0409e9049d09
signaturelock-open Commit is signed but in an unrecognized format.

std/os/uefi: replace init() with default values


4 files changed, 17 insertions(+), 54 deletions(-)

std/os/uefi/protocols/absolute_pointer_protocol.zig+4-13
......@@ -43,22 +43,13 @@ pub const AbsolutePointerMode = extern struct {
4343};
4444
4545pub const AbsolutePointerState = extern struct {
46 current_x: u64,
47 current_y: u64,
48 current_z: u64,
46 current_x: u64 = undefined,
47 current_y: u64 = undefined,
48 current_z: u64 = undefined,
4949 active_buttons: packed struct {
5050 _pad1: u6,
5151 alt_active: bool,
5252 touch_active: bool,
5353 _pad2: u24,
54 },
55
56 pub fn init() AbsolutePointerState {
57 return AbsolutePointerState{
58 .current_x = undefined,
59 .current_y = undefined,
60 .current_z = undefined,
61 .active_buttons = undefined,
62 };
63 }
54 } = undefined,
6455};
std/os/uefi/protocols/graphics_output_protocol.zig+6-17
......@@ -40,23 +40,12 @@ pub const GraphicsOutputProtocolMode = extern struct {
4040};
4141
4242pub const GraphicsOutputModeInformation = extern struct {
43 version: u32,
44 horizontal_resolution: u32,
45 vertical_resolution: u32,
46 pixel_format: GraphicsPixelFormat,
47 pixel_information: PixelBitmask,
48 pixels_per_scan_line: u32,
49
50 pub fn init() GraphicsOutputModeInformation {
51 return GraphicsOutputModeInformation{
52 .version = undefined,
53 .horizontal_resolution = undefined,
54 .vertical_resolution = undefined,
55 .pixel_format = undefined,
56 .pixel_information = undefined,
57 .pixels_per_scan_line = undefined,
58 };
59 }
43 version: u32 = undefined,
44 horizontal_resolution: u32 = undefined,
45 vertical_resolution: u32 = undefined,
46 pixel_format: GraphicsPixelFormat = undefined,
47 pixel_information: PixelBitmask = undefined,
48 pixels_per_scan_line: u32 = undefined,
6049};
6150
6251pub const GraphicsPixelFormat = extern enum(u32) {
std/os/uefi/protocols/simple_pointer_protocol.zig+5-15
......@@ -36,19 +36,9 @@ pub const SimplePointerMode = struct {
3636};
3737
3838pub const SimplePointerState = struct {
39 relative_movement_x: i32,
40 relative_movement_y: i32,
41 relative_movement_z: i32,
42 left_button: bool,
43 right_button: bool,
44
45 pub fn init() SimplePointerState {
46 return SimplePointerState{
47 .relative_movement_x = undefined,
48 .relative_movement_y = undefined,
49 .relative_movement_z = undefined,
50 .left_button = undefined,
51 .right_button = undefined,
52 };
53 }
39 relative_movement_x: i32 = undefined,
40 relative_movement_y: i32 = undefined,
41 relative_movement_z: i32 = undefined,
42 left_button: bool = undefined,
43 right_button: bool = undefined,
5444};
std/os/uefi/protocols/simple_text_input_ex_protocol.zig+2-9
......@@ -42,15 +42,8 @@ pub const SimpleTextInputExProtocol = extern struct {
4242};
4343
4444pub const KeyData = extern struct {
45 key: InputKey,
46 key_state: KeyState,
47
48 pub fn init() KeyData {
49 return KeyData{
50 .key = undefined,
51 .key_state = undefined,
52 };
53 }
45 key: InputKey = undefined,
46 key_state: KeyState = undefined,
5447};
5548
5649pub const KeyState = extern struct {