Settings

Theme

Combining SDL3 with SwiftUI

github.com

3 points by seaonion 2 months ago · 1 comment

Reader

seaonionOP 2 months ago

SDL3 and SwiftUI both assume they own the app lifecycle. When they coexist on iOS/tvOS/macOS, three specific collisions occur: SDL steals the keyboard, game controller input leaks through to the game while a dialog is open, and the B button dismisses dialogs without notifying the app. This is a minimal working example with fixes for all three.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection