glfw: update system_sdk to match latest Zig master macOS version targeting
The latest Zig master supports specifying a specific macOS version for libc, via the target triple (ziglang/zig#10215): * x86_64-macos.10 (Catalina) * x86_64-macos.11 (Big Sur) * x86_64-macos.12 (Monterey) * aarch64-macos.11 (Big Sur) * aarch64-macos.12 (Monterey) Mach's `system_sdk.zig` can now download the relevant XCode framework stubs for Big Sur (11) and Monterey (12). Although we don't have an SDK for Catalina (10) currently, we use the Big Sur (11) SDK in that case and it generally works fine. By default, Zig targets the N-3 version (e.g. `x86_64-macos` defaults to `x86_64-macos.10`). Targeting the minimum supported version is useful for compatability, it guarantees the produced binary will run on any later macOS version. Targeting the newer version can be useful if you wish to use newer APIs not available in previous versions. Fixes hexops/mach#102 Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
f91ceef291
commit
1df13d0509
4 changed files with 18 additions and 11 deletions
|
|
@ -751,15 +751,15 @@ pub inline fn setSizeLimits(self: Window, min: Size, max: Size) Error!void {
|
|||
/// see also: window_sizelimits, glfw.Window.setSizeLimits
|
||||
pub inline fn setAspectRatio(self: Window, numerator: usize, denominator: usize) Error!void {
|
||||
internal_debug.assertInitialized();
|
||||
|
||||
|
||||
std.debug.assert(numerator != 0);
|
||||
std.debug.assert(denominator != 0);
|
||||
|
||||
|
||||
if (numerator != glfw.dont_care and denominator != glfw.dont_care) {
|
||||
std.debug.assert(numerator > 0);
|
||||
std.debug.assert(denominator > 0);
|
||||
}
|
||||
|
||||
|
||||
c.glfwSetWindowAspectRatio(self.handle, @intCast(c_int, numerator), @intCast(c_int, denominator));
|
||||
getError() catch |err| return switch (err) {
|
||||
Error.PlatformError => err,
|
||||
|
|
|
|||
|
|
@ -133,10 +133,10 @@ pub inline fn swapInterval(interval: isize) Error!void {
|
|||
/// see also: context_glext, glfw.getProcAddress
|
||||
pub inline fn extensionSupported(extension: [:0]const u8) Error!bool {
|
||||
internal_debug.assertInitialized();
|
||||
|
||||
|
||||
std.debug.assert(extension.len != 0);
|
||||
std.debug.assert(extension[0] != 0);
|
||||
|
||||
|
||||
const supported = c.glfwExtensionSupported(extension);
|
||||
getError() catch |err| return switch (err) {
|
||||
Error.NoCurrentContext => err,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue