Make Emulation on Main Thread
This commit is contained in:
parent
310a339433
commit
5e1a69e717
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user