mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Exit from UI Menu Screen better. Fix crash under debugging if Pause Screen has ever been used.
This commit is contained in:
parent
2708c03f6e
commit
af30671c12
1 changed files with 11 additions and 11 deletions
|
@ -19,16 +19,9 @@
|
|||
#include <string>
|
||||
#include <cstdio>
|
||||
|
||||
#ifdef _WIN32
|
||||
namespace MainWindow {
|
||||
void BrowseAndBoot(std::string defaultPath);
|
||||
}
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf
|
||||
#pragma execution_character_set("utf-8")
|
||||
#endif
|
||||
|
||||
#include "base/display.h"
|
||||
|
@ -72,6 +65,13 @@ namespace MainWindow {
|
|||
#include <QDir>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
namespace MainWindow {
|
||||
extern HWND hwndMain;
|
||||
void BrowseAndBoot(std::string defaultPath);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(nullptr)
|
||||
#define nullptr NULL
|
||||
#endif
|
||||
|
@ -251,12 +251,12 @@ void MenuScreen::render() {
|
|||
}
|
||||
|
||||
if (UIButton(GEN_ID, vlinear, w, 0, m->T("Exit"), ALIGN_RIGHT)) {
|
||||
// TODO: Save when setting changes, rather than when we quit
|
||||
NativeShutdown();
|
||||
// TODO: Need a more elegant way to quit
|
||||
#ifdef _WIN32
|
||||
ExitProcess(0);
|
||||
PostMessage(MainWindow::hwndMain, WM_CLOSE, 0, 0);
|
||||
#else
|
||||
// TODO: Save when setting changes, rather than when we quit
|
||||
NativeShutdown();
|
||||
exit(0);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue