mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-25 01:00:01 +00:00
Merge pull request #3294 from thedax/allowPauseScreenBtnClose
PauseScreen: Allow escape/cancel buttons to dismiss the menu to return to the game.
This commit is contained in:
commit
a69a0cb688
@ -621,6 +621,14 @@ void GamePauseScreen::update(InputState &input) {
|
||||
UIScreen::update(input);
|
||||
}
|
||||
|
||||
void GamePauseScreen::key(const KeyInput &key) {
|
||||
if ((key.flags & KEY_DOWN) && UI::IsEscapeKeyCode(key.keyCode)) {
|
||||
screenManager()->finishDialog(this, DR_CANCEL);
|
||||
} else {
|
||||
UIScreen::key(key);
|
||||
}
|
||||
}
|
||||
|
||||
void GamePauseScreen::DrawBackground(UIContext &dc) {
|
||||
GameInfo *ginfo = g_gameInfoCache.GetInfo(gamePath_, true);
|
||||
dc.Flush();
|
||||
|
@ -52,6 +52,8 @@ class GamePauseScreen : public UIScreen {
|
||||
public:
|
||||
GamePauseScreen(const std::string &filename) : UIScreen(), gamePath_(filename) {}
|
||||
~GamePauseScreen();
|
||||
virtual void key(const KeyInput &key);
|
||||
|
||||
protected:
|
||||
virtual void DrawBackground(UIContext &dc);
|
||||
virtual void CreateViews();
|
||||
|
Loading…
Reference in New Issue
Block a user