summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2015-04-05 22:11:57 -0400
committerGravatar bunnei2015-04-09 19:04:19 -0400
commitbdd190363d729bb172216a87f3f22757cc3a1107 (patch)
treeef41fef468797f85c6fca0c94ac3c34f740de03b
parentKernel: Fixed default thread priority. (diff)
downloadyuzu-bdd190363d729bb172216a87f3f22757cc3a1107.tar.gz
yuzu-bdd190363d729bb172216a87f3f22757cc3a1107.tar.xz
yuzu-bdd190363d729bb172216a87f3f22757cc3a1107.zip
APT: (Subv) Fix bug where start event was being incorrectly signaled.
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/apt/apt.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp
index 4861d9e5f..190c5df7a 100644
--- a/src/core/hle/service/apt/apt.cpp
+++ b/src/core/hle/service/apt/apt.cpp
@@ -32,7 +32,8 @@ static Kernel::SharedPtr<Kernel::SharedMemory> shared_font_mem = nullptr;
32 32
33static Kernel::SharedPtr<Kernel::Mutex> lock = nullptr; 33static Kernel::SharedPtr<Kernel::Mutex> lock = nullptr;
34static Kernel::SharedPtr<Kernel::Event> notification_event = nullptr; ///< APT notification event 34static Kernel::SharedPtr<Kernel::Event> notification_event = nullptr; ///< APT notification event
35static Kernel::SharedPtr<Kernel::Event> pause_event = nullptr; ///< APT pause event 35static Kernel::SharedPtr<Kernel::Event> start_event = nullptr; ///< APT start event
36
36static std::vector<u8> shared_font; 37static std::vector<u8> shared_font;
37 38
38static u32 cpu_percent = 0; ///< CPU time available to the running application 39static u32 cpu_percent = 0; ///< CPU time available to the running application
@@ -44,11 +45,11 @@ void Initialize(Service::Interface* self) {
44 45
45 cmd_buff[2] = 0x04000000; // According to 3dbrew, this value should be 0x04000000 46 cmd_buff[2] = 0x04000000; // According to 3dbrew, this value should be 0x04000000
46 cmd_buff[3] = Kernel::g_handle_table.Create(notification_event).MoveFrom(); 47 cmd_buff[3] = Kernel::g_handle_table.Create(notification_event).MoveFrom();
47 cmd_buff[4] = Kernel::g_handle_table.Create(pause_event).MoveFrom(); 48 cmd_buff[4] = Kernel::g_handle_table.Create(start_event).MoveFrom();
48 49
49 // TODO(bunnei): Check if these events are cleared/signaled every time Initialize is called. 50 // TODO(bunnei): Check if these events are cleared every time Initialize is called.
50 notification_event->Clear(); 51 notification_event->Clear();
51 pause_event->Signal(); // Fire start event 52 start_event->Clear();
52 53
53 ASSERT_MSG((nullptr != lock), "Cannot initialize without lock"); 54 ASSERT_MSG((nullptr != lock), "Cannot initialize without lock");
54 lock->Release(); 55 lock->Release();
@@ -81,7 +82,7 @@ void NotifyToWait(Service::Interface* self) {
81 u32* cmd_buff = Kernel::GetCommandBuffer(); 82 u32* cmd_buff = Kernel::GetCommandBuffer();
82 u32 app_id = cmd_buff[1]; 83 u32 app_id = cmd_buff[1];
83 // TODO(Subv): Verify this, it seems to get SWKBD and Home Menu further. 84 // TODO(Subv): Verify this, it seems to get SWKBD and Home Menu further.
84 pause_event->Signal(); 85 start_event->Signal();
85 86
86 cmd_buff[1] = RESULT_SUCCESS.raw; // No error 87 cmd_buff[1] = RESULT_SUCCESS.raw; // No error
87 LOG_WARNING(Service_APT, "(STUBBED) app_id=%u", app_id); 88 LOG_WARNING(Service_APT, "(STUBBED) app_id=%u", app_id);
@@ -312,7 +313,7 @@ void Init() {
312 313
313 // TODO(bunnei): Check if these are created in Initialize or on APT process startup. 314 // TODO(bunnei): Check if these are created in Initialize or on APT process startup.
314 notification_event = Kernel::Event::Create(RESETTYPE_ONESHOT, "APT_U:Notification"); 315 notification_event = Kernel::Event::Create(RESETTYPE_ONESHOT, "APT_U:Notification");
315 pause_event = Kernel::Event::Create(RESETTYPE_ONESHOT, "APT_U:Pause"); 316 start_event = Kernel::Event::Create(RESETTYPE_ONESHOT, "APT_U:Start");
316} 317}
317 318
318void Shutdown() { 319void Shutdown() {