lemunozm / ruscii

Terminal graphics engine: build your games in the terminal!
Apache License 2.0
171 stars 15 forks source link

TTY support #3

Closed jiminycrick closed 1 year ago

jiminycrick commented 3 years ago

Hi. I was messing around with this crate and found that I get "Segmentation fault (core dumped)" when I try to run my game or any of the examples in the tty. They work fine when I have a desktop environment running.

Platform: Ubuntu 20.04 Steps to reproduce:

  1. Ctrl-Alt-F3 to access TTY.
  2. Login
  3. Navigate to project repository
  4. cargo run

I tried running with RUST_BACKTRACE=1 and full but it didn't print anything else to the console.

lemunozm commented 3 years ago

Hi @jiminycrick, thanks for reporting :)

Your error is due because the TTY does not make use of the X11 tools (since there is no UI as it). ruscii makes use of this X11 feature (and similar in MacOS/Windows) in order to observe key release events (there is not possible to do it directly with the TTY). At this moment, it is a requirement to use it.