mirror of https://github.com/ZDoom/fluidsynth.git
initialize sdl2 by the fluidsynth executable
This commit is contained in:
parent
c8b455ca7a
commit
5b2b5e6659
|
@ -35,6 +35,10 @@
|
||||||
#include <systemd/sd-daemon.h>
|
#include <systemd/sd-daemon.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if SDL2_SUPPORT
|
||||||
|
#include <SDL.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
void print_usage(void);
|
void print_usage(void);
|
||||||
void print_help(fluid_settings_t *settings);
|
void print_help(fluid_settings_t *settings);
|
||||||
void print_welcome(void);
|
void print_welcome(void);
|
||||||
|
@ -345,6 +349,18 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
lash_args = fluid_lash_extract_args(&argc, &argv);
|
lash_args = fluid_lash_extract_args(&argc, &argv);
|
||||||
#endif
|
#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();
|
print_welcome();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue