mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-26 17:37:03 +00:00
qt: Do not run emulator on separate thread on Mac. (#1849)
This commit is contained in:
parent
14dc136832
commit
ab5240d8d2
|
@ -1098,10 +1098,16 @@ void MainWindow::StartEmulator(std::filesystem::path path) {
|
|||
QMessageBox::critical(nullptr, tr("Run Game"), QString(tr("Game is already running!")));
|
||||
return;
|
||||
}
|
||||
isGameRunning = true;
|
||||
#ifdef __APPLE__
|
||||
// SDL on macOS requires main thread.
|
||||
Core::Emulator emulator;
|
||||
emulator.Run(path);
|
||||
#else
|
||||
std::thread emulator_thread([=] {
|
||||
Core::Emulator emulator;
|
||||
emulator.Run(path);
|
||||
});
|
||||
emulator_thread.detach();
|
||||
isGameRunning = true;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue