forked from MeloNX/MeloNX
Make SDL Init on the Main Thread
This commit is contained in:
parent
f632f16449
commit
60cfb86774
Binary file not shown.
@ -21,6 +21,7 @@ struct ContentView: View {
|
|||||||
@State var debugmode: Int = 0
|
@State var debugmode: Int = 0
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
DispatchQueue.main.async {
|
||||||
SDL_SetMainReady()
|
SDL_SetMainReady()
|
||||||
SDL_iPhoneSetEventPump(SDL_TRUE)
|
SDL_iPhoneSetEventPump(SDL_TRUE)
|
||||||
|
|
||||||
@ -33,6 +34,7 @@ struct ContentView: View {
|
|||||||
fatalError("Failed to load Vulkan library: \(String(cString: SDL_GetError()))")
|
fatalError("Failed to load Vulkan library: \(String(cString: SDL_GetError()))")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user