Stub GetIdleTimeDetectionExtension

This commit is contained in:
Dima 2022-11-20 12:38:36 +03:00 committed by Billy Laws
parent 2311f777fc
commit 3e078d54b6
2 changed files with 13 additions and 1 deletions

View File

@ -71,11 +71,16 @@ namespace skyline::service::am {
}
Result ISelfController::SetIdleTimeDetectionExtension(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
auto idleTimeDetectionExtension{request.Pop<u32>()};
idleTimeDetectionExtension = request.Pop<u32>();
Logger::Debug("Setting Idle Time Detection Extension: 0x{:X}", idleTimeDetectionExtension);
return {};
}
Result ISelfController::GetIdleTimeDetectionExtension(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
response.Push<u32>(idleTimeDetectionExtension);
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);

View File

@ -19,6 +19,7 @@ namespace skyline::service::am {
std::shared_ptr<kernel::type::KEvent> libraryAppletLaunchableEvent; //!< This KEvent is triggered when the library applet is launchable
std::shared_ptr<kernel::type::KEvent> accumulatedSuspendedTickChangedEvent; //!< This KEvent is triggered when the time the system has spent in suspend is updated
std::shared_ptr<hosbinder::IHOSBinderDriver> hosbinder; //!< IHOSBinder service for managed display layers
u32 idleTimeDetectionExtension{0};
public:
ISelfController(const DeviceState &state, ServiceManager &manager);
@ -98,6 +99,11 @@ namespace skyline::service::am {
*/
Result SetIdleTimeDetectionExtension(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @url https://switchbrew.org/wiki/Applet_Manager_services#GetIdleTimeDetectionExtension
*/
Result GetIdleTimeDetectionExtension(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @brief Returns how long the process was suspended for in ticks
* @url https://switchbrew.org/wiki/Applet_Manager_services#GetAccumulatedSuspendedTickValue
@ -129,6 +135,7 @@ namespace skyline::service::am {
SFUNC(0x13, ISelfController, SetAlbumImageOrientation),
SFUNC(0x28, ISelfController, CreateManagedDisplayLayer),
SFUNC(0x3E, ISelfController, SetIdleTimeDetectionExtension),
SFUNC(0x3F, ISelfController, GetIdleTimeDetectionExtension),
SFUNC(0x5A, ISelfController, GetAccumulatedSuspendedTickValue),
SFUNC(0x5B, ISelfController, GetAccumulatedSuspendedTickChangedEvent),
SFUNC(0x64, ISelfController, SetAlbumImageTakenNotificationEnabled)