service/apt: Implement soft reset & CloseApplication

This commit is contained in:
zhupengfei 2018-07-18 20:07:00 +08:00
parent ca701e2610
commit ad6b140cb0
No known key found for this signature in database
GPG key ID: 85B82A3E62174206
9 changed files with 160 additions and 12 deletions

View file

@ -55,6 +55,7 @@ public:
/// generic drivers installed
ErrorVideoCore_ErrorBelowGL33, ///< Error in the video core due to the user not having
/// OpenGL 3.3 or higher
ShutdownRequested, ///< Emulated program requested a system shutdown
ErrorUnknown ///< Any other error
};
@ -79,6 +80,19 @@ public:
/// Shutdown the emulated system.
void Shutdown();
/// Shutdown and then load again
void Reset();
/// Request reset of the system
void RequestReset() {
reset_requested = true;
}
/// Request shutdown of the system
void RequestShutdown() {
shutdown_requested = true;
}
/**
* Load an executable application.
* @param emu_window Reference to the host-system window used for video output and keyboard
@ -209,6 +223,12 @@ private:
ResultStatus status = ResultStatus::Success;
std::string status_details = "";
/// Saved variables for reset
EmuWindow* m_emu_window;
std::string m_filepath;
std::atomic<bool> reset_requested;
std::atomic<bool> shutdown_requested;
};
inline ARM_Interface& CPU() {