Updated sysver checks for the AbstractedPad cmds which were removed in [9.0.0+].

This commit is contained in:
yellows8 2019-09-11 16:36:08 -04:00
parent b89191c435
commit b06a6ff29f
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 13 additions and 8 deletions

View File

@ -90,20 +90,25 @@ Result hiddbgUpdateDesignInfo(u32 colorBody, u32 colorButtons, u32 colorLeftGrip
/// This doesn't seem to be usable? /// This doesn't seem to be usable?
Result hiddbgReadSerialFlash(u32 offset, void* buffer, size_t size, u64 UniquePadId); Result hiddbgReadSerialFlash(u32 offset, void* buffer, size_t size, u64 UniquePadId);
/// Gets a list of AbstractedPadHandles, where AbstractedPadHandles is the output array with max entries = count. total_entries is total entries written to the output array. Only available with [5.0.0+]. /// Gets a list of AbstractedPadHandles, where AbstractedPadHandles is the output array with max entries = count. total_entries is total entries written to the output array.
/// Only available with [5.0.0-8.1.0].
Result hiddbgGetAbstractedPadHandles(u64 *AbstractedPadHandles, s32 count, s32 *total_entries); Result hiddbgGetAbstractedPadHandles(u64 *AbstractedPadHandles, s32 count, s32 *total_entries);
/// Gets the state for the specified AbstractedPadHandle. Only available with [5.0.0+]. /// Gets the state for the specified AbstractedPadHandle.
/// Only available with [5.0.0-8.1.0].
Result hiddbgGetAbstractedPadState(u64 AbstractedPadHandle, HiddbgAbstractedPadState *state); Result hiddbgGetAbstractedPadState(u64 AbstractedPadHandle, HiddbgAbstractedPadState *state);
/// Similar to \ref hiddbgGetAbstractedPadHandles except this also returns the state for each pad in output array states. Only available with [5.0.0+]. /// Similar to \ref hiddbgGetAbstractedPadHandles except this also returns the state for each pad in output array states.
/// Only available with [5.0.0-8.1.0].
Result hiddbgGetAbstractedPadsState(u64 *AbstractedPadHandles, HiddbgAbstractedPadState *states, s32 count, s32 *total_entries); Result hiddbgGetAbstractedPadsState(u64 *AbstractedPadHandles, HiddbgAbstractedPadState *states, s32 count, s32 *total_entries);
/// Sets AutoPilot state for the specified pad. /// Sets AutoPilot state for the specified pad.
/// AbstractedVirtualPadId can be any unique value as long as it's within bounds. For example, 0-7 is usable. /// AbstractedVirtualPadId can be any unique value as long as it's within bounds. For example, 0-7 is usable.
/// Only available with [5.0.0-8.1.0].
Result hiddbgSetAutoPilotVirtualPadState(s8 AbstractedVirtualPadId, const HiddbgAbstractedPadState *state); Result hiddbgSetAutoPilotVirtualPadState(s8 AbstractedVirtualPadId, const HiddbgAbstractedPadState *state);
/// Clears AutoPilot state for the specified pad set by \ref hiddbgSetAutoPilotVirtualPadState. /// Clears AutoPilot state for the specified pad set by \ref hiddbgSetAutoPilotVirtualPadState.
/// Only available with [5.0.0-8.1.0].
Result hiddbgUnsetAutoPilotVirtualPadState(s8 AbstractedVirtualPadId); Result hiddbgUnsetAutoPilotVirtualPadState(s8 AbstractedVirtualPadId);
/// Clears AutoPilot state for all pads set by \ref hiddbgSetAutoPilotVirtualPadState. /// Clears AutoPilot state for all pads set by \ref hiddbgSetAutoPilotVirtualPadState.

View File

@ -293,7 +293,7 @@ Result hiddbgReadSerialFlash(u32 offset, void* buffer, size_t size, u64 UniquePa
} }
Result hiddbgGetAbstractedPadHandles(u64 *AbstractedPadHandles, s32 count, s32 *total_entries) { Result hiddbgGetAbstractedPadHandles(u64 *AbstractedPadHandles, s32 count, s32 *total_entries) {
if (hosversionBefore(5,0,0)) if (hosversionBefore(5,0,0) || hosversionAtLeast(9,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
Result rc; Result rc;
@ -333,7 +333,7 @@ Result hiddbgGetAbstractedPadHandles(u64 *AbstractedPadHandles, s32 count, s32 *
} }
Result hiddbgGetAbstractedPadState(u64 AbstractedPadHandle, HiddbgAbstractedPadState *state) { Result hiddbgGetAbstractedPadState(u64 AbstractedPadHandle, HiddbgAbstractedPadState *state) {
if (hosversionBefore(5,0,0)) if (hosversionBefore(5,0,0) || hosversionAtLeast(9,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
Result rc; Result rc;
@ -373,7 +373,7 @@ Result hiddbgGetAbstractedPadState(u64 AbstractedPadHandle, HiddbgAbstractedPadS
} }
Result hiddbgGetAbstractedPadsState(u64 *AbstractedPadHandles, HiddbgAbstractedPadState *states, s32 count, s32 *total_entries) { Result hiddbgGetAbstractedPadsState(u64 *AbstractedPadHandles, HiddbgAbstractedPadState *states, s32 count, s32 *total_entries) {
if (hosversionBefore(5,0,0)) if (hosversionBefore(5,0,0) || hosversionAtLeast(9,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
Result rc; Result rc;
@ -414,7 +414,7 @@ Result hiddbgGetAbstractedPadsState(u64 *AbstractedPadHandles, HiddbgAbstractedP
} }
Result hiddbgSetAutoPilotVirtualPadState(s8 AbstractedVirtualPadId, const HiddbgAbstractedPadState *state) { Result hiddbgSetAutoPilotVirtualPadState(s8 AbstractedVirtualPadId, const HiddbgAbstractedPadState *state) {
if (hosversionBefore(5,0,0)) if (hosversionBefore(5,0,0) || hosversionAtLeast(9,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
Result rc; Result rc;
@ -454,7 +454,7 @@ Result hiddbgSetAutoPilotVirtualPadState(s8 AbstractedVirtualPadId, const Hiddbg
} }
Result hiddbgUnsetAutoPilotVirtualPadState(s8 AbstractedVirtualPadId) { Result hiddbgUnsetAutoPilotVirtualPadState(s8 AbstractedVirtualPadId) {
if (hosversionBefore(5,0,0)) if (hosversionBefore(5,0,0) || hosversionAtLeast(9,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
Result rc; Result rc;