Fix -Wundef warnings due to use of unguarded SDL_AUDIO_DRIVER_DSOUND

This commit is contained in:
Anonymous Maarten
2023-03-27 15:10:14 +02:00
parent 882df72ccd
commit e0f66bcbf5
2 changed files with 3 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ static const AudioBootStrap *const bootstrap[] = {
#ifdef SDL_AUDIO_DRIVER_WASAPI
&WASAPI_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_DSOUND
#ifdef SDL_AUDIO_DRIVER_DSOUND
&DSOUND_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_HAIKU
@@ -901,7 +901,7 @@ int SDL_InitAudio(const char *driver_name)
const char *driver_attempt_end = SDL_strchr(driver_attempt, ',');
size_t driver_attempt_len = (driver_attempt_end != NULL) ? (driver_attempt_end - driver_attempt)
: SDL_strlen(driver_attempt);
#if SDL_AUDIO_DRIVER_DSOUND
#ifdef SDL_AUDIO_DRIVER_DSOUND
/* SDL 1.2 uses the name "dsound", so we'll support both. */
if (driver_attempt_len == SDL_strlen("dsound") &&
(SDL_strncasecmp(driver_attempt, "dsound", driver_attempt_len) == 0)) {

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_AUDIO_DRIVER_DSOUND
#ifdef SDL_AUDIO_DRIVER_DSOUND
/* Allow access to a raw mixing buffer */