Skip to content

Fix build by disabling mpg123 and libflac #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion External/SDL
Submodule SDL updated 79 files
+1 −1 .github/workflows/release.yml
+0 −4 Android.mk
+23 −28 CMakeLists.txt
+1 −1 android-project/app/build.gradle
+0 −3 android-project/app/jni/Application.mk
+0 −5 android-project/app/jni/src/CMakeLists.txt
+6 −6 build-scripts/SDL_migration.cocci
+0 −7 build-scripts/androidbuildlibs.sh
+4 −0 build-scripts/build-release.py
+1 −1 build-scripts/release-info.json
+15 −1 cmake/sdlchecks.cmake
+5 −2 cmake/sdlplatform.cmake
+2 −2 include/SDL3/SDL_assert.h
+1 −1 include/SDL3/SDL_camera.h
+1 −1 include/SDL3/SDL_endian.h
+1 −1 include/SDL3/SDL_filesystem.h
+6 −6 include/SDL3/SDL_gamepad.h
+2 −2 include/SDL3/SDL_gpu.h
+1 −1 include/SDL3/SDL_hints.h
+10 −0 include/SDL3/SDL_platform_defines.h
+5 −2 include/SDL3/SDL_rect.h
+1 −1 include/SDL3/SDL_render.h
+9 −9 include/SDL3/SDL_stdinc.h
+0 −19 include/SDL3/SDL_tray.h
+3 −4 include/SDL3/SDL_video.h
+2 −1 include/build_config/SDL_build_config.h.cmake
+2 −0 src/SDL.c
+2 −2 src/audio/SDL_wave.c
+2 −1 src/audio/coreaudio/SDL_coreaudio.m
+3 −2 src/core/android/SDL_android.c
+7 −26 src/core/linux/SDL_fcitx.c
+2 −2 src/core/unix/SDL_appid.c
+6 −3 src/core/unix/SDL_gtk.c
+3 −2 src/core/unix/SDL_gtk.h
+0 −1 src/dynapi/SDL_dynapi.sym
+0 −1 src/dynapi/SDL_dynapi_overrides.h
+0 −1 src/dynapi/SDL_dynapi_procs.h
+0 −1 src/events/SDL_events.c
+6 −0 src/events/SDL_windowevents.c
+17 −4 src/gpu/vulkan/SDL_gpu_vulkan.c
+2 −3 src/haptic/linux/SDL_syshaptic.c
+34 −31 src/joystick/SDL_gamepad.c
+1 −1 src/joystick/SDL_joystick.c
+6 −0 src/joystick/gdk/SDL_gameinputjoystick.cpp
+19 −13 src/joystick/hidapi/SDL_hidapi_sinput.c
+1 −1 src/joystick/usb_ids.h
+1 −1 src/joystick/virtual/SDL_virtualjoystick.c
+0 −4 src/render/SDL_render.c
+1 −1 src/render/vulkan/SDL_render_vulkan.c
+0 −10 src/tray/cocoa/SDL_tray.m
+0 −5 src/tray/dummy/SDL_tray.c
+48 −39 src/tray/unix/SDL_tray.c
+0 −10 src/tray/windows/SDL_tray.c
+1 −0 src/video/SDL_sysvideo.h
+46 −3 src/video/SDL_video.c
+20 −5 src/video/android/SDL_androidtouch.c
+1 −0 src/video/android/SDL_androidtouch.h
+13 −0 src/video/cocoa/SDL_cocoawindow.m
+12 −1 src/video/uikit/SDL_uikitviewcontroller.m
+11 −2 src/video/wayland/SDL_waylandevents.c
+1 −1 src/video/wayland/SDL_waylandvideo.c
+1 −1 src/video/windows/SDL_windowsevents.c
+1 −1 src/video/x11/SDL_x11dyn.h
+278 −138 src/video/x11/SDL_x11events.c
+1 −0 src/video/x11/SDL_x11events.h
+232 −151 src/video/x11/SDL_x11keyboard.c
+0 −1 src/video/x11/SDL_x11keyboard.h
+68 −63 src/video/x11/SDL_x11modes.c
+2 −0 src/video/x11/SDL_x11modes.h
+1 −0 src/video/x11/SDL_x11mouse.h
+16 −85 src/video/x11/SDL_x11settings.c
+1 −5 src/video/x11/SDL_x11settings.h
+7 −20 src/video/x11/SDL_x11sym.h
+2 −0 src/video/x11/SDL_x11video.c
+36 −13 src/video/x11/SDL_x11video.h
+1 −1 src/video/x11/SDL_x11window.c
+321 −81 src/video/x11/SDL_x11xinput2.c
+2 −2 src/video/x11/SDL_x11xinput2.h
+1 −1 test/testgles2.c
8 changes: 7 additions & 1 deletion External/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ run_cmake SDL_ttf ${OUTPUT_LIB/variant/_ttf} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_P
# TODO: Add support for avif on windows (VisualC script uses dynamic imports)
run_cmake SDL_image ${OUTPUT_LIB/variant/_image} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLIMAGE_AVIF=OFF -DSDLIMAGE_DEPS_SHARED=OFF -DSDLIMAGE_VENDORED=ON

run_cmake SDL_mixer ${OUTPUT_LIB/variant/_mixer} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLMIXER_DEPS_SHARED=OFF -DSDLMIXER_VENDORED=ON
# -DSDLMIXER_MP3_MPG123=OFF is used because upstream build is broken. Fallback to dr_mp3.
# See: https://github.com/libsdl-org/SDL_mixer/pull/744#issuecomment-3180682130
# Fixing using the proposed solution causes more issues.
#
# -DSDLMIXER_FLAC_LIBFLAC=OFF is used because the build fails on android-x86. Fallback to dr_flac.
# See: https://github.com/libsdl-org/SDL_mixer/issues/745
run_cmake SDL_mixer ${OUTPUT_LIB/variant/_mixer} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DSDLMIXER_MP3_MPG123=OFF -DSDLMIXER_FLAC_LIBFLAC=OFF -DSDLMIXER_DEPS_SHARED=OFF -DSDLMIXER_VENDORED=ON

popd
4 changes: 0 additions & 4 deletions SDL3-CS/SDL3/ClangSharp/SDL_tray.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ public partial struct SDL_TrayEntry

public static unsafe partial class SDL3
{
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern SDLBool SDL_IsTraySupported();

[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern SDL_Tray* SDL_CreateTray(SDL_Surface* icon, [NativeTypeName("const char *")] byte* tooltip);

Expand Down
149 changes: 123 additions & 26 deletions SDL3_image-CS/SDL3_image/ClangSharp/SDL_image.g.cs

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions SDL3_ttf-CS/SDL3_ttf/ClangSharp/SDL_ttf.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,13 @@ public static unsafe partial class SDL3_ttf
[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern TTF_Direction TTF_GetFontDirection(TTF_Font* font);

[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("bool")]
public static extern SDLBool TTF_SetFontCharSpacing(TTF_Font* font, int spacing);

[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern int TTF_GetFontCharSpacing(TTF_Font* font);

[DllImport("SDL3_ttf", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("Uint32")]
public static extern uint TTF_StringToTag([NativeTypeName("const char *")] byte* @string);
Expand Down