service/apt: Implement soft reset & CloseApplication
This commit is contained in:
parent
ca701e2610
commit
ad6b140cb0
9 changed files with 160 additions and 12 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue