mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 00:40:11 +00:00
fix shortcuts
This commit is contained in:
parent
761b74ec59
commit
8183449fb1
@ -39,8 +39,28 @@ void gs_frame::keyPressEvent(QKeyEvent *keyEvent)
|
||||
{
|
||||
switch (keyEvent->key())
|
||||
{
|
||||
case Qt::Key_Return: if (keyEvent->modifiers() == Qt::AltModifier) { OnFullScreen(); return; } break;
|
||||
case Qt::Key_Escape: if (visibility() == FullScreen) { setVisibility(Windowed); return; } break;
|
||||
case Qt::Key_Return:
|
||||
if (keyEvent->modifiers() == Qt::AltModifier) { OnFullScreen(); return; }
|
||||
break;
|
||||
case Qt::Key_Escape:
|
||||
if (visibility() == FullScreen) { setVisibility(Windowed); return; }
|
||||
break;
|
||||
case Qt::Key_P:
|
||||
if (keyEvent->modifiers() == Qt::ControlModifier && Emu.IsRunning()) { Emu.Pause(); return; }
|
||||
break;
|
||||
case Qt::Key_S:
|
||||
if (keyEvent->modifiers() == Qt::ControlModifier && (!Emu.IsStopped())) { Emu.Stop(); return; }
|
||||
break;
|
||||
case Qt::Key_R:
|
||||
if (keyEvent->modifiers() == Qt::ControlModifier && (!Emu.GetPath().empty())) { Emu.Stop(); Emu.Load(); return; }
|
||||
break;
|
||||
case Qt::Key_E:
|
||||
if (keyEvent->modifiers() == Qt::ControlModifier)
|
||||
{
|
||||
if (Emu.IsReady()) { Emu.Run(); return; }
|
||||
else if (Emu.IsPaused()) { Emu.Resume(); return; }
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
Emu.CallAfter(l_handleKeyEvent);
|
||||
|
@ -787,7 +787,6 @@ void main_window::CreateActions()
|
||||
sysPauseAct->setIcon(icon_pause);
|
||||
|
||||
sysStopAct = new QAction(tr("&Stop"), this);
|
||||
sysStopAct->setShortcut(tr("Ctrl+S"));
|
||||
sysStopAct->setEnabled(false);
|
||||
sysStopAct->setIcon(icon_stop);
|
||||
|
||||
@ -1166,12 +1165,15 @@ void main_window::ConfigureGuiFromSettings(bool configureAll)
|
||||
|
||||
void main_window::keyPressEvent(QKeyEvent *keyEvent)
|
||||
{
|
||||
switch (keyEvent->key())
|
||||
if (keyEvent->modifiers() == Qt::ControlModifier)
|
||||
{
|
||||
case 'E': case 'e': if (Emu.IsPaused()) Emu.Resume(); else if (Emu.IsReady()) Emu.Run(); return;
|
||||
case 'P': case 'p': if (Emu.IsRunning()) Emu.Pause(); return;
|
||||
case 'S': case 's': if (!Emu.IsStopped()) Emu.Stop(); return;
|
||||
case 'R': case 'r': if (!Emu.GetPath().empty()) { Emu.Stop(); Emu.Run(); } return;
|
||||
switch (keyEvent->key())
|
||||
{
|
||||
case Qt::Key_E: if (Emu.IsPaused()) Emu.Resume(); else if (Emu.IsReady()) Emu.Run(); return;
|
||||
case Qt::Key_P: if (Emu.IsRunning()) Emu.Pause(); return;
|
||||
case Qt::Key_S: if (!Emu.IsStopped()) Emu.Stop(); return;
|
||||
case Qt::Key_R: if (!Emu.GetPath().empty()) { Emu.Stop(); Emu.Run(); } return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user