diff --git a/Pomelo/Emulation/EmulationHandlers/SudachiEmulationHandler.swift b/Pomelo/Emulation/EmulationHandlers/SudachiEmulationHandler.swift index b90229a..fd827ef 100644 --- a/Pomelo/Emulation/EmulationHandlers/SudachiEmulationHandler.swift +++ b/Pomelo/Emulation/EmulationHandlers/SudachiEmulationHandler.swift @@ -49,15 +49,29 @@ class SudachiEmulationViewModel: ObservableObject { // startGameTimer() // Start the timer when the game starts - DispatchQueue.global(qos: .userInitiated).async { [self] in - if let sudachiGame = self.sudachiGame { - if sudachiGame.fileURL == URL(string: "BootMii") { - self.sudachi.bootMii() + if #available(iOS 17.0, *) { + DispatchQueue.global(qos: .userInitiated).async { [self] in + if let sudachiGame = self.sudachiGame { + if sudachiGame.fileURL == URL(string: "BootMii") { + self.sudachi.bootMii() + } else { + self.sudachi.insert(game: sudachiGame.fileURL) + } } else { - self.sudachi.insert(game: sudachiGame.fileURL) + self.sudachi.bootOS() + } + } + } else { + DispatchQueue.main.async { + if let sudachiGame = self.sudachiGame { + if sudachiGame.fileURL == URL(string: "BootMii") { + self.sudachi.bootMii() + } else { + self.sudachi.insert(game: sudachiGame.fileURL) + } + } else { + self.sudachi.bootOS() } - } else { - self.sudachi.bootOS() } }