apprt/embedded: fix initialization on macOS

This commit is contained in:
Mitchell Hashimoto
2024-01-18 08:55:03 -08:00
parent df09c21103
commit 01afa293c8
4 changed files with 27 additions and 9 deletions

View File

@@ -466,7 +466,9 @@ pub fn finalizeSurfaceInit(self: *const Metal, surface: *apprt.Surface) !void {
},
apprt.embedded => .{
.view = surface.nsview,
.view = switch (surface.platform) {
.macos => |v| v.nsview,
},
.scaleFactor = @floatCast(surface.content_scale.x),
},