Update main.cpp

This commit is contained in:
Valentin Vanelslande 2017-10-10 22:35:26 -05:00 committed by GitHub
parent d56f908e5c
commit f92d516723

View File

@ -252,6 +252,14 @@ void GMainWindow::InitializeHotkeys() {
SLOT(OnStartGame()));
connect(GetHotkey("Main Window", "Swap Screens", render_window), SIGNAL(activated()), this,
SLOT(OnSwapScreens()));
connect(GetHotkey("Main Window", "Play/Pause", this), SIGNAL(activated()), this,
SLOT(OnRunningToggle()));
}
void GMainWindow::OnRunningToggle() {
if (emulation_running) {
OnPauseGame();
}
}
void GMainWindow::SetDefaultUIGeometry() {
@ -823,12 +831,6 @@ void GMainWindow::dragEnterEvent(QDragEnterEvent* event) {
void GMainWindow::dragMoveEvent(QDragMoveEvent* event) {
event->acceptProposedAction();
}
void GMainWindow::keyPressEvent(QKeyEvent* event) {
if (event->key() == Qt::Key_F4 && emulation_running) {
OnPauseGame();
}
}
bool GMainWindow::ConfirmChangeGame() {
if (emu_thread == nullptr)