survivor

graphical action game for the linux terminal
git clone https://git.ce9e.org/survivor.git

commit
0a13f0e271ea9cfafa7445ba64456af28c7a3412
parent
cdb920b61cfaad64214278c667db223db0ba4634
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2025-02-23 09:42
use libc::STDOUT_FILENO

Diffstat

M src/term.rs 2 +-

1 files changed, 1 insertions, 1 deletions


diff --git a/src/term.rs b/src/term.rs

@@ -4,7 +4,7 @@ fn get_terminal_size() -> (usize, usize) {
    4     4     let mut w: libc::winsize;
    5     5     unsafe {
    6     6         w = std::mem::zeroed();
    7    -1         libc::ioctl(1, libc::TIOCGWINSZ, &mut w);
   -1     7         libc::ioctl(libc::STDOUT_FILENO, libc::TIOCGWINSZ, &mut w);
    8     8     }
    9     9     return (w.ws_col as usize, w.ws_row as usize);
   10    10 }