mirror of
https://github.com/libretro/mgba.git
synced 2024-11-27 02:00:42 +00:00
Qt: Add shortcuts to increment fast forward speed (#2903)
Co-authored-by: Vicki Pfau <vi@endrift.com>
This commit is contained in:
parent
eb26b3c387
commit
a7ffcee399
@ -1429,6 +1429,20 @@ void Window::setupMenu(QMenuBar* menubar) {
|
||||
}
|
||||
m_config->updateOption("fastForwardRatio");
|
||||
|
||||
addGameAction(tr("Increase fast forward speed"), "fastForwardUp", [this] {
|
||||
float newRatio = m_config->getOption("fastForwardRatio", 1.0f).toFloat() + 1.0f;
|
||||
if (newRatio >= 3.0f) {
|
||||
m_config->setOption("fastForwardRatio", QVariant(newRatio));
|
||||
}
|
||||
}, "emu");
|
||||
|
||||
addGameAction(tr("Decrease fast forward speed"), "fastForwardDown", [this] {
|
||||
float newRatio = m_config->getOption("fastForwardRatio").toFloat() - 1.0f;
|
||||
if (newRatio >= 2.0f) {
|
||||
m_config->setOption("fastForwardRatio", QVariant(newRatio));
|
||||
}
|
||||
}, "emu");
|
||||
|
||||
Action* rewindHeld = m_actions.addHeldAction(tr("Rewind (held)"), "holdRewind", [this](bool held) {
|
||||
if (m_controller) {
|
||||
m_controller->setRewinding(held);
|
||||
|
Loading…
Reference in New Issue
Block a user