mirror of
https://github.com/GayPizzaSpecifications/cxx-swift-interop.git
synced 2025-08-03 21:21:32 +00:00
SDL3 support
This commit is contained in:
@ -1,2 +1,2 @@
|
||||
add_executable(SwiftFrontend main.swift)
|
||||
target_link_libraries(SwiftFrontend PRIVATE CppBackend)
|
||||
target_link_libraries(SwiftFrontend PRIVATE CppBackend SDL3)
|
||||
|
@ -1,4 +1,9 @@
|
||||
import CppBackend
|
||||
import Foundation
|
||||
import SDL3
|
||||
|
||||
backend_init()
|
||||
print("Hello World")
|
||||
guard SDL_Init(SDL_INIT_VIDEO) >= 0 else {
|
||||
print("SDL init failed.")
|
||||
exit(0)
|
||||
}
|
||||
print("SDL init success.")
|
||||
SDL_Quit()
|
||||
|
Reference in New Issue
Block a user