URI: 
       Play can now be aborted. - icy_draw - icy_draw is the successor to mystic draw. fork / mirror
  HTML git clone https://git.drkhsh.at/icy_draw.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 7cb16aabcbb9827209e54bc2df89bcaf4798f41c
   DIR parent bdd8fd580f3c987aff9782148a11b76fa06617cc
  HTML Author: Mike Krüger <mkrueger@posteo.de>
       Date:   Thu, 28 Sep 2023 22:05:48 +0200
       
       Play can now be aborted.
       
       Diffstat:
         M crates/icy_play/src/main.rs         |      14 ++++++++++++++
       
       1 file changed, 14 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/crates/icy_play/src/main.rs b/crates/icy_play/src/main.rs
       @@ -104,6 +104,20 @@ fn main() {
                                match args.command.unwrap_or(Commands::Play) {
                                    Commands::Play => {
                                        for (buffer, _, delay) in animator.frames.iter() {
       +                                    match io.read() {
       +                                        Ok(v) => {
       +                                            if let Some(v) = v {
       +                                                if v.contains(&b'\x1b') || v.contains(&b'\n') || v.contains(&b' ') {
       +                                                    return;
       +                                                }
       +                                            }
       +                                        },
       +                                        Err(_) => {
       +                                            eprintln!("Connection aborted.");
       +                                            return;
       +                                        },
       +                                    }
       +
                                            show_buffer(&mut io, buffer, false, args.utf8, &term).unwrap();
                                            std::thread::sleep(Duration::from_millis(*delay as u64));
                                        }