diff options
-rw-r--r-- | src/main.zig | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main.zig b/src/main.zig index cc3ae26..b146834 100644 --- a/src/main.zig +++ b/src/main.zig @@ -7,16 +7,12 @@ pub fn main() !void { defer c.mgl_deinit(); var window: c.mgl_window = undefined; - var create_params = std.mem.zeroes(c.mgl_window_create_params); - create_params.size = .{ .x = 1280, .y = 720 }; - - if (c.mgl_window_create(&window, "mgl", &create_params) != 0) + if (c.mgl_window_create(&window, "mgl", &.{ .size = .{ .x = 1280, .y = 720 } }) != 0) return error.MglFailedToCreateWindow; defer c.mgl_window_deinit(&window); var font_file: c.mgl_memory_mapped_file = undefined; - var file_load_options = c.mgl_memory_mapped_file_load_options{ .readable = true, .writable = false }; - if (c.mgl_mapped_file_load("/usr/share/fonts/noto/NotoSans-Regular.ttf", &font_file, &file_load_options) != 0) + if (c.mgl_mapped_file_load("/usr/share/fonts/noto/NotoSans-Regular.ttf", &font_file, &.{ .readable = true, .writable = false }) != 0) return error.MglFailedToLoadFontFile; defer c.mgl_mapped_file_unload(&font_file); |