diff --git a/src/renderer/Metal.zig b/src/renderer/Metal.zig index aebbc5c39..7b1b83b8d 100644 --- a/src/renderer/Metal.zig +++ b/src/renderer/Metal.zig @@ -622,7 +622,7 @@ pub fn init(alloc: Allocator, options: renderer.Options) !Metal { }; errdefer if (display_link) |v| v.release(); - return Metal{ + var result: Metal = .{ .alloc = alloc, .config = options.config, .surface_mailbox = options.surface_mailbox, @@ -663,6 +663,12 @@ pub fn init(alloc: Allocator, options: renderer.Options) !Metal { .custom_shader_state = custom_shader_state, .gpu_state = gpu_state, }; + + // Do an initialize screen size setup to ensure our undefined values + // above are initialized. + try result.setScreenSize(result.size); + + return result; } pub fn deinit(self: *Metal) void { diff --git a/src/renderer/Options.zig b/src/renderer/Options.zig index d1f0f7996..e7d9b3a42 100644 --- a/src/renderer/Options.zig +++ b/src/renderer/Options.zig @@ -20,12 +20,3 @@ surface_mailbox: apprt.surface.Mailbox, /// The apprt surface. rt_surface: *apprt.Surface, - -pub const Padding = struct { - // Explicit padding options, in pixels. The surface thread is - // expected to convert points to pixels for a given DPI. - explicit: renderer.Padding, - - // Balance options - balance: bool = false, -};