diff --git a/MeloNX-XC/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate b/MeloNX-XC/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate index 3753bc03c..1eb47e136 100644 Binary files a/MeloNX-XC/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate and b/MeloNX-XC/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/MeloNX-XC/MeloNX/ContentView.swift b/MeloNX-XC/MeloNX/ContentView.swift index 3f5e1e5e0..689fbe450 100644 --- a/MeloNX-XC/MeloNX/ContentView.swift +++ b/MeloNX-XC/MeloNX/ContentView.swift @@ -21,16 +21,18 @@ struct ContentView: View { @State var debugmode: Int = 0 init() { - SDL_SetMainReady() - SDL_iPhoneSetEventPump(SDL_TRUE) - - - if SDL_Init(SDL_INIT_VIDEO) < 0 { - fatalError("Unable to initialize SDL: \(String(cString: SDL_GetError()))") - } - - if SDL_Vulkan_LoadLibrary(nil) != 0 { - fatalError("Failed to load Vulkan library: \(String(cString: SDL_GetError()))") + DispatchQueue.main.async { + SDL_SetMainReady() + SDL_iPhoneSetEventPump(SDL_TRUE) + + + if SDL_Init(SDL_INIT_VIDEO) < 0 { + fatalError("Unable to initialize SDL: \(String(cString: SDL_GetError()))") + } + + if SDL_Vulkan_LoadLibrary(nil) != 0 { + fatalError("Failed to load Vulkan library: \(String(cString: SDL_GetError()))") + } } }