mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-10 06:51:54 +00:00
initialize sdl2 by the fluidsynth executable
This commit is contained in:
parent
c8b455ca7a
commit
5b2b5e6659
1 changed files with 16 additions and 0 deletions
|
@ -35,6 +35,10 @@
|
|||
#include <systemd/sd-daemon.h>
|
||||
#endif
|
||||
|
||||
#if SDL2_SUPPORT
|
||||
#include <SDL.h>
|
||||
#endif
|
||||
|
||||
void print_usage(void);
|
||||
void print_help(fluid_settings_t *settings);
|
||||
void print_welcome(void);
|
||||
|
@ -345,6 +349,18 @@ int main(int argc, char **argv)
|
|||
|
||||
lash_args = fluid_lash_extract_args(&argc, &argv);
|
||||
#endif
|
||||
|
||||
#if SDL2_SUPPORT
|
||||
if (SDL_Init(SDL_INIT_AUDIO) != 0)
|
||||
{
|
||||
fprintf(stderr, "Warning: Unable to initialize SDL2 Audio: %s", SDL_GetError());
|
||||
}
|
||||
else
|
||||
{
|
||||
atexit(SDL_Quit);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
print_welcome();
|
||||
|
||||
|
|
Loading…
Reference in a new issue