Compare commits

..

1 Commits

Author SHA1 Message Date
vonchenplus 5d686986e7 Fix crash when exit app 2021-11-16 19:24:09 +08:00
+9 -3
View File
@@ -975,7 +975,7 @@ void GMainWindow::InitializeHotkeys() {
&QShortcut::activatedAmbiguously, ui->action_Fullscreen, &QAction::trigger);
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Exit Fullscreen"), this),
&QShortcut::activated, this, [&] {
if (emulation_running && ui->action_Fullscreen->isChecked()) {
if (emulation_running) {
ui->action_Fullscreen->setChecked(false);
ToggleFullscreen();
}
@@ -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;