Rename SDL2 backend source files.

This commit is contained in:
David Reid
2026-01-03 13:53:06 +10:00
parent 3df99ce51d
commit 44b39fe097
5 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -648,12 +648,12 @@ if(NOT MINIAUDIO_NO_DEVICEIO)
if(NOT MINIAUDIO_NO_SDL2)
add_library(miniaudio_sdl2 STATIC
extras/backends/sdl/backend_sdl.c
extras/backends/sdl/backend_sdl.h
extras/backends/sdl2/miniaudio_sdl2.c
extras/backends/sdl2/miniaudio_sdl2.h
)
list(APPEND LIBS_TO_INSTALL miniaudio_sdl2)
install(FILES extras/backends/sdl/backend_sdl.h DESTINATION include/miniaudio/extras/backends/sdl2)
install(FILES extras/backends/sdl2/miniaudio_sdl2.h DESTINATION include/miniaudio/extras/backends/sdl2)
target_include_directories(miniaudio_sdl2 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/extras/backends/sdl2)
target_compile_options (miniaudio_sdl2 PRIVATE ${COMPILE_OPTIONS})
+2 -2
View File
@@ -13,7 +13,7 @@ backends would actually get hit. By default, the `ma_backend_custom` backend is
#include "../miniaudio.c"
/* We're using SDL for this example. To use this in your own program, you need to include backend_sdl.h after miniaudio.h. */
#include "../extras/backends/sdl/backend_sdl.h"
#include "../extras/backends/sdl2/miniaudio_sdl2.h"
#ifdef __EMSCRIPTEN__
#include <emscripten.h>
@@ -146,4 +146,4 @@ int main(int argc, char** argv)
}
/* We put the SDL implementation here just to simplify the compilation process. This way you need only compile custom_backend.c. */
#include "../extras/backends/sdl/backend_sdl.c"
#include "../extras/backends/sdl2/miniaudio_sdl2.c"
@@ -12,7 +12,7 @@ which requires the `-s USE_SDL=2` option.
#include "../../../miniaudio.h"
#endif
#include "backend_sdl.h"
#include "miniaudio_sdl2.h"
#include <string.h> /* memset() */
#include <assert.h>
+1 -1
View File
@@ -49,7 +49,7 @@ If multiple backends are specified, the priority will be based on the order in w
are specified the last one on the command line will have priority.
*/
#include "../common/common.c"
#include "../../extras/backends/sdl/backend_sdl.c"
#include "../../extras/backends/sdl2/miniaudio_sdl2.c"
#if defined(MA_TESTS_INCLUDE_PIPEWIRE)
#include "../../extras/backends/pipewire/miniaudio_pipewire.h"