diff options
| author | 2020-07-06 17:30:28 -0400 | |
|---|---|---|
| committer | 2020-07-06 17:30:28 -0400 | |
| commit | fa4d6df4c52fef63a12b96208381d0733d7d705f (patch) | |
| tree | 374a8f60ed0bc0e24db5ae9c1fcda70ff2f1756f /src | |
| parent | Merge pull request #4194 from ReinUsesLisp/fix-shader-cache (diff) | |
| download | yuzu-fa4d6df4c52fef63a12b96208381d0733d7d705f.tar.gz yuzu-fa4d6df4c52fef63a12b96208381d0733d7d705f.tar.xz yuzu-fa4d6df4c52fef63a12b96208381d0733d7d705f.zip | |
Fix ss crash on game menu, fix ss on windowed mode
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 8 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index bbbd96113..9e6125e18 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -212,7 +212,7 @@ const std::array<int, Settings::NativeKeyboard::NumKeyboardMods> Config::default | |||
| 212 | // UISetting::values.shortcuts, which is alphabetically ordered. | 212 | // UISetting::values.shortcuts, which is alphabetically ordered. |
| 213 | // clang-format off | 213 | // clang-format off |
| 214 | const std::array<UISettings::Shortcut, 16> Config::default_hotkeys{{ | 214 | const std::array<UISettings::Shortcut, 16> Config::default_hotkeys{{ |
| 215 | {QStringLiteral("Capture Screenshot"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+P"), Qt::ApplicationShortcut}}, | 215 | {QStringLiteral("Capture Screenshot"), QStringLiteral("Main Window"), {QStringLiteral("Ctrl+P"), Qt::WidgetWithChildrenShortcut}}, |
| 216 | {QStringLiteral("Change Docked Mode"), QStringLiteral("Main Window"), {QStringLiteral("F10"), Qt::ApplicationShortcut}}, | 216 | {QStringLiteral("Change Docked Mode"), QStringLiteral("Main Window"), {QStringLiteral("F10"), Qt::ApplicationShortcut}}, |
| 217 | {QStringLiteral("Continue/Pause Emulation"), QStringLiteral("Main Window"), {QStringLiteral("F4"), Qt::WindowShortcut}}, | 217 | {QStringLiteral("Continue/Pause Emulation"), QStringLiteral("Main Window"), {QStringLiteral("F4"), Qt::WindowShortcut}}, |
| 218 | {QStringLiteral("Decrease Speed Limit"), QStringLiteral("Main Window"), {QStringLiteral("-"), Qt::ApplicationShortcut}}, | 218 | {QStringLiteral("Decrease Speed Limit"), QStringLiteral("Main Window"), {QStringLiteral("-"), Qt::ApplicationShortcut}}, |
| @@ -665,11 +665,13 @@ void Config::ReadShortcutValues() { | |||
| 665 | const auto& [keyseq, context] = shortcut; | 665 | const auto& [keyseq, context] = shortcut; |
| 666 | qt_config->beginGroup(group); | 666 | qt_config->beginGroup(group); |
| 667 | qt_config->beginGroup(name); | 667 | qt_config->beginGroup(name); |
| 668 | // No longer using ReadSetting for shortcut.second as it innacurately returns a value of 1 | ||
| 669 | // for WidgetWithChildrenShortcut which is a value of 3. Needed to fix screenshot shortcut | ||
| 670 | // in windowed mode | ||
| 668 | UISettings::values.shortcuts.push_back( | 671 | UISettings::values.shortcuts.push_back( |
| 669 | {name, | 672 | {name, |
| 670 | group, | 673 | group, |
| 671 | {ReadSetting(QStringLiteral("KeySeq"), keyseq).toString(), | 674 | {ReadSetting(QStringLiteral("KeySeq"), keyseq).toString(), shortcut.second}}); |
| 672 | ReadSetting(QStringLiteral("Context"), context).toInt()}}); | ||
| 673 | qt_config->endGroup(); | 675 | qt_config->endGroup(); |
| 674 | qt_config->endGroup(); | 676 | qt_config->endGroup(); |
| 675 | } | 677 | } |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index fb299a39b..9844e4764 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -753,7 +753,7 @@ void GMainWindow::InitializeHotkeys() { | |||
| 753 | }); | 753 | }); |
| 754 | connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Capture Screenshot"), this), | 754 | connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Capture Screenshot"), this), |
| 755 | &QShortcut::activated, this, [&] { | 755 | &QShortcut::activated, this, [&] { |
| 756 | if (emu_thread->IsRunning()) { | 756 | if (emu_thread != nullptr && emu_thread->IsRunning()) { |
| 757 | OnCaptureScreenshot(); | 757 | OnCaptureScreenshot(); |
| 758 | } | 758 | } |
| 759 | }); | 759 | }); |