mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 12:21:51 +01:00
Implement GetAccumulatedSuspendedTickChangedEvent
This commit is contained in:
parent
6c9e0a943c
commit
c69efed2ad
@ -7,7 +7,7 @@
|
|||||||
#include "ISelfController.h"
|
#include "ISelfController.h"
|
||||||
|
|
||||||
namespace skyline::service::am {
|
namespace skyline::service::am {
|
||||||
ISelfController::ISelfController(const DeviceState &state, ServiceManager &manager) : libraryAppletLaunchableEvent(std::make_shared<type::KEvent>(state)), BaseService(state, manager, Service::am_ISelfController, "am:ISelfController", {
|
ISelfController::ISelfController(const DeviceState &state, ServiceManager &manager) : libraryAppletLaunchableEvent(std::make_shared<type::KEvent>(state)), accumulatedSuspendedTickChangedEvent(std::make_shared<type::KEvent>(state)), BaseService(state, manager, Service::am_ISelfController, "am:ISelfController", {
|
||||||
{0x1, SFUNC(ISelfController::LockExit)},
|
{0x1, SFUNC(ISelfController::LockExit)},
|
||||||
{0x2, SFUNC(ISelfController::UnlockExit)},
|
{0x2, SFUNC(ISelfController::UnlockExit)},
|
||||||
{0x9, SFUNC(ISelfController::GetLibraryAppletLaunchableEvent)},
|
{0x9, SFUNC(ISelfController::GetLibraryAppletLaunchableEvent)},
|
||||||
@ -16,7 +16,8 @@ namespace skyline::service::am {
|
|||||||
{0xD, SFUNC(ISelfController::SetFocusHandlingMode)},
|
{0xD, SFUNC(ISelfController::SetFocusHandlingMode)},
|
||||||
{0xE, SFUNC(ISelfController::SetRestartMessageEnabled)},
|
{0xE, SFUNC(ISelfController::SetRestartMessageEnabled)},
|
||||||
{0x10, SFUNC(ISelfController::SetOutOfFocusSuspendingEnabled)},
|
{0x10, SFUNC(ISelfController::SetOutOfFocusSuspendingEnabled)},
|
||||||
{0x28, SFUNC(ISelfController::CreateManagedDisplayLayer)}
|
{0x28, SFUNC(ISelfController::CreateManagedDisplayLayer)},
|
||||||
|
{0x5b, SFUNC(ISelfController::GetLibraryAppletLaunchableEvent)}
|
||||||
}) {}
|
}) {}
|
||||||
|
|
||||||
void ISelfController::LockExit(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {}
|
void ISelfController::LockExit(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {}
|
||||||
@ -52,4 +53,11 @@ namespace skyline::service::am {
|
|||||||
|
|
||||||
response.Push<u64>(0);
|
response.Push<u64>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void 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);
|
||||||
|
|
||||||
|
response.copyHandles.push_back(handle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ namespace skyline::service::am {
|
|||||||
class ISelfController : public BaseService {
|
class ISelfController : public BaseService {
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<kernel::type::KEvent> libraryAppletLaunchableEvent; //!< This KEvent is triggered when the library applet is launchable
|
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
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ISelfController(const DeviceState &state, ServiceManager &manager);
|
ISelfController(const DeviceState &state, ServiceManager &manager);
|
||||||
@ -61,5 +62,10 @@ namespace skyline::service::am {
|
|||||||
* @brief This function returns an output u64 LayerId (https://switchbrew.org/wiki/Applet_Manager_services#CreateManagedDisplayLayer)
|
* @brief This function returns an output u64 LayerId (https://switchbrew.org/wiki/Applet_Manager_services#CreateManagedDisplayLayer)
|
||||||
*/
|
*/
|
||||||
void CreateManagedDisplayLayer(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
void CreateManagedDisplayLayer(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This obtains a handle to the system sleep time change KEvent (https://switchbrew.org/wiki/Applet_Manager_services#GetAccumulatedSuspendedTickChangedEvent)
|
||||||
|
*/
|
||||||
|
void GetAccumulatedSuspendedTickChangedEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user