mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 16:26:08 +03:00
workaround stage2 translate-c issue with link to issue
This commit is contained in:
@ -23,11 +23,13 @@ pub fn load(getProcAddress: anytype) !c_int {
|
||||
}
|
||||
|
||||
pub fn versionMajor(res: c_int) c_uint {
|
||||
// The intcast here is due to translate-c weirdness
|
||||
return c.GLAD_VERSION_MAJOR(@intCast(c_uint, res));
|
||||
// https://github.com/ziglang/zig/issues/13162
|
||||
// return c.GLAD_VERSION_MAJOR(res);
|
||||
return @intCast(c_uint, @divTrunc(res, 10000));
|
||||
}
|
||||
|
||||
pub fn versionMinor(res: c_int) c_uint {
|
||||
// The intcast here is due to translate-c weirdness
|
||||
return c.GLAD_VERSION_MINOR(@intCast(c_uint, res));
|
||||
// https://github.com/ziglang/zig/issues/13162
|
||||
// return c.GLAD_VERSION_MINOR(res);
|
||||
return @intCast(c_uint, @mod(res, 10000));
|
||||
}
|
||||
|
Reference in New Issue
Block a user