From ccb26fe883d826ec3c67841e40766fbbd1757440 Mon Sep 17 00:00:00 2001 From: raven02 Date: Fri, 28 Jun 2013 20:29:15 +0800 Subject: [PATCH] Add EXIT button to new UI --- UI/MainScreen.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 521846ecb1..d99ab0d92a 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -336,6 +336,7 @@ void MainScreen::CreateViews() { rightColumnItems->Add(new Choice("Load..."))->OnClick.Handle(this, &MainScreen::OnLoadFile); #endif rightColumnItems->Add(new Choice("Settings"))->OnClick.Handle(this, &MainScreen::OnSettings); + rightColumnItems->Add(new Choice("Exit"))->OnClick.Handle(this, &MainScreen::OnExit); rightColumnItems->Add(new Choice("Credits"))->OnClick.Handle(this, &MainScreen::OnCredits); rightColumnItems->Add(new Choice("Support PPSSPP"))->OnClick.Handle(this, &MainScreen::OnSupport); } @@ -373,3 +374,9 @@ UI::EventReturn MainScreen::OnCredits(UI::EventParams &e) { UI::EventReturn MainScreen::OnSupport(UI::EventParams &e) { return UI::EVENT_DONE; } + +UI::EventReturn MainScreen::OnExit(UI::EventParams &e) { + NativeShutdown(); + exit(0); + return UI::EVENT_DONE; +}