Skip to content

Commit

Permalink
Merge pull request #3532 from rukai/enterOpenGame
Browse files Browse the repository at this point in the history
Qt - Enter key opens selected game in the game list.
  • Loading branch information
Parlane committed May 10, 2016
2 parents 3f012df + 704d9cb commit 670a1c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/Core/DolphinQt2/GameList/GameList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <QDesktopServices>
#include <QHeaderView>
#include <QKeyEvent>
#include <QMenu>
#include <QUrl>

Expand Down Expand Up @@ -164,3 +165,10 @@ void GameList::ConsiderViewChange()
setCurrentWidget(m_empty);
}
}
void GameList::keyReleaseEvent(QKeyEvent* event)
{
if (event->key() == Qt::Key_Return)
emit GameSelected();
else
QStackedWidget::keyReleaseEvent(event);
}
2 changes: 2 additions & 0 deletions Source/Core/DolphinQt2/GameList/GameList.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ private slots:
QTableView* m_table;
QLabel* m_empty;
bool m_prefer_table;
protected:
void keyReleaseEvent(QKeyEvent* event) override;
};

0 comments on commit 670a1c2

Please sign in to comment.