Instead of creating the stream in `SoundManager`, it is now created in another thread called 'audio watchdog'. This thread restarts the stream when the audio device is disconnected. All information about the stream (such as the speed or volume of the music) is stored in `AudioContext` structure, which is inside `SoundManager`.
So even if the watchdog thread is destroyed for some reason, the sound manager will restart it and playback will continue. But this hasn't been tested, so maybe the application will just crash:)
The engine would previously use the upscaled spritesheet for the headbands since the "original_textures" setting is only used with the Nicalis releases.
SDL generates ControllerDeviceAdded events for controllers that are
already plugged in at the start of the game, but only if those are
recognized as game controllers at the time that we run SDL_Init.
Unfortunately, rust-sdl2 requires initializing SDL before we can call
load_mappings_from_read.
doukutsu-rs ships with this nice gamecontrollerdb.txt file built-into
the binary and loads it at startup, but previously it would not work for
controllers already plugged in before the game started because of the
above. This change works around the ordering issues between recognizing
devices as game controllers and event generation. Instead of using the
ControllerDeviceAdded events, we now use JoyDeviceAdded events. We still
check that the device is a supported game controller, and if it's not
supported then we skip it.
- Add application category and description
- Hide system navigation bar
- Change documents provider name to application name
- Disable multi-window mode support because touch controls don't work in this mode