1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Set the ALSA default configdir if not defined

It should fix the use of ALSA when pulseaudio is not
available.

It concerns the issue #67.
This commit is contained in:
Mathieu Schroeter 2018-08-15 07:25:35 +02:00
parent f11514e5e5
commit 8c7f1ed329

View File

@ -756,6 +756,15 @@ DoInit (int argc, char * argv[], bool & exit)
return EXIT_FAILURE;
}
#ifdef __LINUX__
if (!getenv ("ALSA_CONFIG_DIR"))
{
char env[256];
snprintf (env, sizeof (env), "ALSA_CONFIG_DIR=/usr/share/alsa");
putenv (env);
}
#endif /* __LINUX__ */
#ifdef _WIN32
/* Fix laggy sounds on Windows by not using winmm driver. */
SDL_setenv ("SDL_AUDIODRIVER", "directsound", true);