diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/apt/apt.cpp | 13 |
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 | ||
| 33 | static Kernel::SharedPtr<Kernel::Mutex> lock = nullptr; | 33 | static Kernel::SharedPtr<Kernel::Mutex> lock = nullptr; |
| 34 | static Kernel::SharedPtr<Kernel::Event> notification_event = nullptr; ///< APT notification event | 34 | static Kernel::SharedPtr<Kernel::Event> notification_event = nullptr; ///< APT notification event |
| 35 | static Kernel::SharedPtr<Kernel::Event> pause_event = nullptr; ///< APT pause event | 35 | static Kernel::SharedPtr<Kernel::Event> start_event = nullptr; ///< APT start event |
| 36 | |||
| 36 | static std::vector<u8> shared_font; | 37 | static std::vector<u8> shared_font; |
| 37 | 38 | ||
| 38 | static u32 cpu_percent = 0; ///< CPU time available to the running application | 39 | static 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 | ||
| 318 | void Shutdown() { | 319 | void Shutdown() { |