mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
fixed bugs
This commit is contained in:
6
flake.lock
generated
6
flake.lock
generated
@ -109,11 +109,11 @@
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1666872658,
|
||||
"narHash": "sha256-o7bZWBdkoCnpN4E0tJZ3mOYJFy0AG4HoSqOfdnQLiw4=",
|
||||
"lastModified": 1667045313,
|
||||
"narHash": "sha256-vKrdqq66EF35cjArFQfKmXXPdft+3BiNyjDoR9boYLo=",
|
||||
"owner": "mitchellh",
|
||||
"repo": "zig-overlay",
|
||||
"rev": "22bdb1d6b2e313acf185a2f43bd39c5c25f369ae",
|
||||
"rev": "0c9b9364efc23e3765601a583f963e704cc8a919",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -35,14 +35,10 @@ pub fn unload() void {
|
||||
context = undefined;
|
||||
}
|
||||
|
||||
pub fn versionMajor(res: c_int) c_uint {
|
||||
// https://github.com/ziglang/zig/issues/13162
|
||||
// return c.GLAD_VERSION_MAJOR(res);
|
||||
return @intCast(c_uint, @divTrunc(res, 10000));
|
||||
pub fn versionMajor(res: c_uint) c_uint {
|
||||
return c.GLAD_VERSION_MAJOR(res);
|
||||
}
|
||||
|
||||
pub fn versionMinor(res: c_int) c_uint {
|
||||
// https://github.com/ziglang/zig/issues/13162
|
||||
// return c.GLAD_VERSION_MINOR(res);
|
||||
return @intCast(c_uint, @mod(res, 10000));
|
||||
pub fn versionMinor(res: c_uint) c_uint {
|
||||
return c.GLAD_VERSION_MINOR(res);
|
||||
}
|
||||
|
@ -430,8 +430,8 @@ pub fn threadEnter(self: *const OpenGL, window: glfw.Window) !void {
|
||||
});
|
||||
errdefer gl.glad.unload();
|
||||
log.info("loaded OpenGL {}.{}", .{
|
||||
gl.glad.versionMajor(version),
|
||||
gl.glad.versionMinor(version),
|
||||
gl.glad.versionMajor(@intCast(c_uint, version)),
|
||||
gl.glad.versionMinor(@intCast(c_uint, version)),
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user