mohanson / gameboy

Full featured Cross-platform GameBoy emulator by Rust. Forever boys!.
MIT License
1.36k stars 79 forks source link

fix tty mode #27

Closed yazgoo closed 4 years ago

yazgoo commented 4 years ago

For tty mode, this fixes the following issues after the refactoring

  1. adds optional sound
  2. enable raw-mode to support keys
mohanson commented 4 years ago

You turned on the audio in the tty, but the reason why I turned off the audio is that I want to be able to compile and run the emulator normally without an audio device (for example, via ssh), what do you think?

yazgoo commented 4 years ago

Hi, SSH will still work with this since audio is disabled by default. My feeling is that the functionality will still be usefull in other cases.

mohanson commented 4 years ago

On computers without audio equipment (such as Linux server), cpal cannot be compiled. I hope to support this by adding tty mode. This requires audio to be disabled.

yazgoo commented 4 years ago

:ok_hand:, Here is a proposal (see adding audio feature commit):

add an "audio" flag, enabled by default. If one wants tty without audio, compile with: --no-default-features --features tty I one wants tty with audio, compile with: --no-default-features --features tty,audio

mohanson commented 4 years ago

Great!