mirror of
https://github.com/RGBCube/DOOM-fire-zig
synced 2025-07-28 17:47:45 +00:00
fix: use libc winsize
This commit is contained in:
parent
c59622add0
commit
089ddd6d53
1 changed files with 1 additions and 1 deletions
|
@ -146,7 +146,7 @@ pub fn initColor() void {
|
||||||
|
|
||||||
//get terminal size given a tty
|
//get terminal size given a tty
|
||||||
pub fn getTermSz(tty: std.os.fd_t) !TermSz {
|
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 rv = std.os.system.ioctl(tty, TIOCGWINSZ, @ptrToInt(&winsz));
|
||||||
const err = std.os.errno(rv);
|
const err = std.os.errno(rv);
|
||||||
if (rv == 0) {
|
if (rv == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue