If the `video_display` setting is invalid (for example, due to a
disconnected monitor), it was reset on `I_GetWindowPosition`, which
is called during video initialization.
However, commit dc4182d6d81f ("add exclusive fullscreen to the menu")
reordered the initialization logic. As a result, an invalid
`video_display` can be passed to `SDL_GetCurrentDisplayMode`, causing
Woof to exit before the `video_display` reset logic is run.
Commit cab179594848 ("i_video.c refactor, resize upscaled texture on
window resize") somewhat mitigates the problem, but an exit still
happens when `fullscreen = 1` and `exclusive_fullscreen = 1`.
Fix this by moving the `video_display` reset logic to a separate
function which is called at the very start of video initialization.
winmm_complevel:
0: Vanilla (Emulates DMX MPU-401 mode)
1: Standard (Emulates MS GS Synth) (Default)
2: Full (Send everything to device, including SysEx)
* add -dumptables arg to export generated translation tables to PWAD
Fixes#1033
* start messages on a new line
* Revert "start messages on a new line"
This reverts commit 3896f9d49fecd6a17862cd19ad7b76c4dcd29c34.
* proper new line in message output
* move input code to i_input.c
* factor I_ResetGraphicsMode() from I_InitGraphicsMode()
* resize upscaled texture on window resize
* cosmetic changes
* move global variables to the top, remove extern
* restore original MBF format of "draws little dots..."
* reformat I_SetPalette for consistency
The MIDI player fallback logic was to initialize `module 0 device 0`.
However, it is possible that this fallback also fails.
A scenario where this happens is when running on Linux with FluidSynth
but no soundfonts. In this case, FluidSynth will fail to initialize, the
fallback will try to use FluidSynth again, which will fail again, and
since the return code of `module->I_InitMusic` is not checked, the module
will stay uninitialized and will cause a crash a bit later.
To fix this, implement a more robust fallback logic which tries to
initialize each music module. This logic will always succeed since in
the worst case it will fallback to OPL, which currently never fails.
Fixes: 2f27fa739a1a ("fall back to `module 0 device 0` if the music module failed to initialize")