summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-02-15 05:44:05 +0100
committerLiam <byteslice@airmail.cc>2024-02-18 00:08:38 +0100
commit812f23d05c77fb10407546c3e7a95447fcbea395 (patch)
treebbfb035c35ccffb6dbe0995002c2937bd94edc2d /src/core/core.cpp
parentvi: move shared buffer management from nvnflinger (diff)
downloadyuzu-812f23d05c77fb10407546c3e7a95447fcbea395.tar
yuzu-812f23d05c77fb10407546c3e7a95447fcbea395.tar.gz
yuzu-812f23d05c77fb10407546c3e7a95447fcbea395.tar.bz2
yuzu-812f23d05c77fb10407546c3e7a95447fcbea395.tar.lz
yuzu-812f23d05c77fb10407546c3e7a95447fcbea395.tar.xz
yuzu-812f23d05c77fb10407546c3e7a95447fcbea395.tar.zst
yuzu-812f23d05c77fb10407546c3e7a95447fcbea395.zip
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 60e2efddc..9e8936728 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -47,6 +47,7 @@
#include "core/hle/service/psc/time/system_clock.h"
#include "core/hle/service/psc/time/time_zone_service.h"
#include "core/hle/service/service.h"
+#include "core/hle/service/services.h"
#include "core/hle/service/set/system_settings_server.h"
#include "core/hle/service/sm/sm.h"
#include "core/internal_network/network.h"
@@ -310,7 +311,8 @@ struct System::Impl {
audio_core = std::make_unique<AudioCore::AudioCore>(system);
service_manager = std::make_shared<Service::SM::ServiceManager>(kernel);
- services = std::make_unique<Service::Services>(service_manager, system);
+ services =
+ std::make_unique<Service::Services>(service_manager, system, stop_event.get_token());
is_powered_on = true;
exit_locked = false;
@@ -458,6 +460,7 @@ struct System::Impl {
gpu_core->NotifyShutdown();
}
+ stop_event.request_stop();
core_timing.SyncPause(false);
Network::CancelPendingSocketOperations();
kernel.SuspendEmulation(true);
@@ -478,6 +481,7 @@ struct System::Impl {
cpu_manager.Shutdown();
debugger.reset();
kernel.Shutdown();
+ stop_event = {};
Network::RestartSocketOperations();
if (auto room_member = room_network.GetRoomMember().lock()) {
@@ -613,6 +617,7 @@ struct System::Impl {
ExecuteProgramCallback execute_program_callback;
ExitCallback exit_callback;
+ std::stop_source stop_event;
std::array<u64, Core::Hardware::NUM_CPU_CORES> dynarmic_ticks{};
std::array<MicroProfileToken, Core::Hardware::NUM_CPU_CORES> microprofile_cpu{};