mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-29 14:32:58 +02:00
ipc: accept any u32 convertible as command id
This commit is contained in:
parent
4ccee42577
commit
7660d782e0
@ -650,26 +650,24 @@ constexpr Result WrapIpcCommandImpl(IpcResponseContext *ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <u32 c, auto CommandImpl, FirmwareVersion l = FirmwareVersion_Min, FirmwareVersion h = FirmwareVersion_Max>
|
template <auto c, auto CommandImpl, FirmwareVersion l = FirmwareVersion_Min, FirmwareVersion h = FirmwareVersion_Max>
|
||||||
inline static constexpr ServiceCommandMeta MakeServiceCommandMeta() {
|
inline static constexpr ServiceCommandMeta MakeServiceCommandMeta() {
|
||||||
return {
|
return {
|
||||||
.fw_low = l,
|
.fw_low = l,
|
||||||
.fw_high = h,
|
.fw_high = h,
|
||||||
.cmd_id = c,
|
.cmd_id = static_cast<u32>(c),
|
||||||
.handler = WrapIpcCommandImpl<CommandImpl>,
|
.handler = WrapIpcCommandImpl<CommandImpl>,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
template <u32 c, auto CommandImpl, typename OverrideClassType, FirmwareVersion l = FirmwareVersion_Min, FirmwareVersion h = FirmwareVersion_Max>
|
template <auto c, auto CommandImpl, typename OverrideClassType, FirmwareVersion l = FirmwareVersion_Min, FirmwareVersion h = FirmwareVersion_Max>
|
||||||
inline static constexpr ServiceCommandMeta MakeServiceCommandMetaEx() {
|
inline static constexpr ServiceCommandMeta MakeServiceCommandMetaEx() {
|
||||||
return {
|
return {
|
||||||
.fw_low = l,
|
.fw_low = l,
|
||||||
.fw_high = h,
|
.fw_high = h,
|
||||||
.cmd_id = c,
|
.cmd_id = static_cast<u32>(c),
|
||||||
.handler = WrapIpcCommandImpl<CommandImpl, OverrideClassType>,
|
.handler = WrapIpcCommandImpl<CommandImpl, OverrideClassType>,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
Loading…
Reference in New Issue
Block a user