Fix crash when exit app

This commit is contained in:
vonchenplus
2021-11-15 22:36:04 +08:00
committed by Feng Chen
parent 720970c4c1
commit 5d686986e7

View File

@@ -1273,8 +1273,14 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p
std::make_unique<QtWebBrowser>(*this), // Web Browser
});
const Core::SystemResultStatus result{
system->Load(*render_window, filename.toStdString(), program_id, program_index)};
Core::SystemResultStatus result{};
auto load_thread = std::jthread(
[this, filename, program_id, program_index](Core::SystemResultStatus& result) {
result =
system->Load(*render_window, filename.toStdString(), program_id, program_index);
},
std::ref(result));
load_thread.join();
const auto drd_callout = (UISettings::values.callout_flags.GetValue() &
static_cast<u32>(CalloutFlag::DRDDeprecation)) == 0;