From 49df948de25d28601469e9ca993f33530989ebd0 Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 29 Oct 2026 22:55:49 +0100 Subject: v3.0.0: cursor-driven roulette felt with splits and corners; drop schema migrations; require 80x24 --- src/bin/client/main.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/bin/client/main.rs') diff --git a/src/bin/client/main.rs b/src/bin/client/main.rs index 1b701d8..9018026 100644 --- a/src/bin/client/main.rs +++ b/src/bin/client/main.rs @@ -10,6 +10,21 @@ fn main() { let args: Vec = std::env::args().collect(); let unsafe_mode = args.iter().any(|arg| arg == "--unsafe"); + // Every game board is drawn in place, so refuse a terminal that cannot fit + // them before touching the network or the terminal mode. + let size = crossterm::terminal::size(); + let (columns, rows) = match &size { + Ok((columns, rows)) => (*columns, *rows), + Err(_) => (0, 0), + }; + if let Some(message) = zagan_bet::client::ui::terminal_too_small(columns, rows) { + eprintln!("{message}"); + if size.is_err() { + eprintln!("Could not read the terminal size (is this a real terminal?)."); + } + std::process::exit(1); + } + if unsafe_mode { println!("WARNING: Running in UNSAFE mode - certificate verification disabled!"); } -- cgit v1.2.3