Merge pull request #3959 from zhaowenlan1779/semi-reset

service/apt: Implement soft reset & CloseApplication
This commit is contained in:
James Rowe 2018-09-19 21:02:59 -06:00 committed by GitHub
commit 687e3e74ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 160 additions and 12 deletions

View file

@ -59,6 +59,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
};
@ -83,6 +84,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
@ -216,6 +230,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() {