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:
parent
f11514e5e5
commit
8c7f1ed329
@ -756,6 +756,15 @@ DoInit (int argc, char * argv[], bool & exit)
|
|||||||
return EXIT_FAILURE;
|
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
|
#ifdef _WIN32
|
||||||
/* Fix laggy sounds on Windows by not using winmm driver. */
|
/* Fix laggy sounds on Windows by not using winmm driver. */
|
||||||
SDL_setenv ("SDL_AUDIODRIVER", "directsound", true);
|
SDL_setenv ("SDL_AUDIODRIVER", "directsound", true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user