mach: improve compatibility with self-hosted compiler
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
1c43f0f1e8
commit
192de6946e
2 changed files with 15 additions and 23 deletions
|
|
@ -341,8 +341,8 @@ pub const Platform = struct {
|
|||
try platform.window.setSize(.{ .width = options.width, .height = options.height });
|
||||
try platform.window.setTitle(options.title);
|
||||
try platform.window.setSizeLimits(
|
||||
@bitCast(glfw.Window.SizeOptional, options.size_min),
|
||||
@bitCast(glfw.Window.SizeOptional, options.size_max),
|
||||
glfwSizeOptional(options.size_min),
|
||||
glfwSizeOptional(options.size_max),
|
||||
);
|
||||
platform.core.target_desc.present_mode = switch (options.vsync) {
|
||||
.none => .immediate,
|
||||
|
|
@ -669,3 +669,10 @@ pub fn coreUpdate(core: *Core, resize: ?CoreResizeCallback) !void {
|
|||
core.current_desc = core.target_desc;
|
||||
}
|
||||
}
|
||||
|
||||
fn glfwSizeOptional(size: structs.SizeOptional) glfw.Window.SizeOptional {
|
||||
return .{
|
||||
.width = size.width,
|
||||
.height = size.height,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue