|
@@ -421,6 +421,7 @@ struct System::Impl {
|
|
|
bool is_async_gpu{};
|
|
bool is_async_gpu{};
|
|
|
|
|
|
|
|
ExecuteProgramCallback execute_program_callback;
|
|
ExecuteProgramCallback execute_program_callback;
|
|
|
|
|
+ ExitCallback exit_callback;
|
|
|
|
|
|
|
|
std::array<u64, Core::Hardware::NUM_CPU_CORES> dynarmic_ticks{};
|
|
std::array<u64, Core::Hardware::NUM_CPU_CORES> dynarmic_ticks{};
|
|
|
std::array<MicroProfileToken, Core::Hardware::NUM_CPU_CORES> microprofile_dynarmic{};
|
|
std::array<MicroProfileToken, Core::Hardware::NUM_CPU_CORES> microprofile_dynarmic{};
|
|
@@ -798,6 +799,18 @@ void System::ExecuteProgram(std::size_t program_index) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void System::RegisterExitCallback(ExitCallback&& callback) {
|
|
|
|
|
+ impl->exit_callback = std::move(callback);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void System::Exit() {
|
|
|
|
|
+ if (impl->exit_callback) {
|
|
|
|
|
+ impl->exit_callback();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ LOG_CRITICAL(Core, "exit_callback must be initialized by the frontend");
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void System::ApplySettings() {
|
|
void System::ApplySettings() {
|
|
|
if (IsPoweredOn()) {
|
|
if (IsPoweredOn()) {
|
|
|
Renderer().RefreshBaseSettings();
|
|
Renderer().RefreshBaseSettings();
|