mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-27 18:16:23 +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!")));
|
QMessageBox::critical(nullptr, tr("Run Game"), QString(tr("Game is already running!")));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
isGameRunning = true;
|
||||||
|
#ifdef __APPLE__
|
||||||
|
// SDL on macOS requires main thread.
|
||||||
|
Core::Emulator emulator;
|
||||||
|
emulator.Run(path);
|
||||||
|
#else
|
||||||
std::thread emulator_thread([=] {
|
std::thread emulator_thread([=] {
|
||||||
Core::Emulator emulator;
|
Core::Emulator emulator;
|
||||||
emulator.Run(path);
|
emulator.Run(path);
|
||||||
});
|
});
|
||||||
emulator_thread.detach();
|
emulator_thread.detach();
|
||||||
isGameRunning = true;
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue