SDL2: Fix a compilation error due.

This is due to calling an internal miniaudio function.
This commit is contained in:
David Reid
2026-01-02 14:14:10 +10:00
parent da764a5a28
commit ce41f6cfc9
+2 -2
View File
@@ -322,7 +322,7 @@ static ma_result ma_context_enumerate_devices__sdl(ma_context* pContext, ma_enum
/* Default. For SDL2 we'll just use the first device that matches the default device name. */ /* Default. For SDL2 we'll just use the first device that matches the default device name. */
if (!hasDefaultPlaybackDeviceBeenEnumerated && hasDefaultPlaybackDevice) { if (!hasDefaultPlaybackDeviceBeenEnumerated && hasDefaultPlaybackDevice) {
const char* pDeviceName = pContextStateSDL->SDL_GetAudioDeviceName(iDevice, 0); const char* pDeviceName = pContextStateSDL->SDL_GetAudioDeviceName(iDevice, 0);
if (ma_strcmp(pDeviceName, pDefaultPlaybackDeviceName) == 0) { if (strcmp(pDeviceName, pDefaultPlaybackDeviceName) == 0) {
deviceInfo.isDefault = MA_TRUE; deviceInfo.isDefault = MA_TRUE;
hasDefaultPlaybackDeviceBeenEnumerated = MA_TRUE; hasDefaultPlaybackDeviceBeenEnumerated = MA_TRUE;
} }
@@ -388,7 +388,7 @@ static ma_result ma_context_enumerate_devices__sdl(ma_context* pContext, ma_enum
/* Default. For SDL2 we'll just use the first device that matches the default device name. */ /* Default. For SDL2 we'll just use the first device that matches the default device name. */
if (!hasDefaultCaptureDeviceBeenEnumerated && hasDefaultCaptureDevice) { if (!hasDefaultCaptureDeviceBeenEnumerated && hasDefaultCaptureDevice) {
const char* pDeviceName = pContextStateSDL->SDL_GetAudioDeviceName(iDevice, 1); const char* pDeviceName = pContextStateSDL->SDL_GetAudioDeviceName(iDevice, 1);
if (ma_strcmp(pDeviceName, pDefaultCaptureDeviceName) == 0) { if (strcmp(pDeviceName, pDefaultCaptureDeviceName) == 0) {
deviceInfo.isDefault = MA_TRUE; deviceInfo.isDefault = MA_TRUE;
hasDefaultCaptureDeviceBeenEnumerated = MA_TRUE; hasDefaultCaptureDeviceBeenEnumerated = MA_TRUE;
} }