Skip to content

Fixed build warnings and bugs found while adding swift package support (PR 2/3) - #16534

Open
jasonbobier wants to merge 7 commits into
libsdl-org:mainfrom
jasonbobier:apple-fixes
Open

jasonbobier wants to merge 7 commits into
libsdl-org:mainfrom
jasonbobier:apple-fixes

Conversation

@jasonbobier

@jasonbobier jasonbobier commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor
  • I confirm that I am the author of this code and release it to the SDL project under the zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Description

The PR is the 2nd of 3 (the first being #16300). It fixes various type conversion warnings, leaks, and bugs found while creating the swift package (which will be the 3rd PR).

With these fixes, swift build (once the package is merged) builds cleanly.

NOTE: This is a stacked PR on top of #16300.

Additional comments:

SDL.c

  • A build with video, audio and joystick disabled but camera enabled failed to compile because the helper was compiled out.

SDL_gpu_metal.m

  • The createinfo was never fully initialized and the props field had garbage. This was read in debug mode and caused a crash.

SDL_joystick.c

  • This looked like old code that hadn't been updated and it was causing the MFI driver to always be required.

SDL_render_metal.m

  • NSView declaration is always required on macOS, not just with cocoa video driver.

SDL_uikitviewcontroller.h
SDL_uikitviewcontroller.m

  • Moving this into a category stops the missing implementation warning with the implementation being in SDL_uikitviewcontroller.swift.
  • Also removed an extraneous SDL3-Swift.h that was no longer necessary.

testlock.c

  • Fixed a typo that caused issues when using the test.

testgles.c

  • OpenGL ES not supported on visionOS or macCatalyst.

testgles2.c

  • OpenGL ES not supported on macCatalyst.

testdynaudioreopen.c

  • Changed to standard resource lookup so that it will work with our resource bundles like other tests in the next PR.

…n-warnings

# Conflicts:
#	src/notification/cocoa/SDL_cocoanotification.m
# Conflicts:
#	src/notification/cocoa/SDL_cocoanotification.m
@slouken slouken added this to the 3.6.0 milestone Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants