mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-28 10:02:31 -06:00
Merge pull request #4647 from FearlessTobi/fix-weird-bug
citra_qt/main: make SPEED_LIMIT_STEP static constexpr
This commit is contained in:
commit
b0a4220711
1 changed files with 3 additions and 1 deletions
|
@ -407,7 +407,9 @@ void GMainWindow::InitializeHotkeys() {
|
||||||
Settings::values.use_frame_limit = !Settings::values.use_frame_limit;
|
Settings::values.use_frame_limit = !Settings::values.use_frame_limit;
|
||||||
UpdateStatusBar();
|
UpdateStatusBar();
|
||||||
});
|
});
|
||||||
constexpr u16 SPEED_LIMIT_STEP = 5;
|
// We use "static" here in order to avoid capturing by lambda due to a MSVC bug, which makes the
|
||||||
|
// variable hold a garbage value after this function exits
|
||||||
|
static constexpr u16 SPEED_LIMIT_STEP = 5;
|
||||||
connect(hotkey_registry.GetHotkey("Main Window", "Increase Speed Limit", this),
|
connect(hotkey_registry.GetHotkey("Main Window", "Increase Speed Limit", this),
|
||||||
&QShortcut::activated, this, [&] {
|
&QShortcut::activated, this, [&] {
|
||||||
if (Settings::values.frame_limit < 9999 - SPEED_LIMIT_STEP) {
|
if (Settings::values.frame_limit < 9999 - SPEED_LIMIT_STEP) {
|
||||||
|
|
Loading…
Reference in a new issue