summaryrefslogtreecommitdiff
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorGravatar liamwhite2023-09-02 14:42:35 -0400
committerGravatar GitHub2023-09-02 14:42:35 -0400
commit2c5e8e6d408f0e060da4665444132c4b8bbf7759 (patch)
tree2957a8ccab9c4d2fc6ffd57fc81afce158bcceab /src/core/core.cpp
parentMerge pull request #11393 from FernandoS27/bayo-got-busted-up (diff)
parentam: shorten shutdown timeout when lock is not held (diff)
downloadyuzu-2c5e8e6d408f0e060da4665444132c4b8bbf7759.tar.gz
yuzu-2c5e8e6d408f0e060da4665444132c4b8bbf7759.tar.xz
yuzu-2c5e8e6d408f0e060da4665444132c4b8bbf7759.zip
Merge pull request #11384 from liamwhite/am-shutdown
am: shorten shutdown timeout when lock is not held
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 2f67e60a9..e95ae80da 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -273,7 +273,8 @@ struct System::Impl {
273 time_manager.Initialize(); 273 time_manager.Initialize();
274 274
275 is_powered_on = true; 275 is_powered_on = true;
276 exit_lock = false; 276 exit_locked = false;
277 exit_requested = false;
277 278
278 microprofile_cpu[0] = MICROPROFILE_TOKEN(ARM_CPU0); 279 microprofile_cpu[0] = MICROPROFILE_TOKEN(ARM_CPU0);
279 microprofile_cpu[1] = MICROPROFILE_TOKEN(ARM_CPU1); 280 microprofile_cpu[1] = MICROPROFILE_TOKEN(ARM_CPU1);
@@ -398,7 +399,8 @@ struct System::Impl {
398 } 399 }
399 400
400 is_powered_on = false; 401 is_powered_on = false;
401 exit_lock = false; 402 exit_locked = false;
403 exit_requested = false;
402 404
403 if (gpu_core != nullptr) { 405 if (gpu_core != nullptr) {
404 gpu_core->NotifyShutdown(); 406 gpu_core->NotifyShutdown();
@@ -507,7 +509,8 @@ struct System::Impl {
507 509
508 CpuManager cpu_manager; 510 CpuManager cpu_manager;
509 std::atomic_bool is_powered_on{}; 511 std::atomic_bool is_powered_on{};
510 bool exit_lock = false; 512 bool exit_locked = false;
513 bool exit_requested = false;
511 514
512 bool nvdec_active{}; 515 bool nvdec_active{};
513 516
@@ -943,12 +946,20 @@ const Service::Time::TimeManager& System::GetTimeManager() const {
943 return impl->time_manager; 946 return impl->time_manager;
944} 947}
945 948
946void System::SetExitLock(bool locked) { 949void System::SetExitLocked(bool locked) {
947 impl->exit_lock = locked; 950 impl->exit_locked = locked;
948} 951}
949 952
950bool System::GetExitLock() const { 953bool System::GetExitLocked() const {
951 return impl->exit_lock; 954 return impl->exit_locked;
955}
956
957void System::SetExitRequested(bool requested) {
958 impl->exit_requested = requested;
959}
960
961bool System::GetExitRequested() const {
962 return impl->exit_requested;
952} 963}
953 964
954void System::SetApplicationProcessBuildID(const CurrentBuildProcessID& id) { 965void System::SetApplicationProcessBuildID(const CurrentBuildProcessID& id) {