mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-28 03:16:23 +02:00
Make SDL Init on the Main Thread
This commit is contained in:
parent
f632f16449
commit
60cfb86774
2 changed files with 12 additions and 10 deletions
Binary file not shown.
|
@ -21,6 +21,7 @@ struct ContentView: View {
|
|||
@State var debugmode: Int = 0
|
||||
|
||||
init() {
|
||||
DispatchQueue.main.async {
|
||||
SDL_SetMainReady()
|
||||
SDL_iPhoneSetEventPump(SDL_TRUE)
|
||||
|
||||
|
@ -33,6 +34,7 @@ struct ContentView: View {
|
|||
fatalError("Failed to load Vulkan library: \(String(cString: SDL_GetError()))")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var body: some View {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue