Disable audio on Windows, and clarify the game isn't for mobile. #430 [rebuild] [release]

This commit is contained in:
Dustin Carlino 2020-12-21 10:25:58 -08:00
parent d0995f5b77
commit f24a77e995
3 changed files with 9 additions and 2 deletions

View File

@ -22,7 +22,7 @@ Contact <dabreegster@gmail.com> with any feedback or
- [Mac](https://github.com/dabreegster/abstreet/releases/download/v0.2.23/abstreet_mac_v0_2_23.zip)
- [Linux](https://github.com/dabreegster/abstreet/releases/download/v0.2.23/abstreet_linux_v0_2_23.zip)
Unzip, then run `santa.exe` or `santa`.
Unzip, then run `santa.exe` or `santa`. No mobile/tablet support, sorry -- you need a keyboard.
## FAQ

View File

@ -11,7 +11,7 @@ use crate::tools::PopupMsg;
use crate::AppLike;
// Update this ___before___ pushing the commit with "[rebuild] [release]".
const NEXT_RELEASE: &str = "0.2.24";
const NEXT_RELEASE: &str = "0.2.23";
pub struct Picker<A: AppLike> {
panel: Panel,

View File

@ -90,6 +90,13 @@ impl Music {
impl Inner {
fn new(ctx: &mut EventCtx, play_music: bool, song: &str) -> Result<Inner, Box<dyn Error>> {
if cfg!(windows) {
return Err(
"Audio disabled on Windows: https://github.com/dabreegster/abstreet/issues/430"
.into(),
);
}
let (stream, stream_handle) = OutputStream::try_default()?;
let sink = rodio::Sink::try_new(&stream_handle)?;