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
|
// startGameTimer() // Start the timer when the game starts
|
||||||
DispatchQueue.global(qos: .userInitiated).async { [self] in
|
if #available(iOS 17.0, *) {
|
||||||
if let sudachiGame = self.sudachiGame {
|
DispatchQueue.global(qos: .userInitiated).async { [self] in
|
||||||
if sudachiGame.fileURL == URL(string: "BootMii") {
|
if let sudachiGame = self.sudachiGame {
|
||||||
self.sudachi.bootMii()
|
if sudachiGame.fileURL == URL(string: "BootMii") {
|
||||||
|
self.sudachi.bootMii()
|
||||||
|
} else {
|
||||||
|
self.sudachi.insert(game: sudachiGame.fileURL)
|
||||||
|
}
|
||||||
} else {
|
} 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