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