mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-22 13:02:38 +02:00
setsys: 13.0.0 support
This commit is contained in:
parent
4ac0a9ffdc
commit
0a64ff5af0
@ -595,7 +595,7 @@ typedef struct {
|
|||||||
u8 field[4];
|
u8 field[4];
|
||||||
} SetSysColor4u8Type;
|
} SetSysColor4u8Type;
|
||||||
|
|
||||||
/// NxControllerSettings
|
/// NxControllerLegacySettings
|
||||||
typedef struct {
|
typedef struct {
|
||||||
BtdrvAddress address;
|
BtdrvAddress address;
|
||||||
u8 type; ///< \ref SetSysControllerType.
|
u8 type; ///< \ref SetSysControllerType.
|
||||||
@ -605,6 +605,11 @@ typedef struct {
|
|||||||
u8 unk_x1F[8];
|
u8 unk_x1F[8];
|
||||||
u8 unk_x27;
|
u8 unk_x27;
|
||||||
u8 interface_type; ///< Bitmask with \ref XcdInterfaceType.
|
u8 interface_type; ///< Bitmask with \ref XcdInterfaceType.
|
||||||
|
} SetSysNxControllerLegacySettings;
|
||||||
|
|
||||||
|
/// NxControllerSettings
|
||||||
|
typedef struct {
|
||||||
|
u8 unk_x0[0x42C]; ///< Unknown
|
||||||
} SetSysNxControllerSettings;
|
} SetSysNxControllerSettings;
|
||||||
|
|
||||||
/// ConsoleSixAxisSensorAccelerationBias
|
/// ConsoleSixAxisSensorAccelerationBias
|
||||||
@ -1193,16 +1198,16 @@ Result setsysGetAudioOutputMode(SetSysAudioOutputModeTarget target, SetSysAudioO
|
|||||||
Result setsysSetAudioOutputMode(SetSysAudioOutputModeTarget target, SetSysAudioOutputMode mode);
|
Result setsysSetAudioOutputMode(SetSysAudioOutputModeTarget target, SetSysAudioOutputMode mode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief IsForceMuteOnHeadphoneRemoved
|
* @brief GetSpeakerAutoMuteFlag
|
||||||
* @param[out] out Output flag.
|
* @param[out] out Output flag.
|
||||||
*/
|
*/
|
||||||
Result setsysIsForceMuteOnHeadphoneRemoved(bool *out);
|
Result setsysGetSpeakerAutoMuteFlag(bool *out);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief SetForceMuteOnHeadphoneRemoved
|
* @brief SetSpeakerAutoMuteFlag
|
||||||
* @param[in] flag Input flag.
|
* @param[in] flag Input flag.
|
||||||
*/
|
*/
|
||||||
Result setsysSetForceMuteOnHeadphoneRemoved(bool flag);
|
Result setsysSetSpeakerAutoMuteFlag(bool flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief GetQuestFlag
|
* @brief GetQuestFlag
|
||||||
@ -1513,18 +1518,20 @@ Result setsysSetAutoUpdateEnableFlag(bool flag);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief GetNxControllerSettings
|
* @brief GetNxControllerSettings
|
||||||
|
* @note On [13.0.0+] \ref setsysGetNxControllerSettingsEx should be used instead.
|
||||||
* @param[out] total_out Total output entries.
|
* @param[out] total_out Total output entries.
|
||||||
* @param[out] settings Output array of \ref SetSysNxControllerSettings.
|
* @param[out] settings Output array of \ref SetSysNxControllerLegacySettings.
|
||||||
* @param[in] count Size of the settings array in entries.
|
* @param[in] count Size of the settings array in entries.
|
||||||
*/
|
*/
|
||||||
Result setsysGetNxControllerSettings(s32 *total_out, SetSysNxControllerSettings *settings, s32 count);
|
Result setsysGetNxControllerSettings(s32 *total_out, SetSysNxControllerLegacySettings *settings, s32 count);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief SetNxControllerSettings
|
* @brief SetNxControllerSettings
|
||||||
* @param[in] settings Input array of \ref SetSysNxControllerSettings.
|
* @note On [13.0.0+] \ref setsysSetNxControllerSettingsEx should be used instead.
|
||||||
|
* @param[in] settings Input array of \ref SetSysNxControllerLegacySettings.
|
||||||
* @param[in] count Size of the settings array in entries.
|
* @param[in] count Size of the settings array in entries.
|
||||||
*/
|
*/
|
||||||
Result setsysSetNxControllerSettings(const SetSysNxControllerSettings *settings, s32 count);
|
Result setsysSetNxControllerSettings(const SetSysNxControllerLegacySettings *settings, s32 count);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief GetBatteryPercentageFlag
|
* @brief GetBatteryPercentageFlag
|
||||||
@ -2283,6 +2290,21 @@ Result setsysGetFieldTestingFlag(bool *out);
|
|||||||
*/
|
*/
|
||||||
Result setsysSetFieldTestingFlag(bool flag);
|
Result setsysSetFieldTestingFlag(bool flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GetNxControllerSettingsEx
|
||||||
|
* @param[out] total_out Total output entries.
|
||||||
|
* @param[out] settings Output array of \ref SetSysNxControllerSettings.
|
||||||
|
* @param[in] count Size of the settings array in entries.
|
||||||
|
*/
|
||||||
|
Result setsysGetNxControllerSettingsEx(s32 *total_out, SetSysNxControllerSettings *settings, s32 count);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SetNxControllerSettingsEx
|
||||||
|
* @param[in] settings Input array of \ref SetSysNxControllerSettings.
|
||||||
|
* @param[in] count Size of the settings array in entries.
|
||||||
|
*/
|
||||||
|
Result setsysSetNxControllerSettingsEx(const SetSysNxControllerSettings *settings, s32 count);
|
||||||
|
|
||||||
/// Initialize setcal.
|
/// Initialize setcal.
|
||||||
Result setcalInitialize(void);
|
Result setcalInitialize(void);
|
||||||
|
|
||||||
|
@ -492,11 +492,11 @@ Result setsysSetAudioOutputMode(SetSysAudioOutputModeTarget target, SetSysAudioO
|
|||||||
return serviceDispatchIn(&g_setsysSrv, 44, in);
|
return serviceDispatchIn(&g_setsysSrv, 44, in);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result setsysIsForceMuteOnHeadphoneRemoved(bool *out) {
|
Result setsysGetSpeakerAutoMuteFlag(bool *out) {
|
||||||
return _setCmdNoInOutBool(&g_setsysSrv, out, 45);
|
return _setCmdNoInOutBool(&g_setsysSrv, out, 45);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result setsysSetForceMuteOnHeadphoneRemoved(bool flag) {
|
Result setsysSetSpeakerAutoMuteFlag(bool flag) {
|
||||||
return _setCmdInBoolNoOut(&g_setsysSrv, flag, 46);
|
return _setCmdInBoolNoOut(&g_setsysSrv, flag, 46);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -734,23 +734,23 @@ Result setsysSetAutoUpdateEnableFlag(bool flag) {
|
|||||||
return _setCmdInBoolNoOut(&g_setsysSrv, flag, 96);
|
return _setCmdInBoolNoOut(&g_setsysSrv, flag, 96);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result setsysGetNxControllerSettings(s32 *total_out, SetSysNxControllerSettings *settings, s32 count) {
|
Result setsysGetNxControllerSettings(s32 *total_out, SetSysNxControllerLegacySettings *settings, s32 count) {
|
||||||
if (hosversionBefore(2,0,0))
|
if (hosversionBefore(2,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
return serviceDispatchOut(&g_setsysSrv, 97, *total_out,
|
return serviceDispatchOut(&g_setsysSrv, 97, *total_out,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
.buffers = { { settings, count*sizeof(SetSysNxControllerSettings) } },
|
.buffers = { { settings, count*sizeof(SetSysNxControllerLegacySettings) } },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result setsysSetNxControllerSettings(const SetSysNxControllerSettings *settings, s32 count) {
|
Result setsysSetNxControllerSettings(const SetSysNxControllerLegacySettings *settings, s32 count) {
|
||||||
if (hosversionBefore(2,0,0))
|
if (hosversionBefore(2,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
return serviceDispatch(&g_setsysSrv, 98,
|
return serviceDispatch(&g_setsysSrv, 98,
|
||||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
.buffers = { { settings, count*sizeof(SetSysNxControllerSettings) } },
|
.buffers = { { settings, count*sizeof(SetSysNxControllerLegacySettings) } },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1566,6 +1566,26 @@ Result setsysSetFieldTestingFlag(bool flag) {
|
|||||||
return _setCmdInBoolNoOut(&g_setsysSrv, flag, 202);
|
return _setCmdInBoolNoOut(&g_setsysSrv, flag, 202);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result setsysGetNxControllerSettingsEx(s32 *total_out, SetSysNxControllerSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(13,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatchOut(&g_setsysSrv, 205, *total_out,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysNxControllerSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysSetNxControllerSettingsEx(const SetSysNxControllerSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(13,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatch(&g_setsysSrv, 206,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysNxControllerSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Result setcalGetBdAddress(SetCalBdAddress *out) {
|
Result setcalGetBdAddress(SetCalBdAddress *out) {
|
||||||
return serviceDispatchOut(&g_setcalSrv, 0, *out);
|
return serviceDispatchOut(&g_setcalSrv, 0, *out);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user