mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 08:50:57 +01:00
Fix ss crash on game menu, fix ss on windowed mode
This commit is contained in:
parent
52882a93a5
commit
fa4d6df4c5
3 changed files with 7 additions and 5 deletions
2
externals/dynarmic
vendored
2
externals/dynarmic
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 4f967387c07365b7ea35d2fa3e19b7df8872a09b
|
||||
Subproject commit e7166e8ba74d7b9c85e87afc0aaf667e7e84cfe0
|
|
@ -212,7 +212,7 @@ const std::array<int, Settings::NativeKeyboard::NumKeyboardMods> Config::default
|
|||
// UISetting::values.shortcuts, which is alphabetically ordered.
|
||||
// clang-format off
|
||||
const std::array<UISettings::Shortcut, 16> Config::default_hotkeys{{
|
||||
{QStringLiteral("Capture Screenshot"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+P"), Qt::ApplicationShortcut}},
|
||||
{QStringLiteral("Capture Screenshot"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+P"), Qt::WidgetWithChildrenShortcut}},
|
||||
{QStringLiteral("Change Docked Mode"), QStringLiteral("Main Window"), {QStringLiteral("F10"), Qt::ApplicationShortcut}},
|
||||
{QStringLiteral("Continue/Pause Emulation"), QStringLiteral("Main Window"), {QStringLiteral("F4"), Qt::WindowShortcut}},
|
||||
{QStringLiteral("Decrease Speed Limit"), QStringLiteral("Main Window"), {QStringLiteral("-"), Qt::ApplicationShortcut}},
|
||||
|
@ -665,11 +665,13 @@ void Config::ReadShortcutValues() {
|
|||
const auto& [keyseq, context] = shortcut;
|
||||
qt_config->beginGroup(group);
|
||||
qt_config->beginGroup(name);
|
||||
// No longer using ReadSetting for shortcut.second as it innacurately returns a value of 1
|
||||
// for WidgetWithChildrenShortcut which is a value of 3. Needed to fix screenshot shortcut
|
||||
// in windowed mode
|
||||
UISettings::values.shortcuts.push_back(
|
||||
{name,
|
||||
group,
|
||||
{ReadSetting(QStringLiteral("KeySeq"), keyseq).toString(),
|
||||
ReadSetting(QStringLiteral("Context"), context).toInt()}});
|
||||
{ReadSetting(QStringLiteral("KeySeq"), keyseq).toString(), shortcut.second}});
|
||||
qt_config->endGroup();
|
||||
qt_config->endGroup();
|
||||
}
|
||||
|
|
|
@ -753,7 +753,7 @@ void GMainWindow::InitializeHotkeys() {
|
|||
});
|
||||
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Capture Screenshot"), this),
|
||||
&QShortcut::activated, this, [&] {
|
||||
if (emu_thread->IsRunning()) {
|
||||
if (emu_thread != nullptr && emu_thread->IsRunning()) {
|
||||
OnCaptureScreenshot();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue