1
Fork 0
mirror of https://github.com/RGBCube/DOOM-fire-zig synced 2025-07-28 09:37:44 +00:00

fix: use libc winsize

This commit is contained in:
Jacob Hinchliffe 2022-01-16 23:08:43 +00:00
parent c59622add0
commit 089ddd6d53

View file

@ -146,7 +146,7 @@ pub fn initColor() void {
//get terminal size given a tty
pub fn getTermSz(tty: std.os.fd_t) !TermSz {
var winsz = std.os.system.winsize{ .ws_col = 0, .ws_row = 0, .ws_xpixel = 0, .ws_ypixel = 0 };
var winsz = c.winsize{ .ws_col = 0, .ws_row = 0, .ws_xpixel = 0, .ws_ypixel = 0 };
const rv = std.os.system.ioctl(tty, TIOCGWINSZ, @ptrToInt(&winsz));
const err = std.os.errno(rv);
if (rv == 0) {