mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-22 20:06:40 +00:00
psc: fix pm module init
This commit is contained in:
parent
2b825d56dc
commit
fe5c850e69
2 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@
|
|||
|
||||
namespace ams::psc {
|
||||
|
||||
enum PmModuleId : u16 {
|
||||
enum PmModuleId : u32 {
|
||||
PmModuleId_Usb = 4,
|
||||
PmModuleId_Ethernet = 5,
|
||||
PmModuleId_Fgm = 6,
|
||||
|
|
|
@ -46,9 +46,9 @@ namespace ams::psc {
|
|||
Result PmModule::Initialize(const PmModuleId mid, const PmModuleId *dependencies, u32 dependency_count, os::EventClearMode clear_mode) {
|
||||
R_UNLESS(!this->initialized, psc::ResultAlreadyInitialized());
|
||||
|
||||
static_assert(sizeof(*dependencies) == sizeof(u16));
|
||||
static_assert(sizeof(*dependencies) == sizeof(u32));
|
||||
::PscPmModule module;
|
||||
R_TRY(::pscmGetPmModule(std::addressof(module), static_cast<::PscPmModuleId>(mid), reinterpret_cast<const u16 *>(dependencies), dependency_count, clear_mode == os::EventClearMode_AutoClear));
|
||||
R_TRY(::pscmGetPmModule(std::addressof(module), static_cast<::PscPmModuleId>(mid), reinterpret_cast<const u32 *>(dependencies), dependency_count, clear_mode == os::EventClearMode_AutoClear));
|
||||
|
||||
this->intf = RemoteObjectFactory::CreateSharedEmplaced<psc::sf::IPmModule, RemotePmModule>(module);
|
||||
this->system_event.AttachReadableHandle(module.event.revent, false, clear_mode);
|
||||
|
|
Loading…
Reference in a new issue