Stub GetAccumulatedSuspendedTickValue and fix call misnumbering

This is used by some more recent games like Hatsune Miku: Project DIVA
MegaMix!
This commit is contained in:
Billy Laws 2021-05-27 22:28:26 +01:00
parent 22c83006a3
commit 476bb65f37
2 changed files with 16 additions and 2 deletions

View File

@ -58,6 +58,13 @@ namespace skyline::service::am {
return {};
}
Result ISelfController::GetAccumulatedSuspendedTickValue(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
// TODO: Properly handle this after we implement game suspending
response.Push<u64>(0);
return {};
}
Result ISelfController::GetAccumulatedSuspendedTickChangedEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
auto handle{state.process->InsertItem(accumulatedSuspendedTickChangedEvent)};
state.logger->Debug("Accumulated Suspended Tick Event Handle: 0x{:X}", handle);

View File

@ -73,7 +73,13 @@ namespace skyline::service::am {
Result CreateManagedDisplayLayer(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @brief Returns a handle to the system sleep time change KEvent
* @brief Returns how long the process was suspended for in ticks
* @url https://switchbrew.org/wiki/Applet_Manager_services#GetAccumulatedSuspendedTickValue
*/
Result GetAccumulatedSuspendedTickValue(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @brief Returns a handle to a KEvent that is signalled when the accumulated suspend tick value changes
* @url https://switchbrew.org/wiki/Applet_Manager_services#GetAccumulatedSuspendedTickChangedEvent
*/
Result GetAccumulatedSuspendedTickChangedEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
@ -88,7 +94,8 @@ namespace skyline::service::am {
SFUNC(0xE, ISelfController, SetRestartMessageEnabled),
SFUNC(0x10, ISelfController, SetOutOfFocusSuspendingEnabled),
SFUNC(0x28, ISelfController, CreateManagedDisplayLayer),
SFUNC(0x5B, ISelfController, GetLibraryAppletLaunchableEvent)
SFUNC(0x5A, ISelfController, GetAccumulatedSuspendedTickValue),
SFUNC(0x5B, ISelfController, GetAccumulatedSuspendedTickChangedEvent)
)
};
}