mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +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];
|
||||
} SetSysColor4u8Type;
|
||||
|
||||
/// NxControllerSettings
|
||||
/// NxControllerLegacySettings
|
||||
typedef struct {
|
||||
BtdrvAddress address;
|
||||
u8 type; ///< \ref SetSysControllerType.
|
||||
@ -605,6 +605,11 @@ typedef struct {
|
||||
u8 unk_x1F[8];
|
||||
u8 unk_x27;
|
||||
u8 interface_type; ///< Bitmask with \ref XcdInterfaceType.
|
||||
} SetSysNxControllerLegacySettings;
|
||||
|
||||
/// NxControllerSettings
|
||||
typedef struct {
|
||||
u8 unk_x0[0x42C]; ///< Unknown
|
||||
} SetSysNxControllerSettings;
|
||||
|
||||
/// ConsoleSixAxisSensorAccelerationBias
|
||||
@ -1193,16 +1198,16 @@ Result setsysGetAudioOutputMode(SetSysAudioOutputModeTarget target, SetSysAudioO
|
||||
Result setsysSetAudioOutputMode(SetSysAudioOutputModeTarget target, SetSysAudioOutputMode mode);
|
||||
|
||||
/**
|
||||
* @brief IsForceMuteOnHeadphoneRemoved
|
||||
* @brief GetSpeakerAutoMuteFlag
|
||||
* @param[out] out Output flag.
|
||||
*/
|
||||
Result setsysIsForceMuteOnHeadphoneRemoved(bool *out);
|
||||
Result setsysGetSpeakerAutoMuteFlag(bool *out);
|
||||
|
||||
/**
|
||||
* @brief SetForceMuteOnHeadphoneRemoved
|
||||
* @brief SetSpeakerAutoMuteFlag
|
||||
* @param[in] flag Input flag.
|
||||
*/
|
||||
Result setsysSetForceMuteOnHeadphoneRemoved(bool flag);
|
||||
Result setsysSetSpeakerAutoMuteFlag(bool flag);
|
||||
|
||||
/**
|
||||
* @brief GetQuestFlag
|
||||
@ -1513,18 +1518,20 @@ Result setsysSetAutoUpdateEnableFlag(bool flag);
|
||||
|
||||
/**
|
||||
* @brief GetNxControllerSettings
|
||||
* @note On [13.0.0+] \ref setsysGetNxControllerSettingsEx should be used instead.
|
||||
* @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.
|
||||
*/
|
||||
Result setsysGetNxControllerSettings(s32 *total_out, SetSysNxControllerSettings *settings, s32 count);
|
||||
Result setsysGetNxControllerSettings(s32 *total_out, SetSysNxControllerLegacySettings *settings, s32 count);
|
||||
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
Result setsysSetNxControllerSettings(const SetSysNxControllerSettings *settings, s32 count);
|
||||
Result setsysSetNxControllerSettings(const SetSysNxControllerLegacySettings *settings, s32 count);
|
||||
|
||||
/**
|
||||
* @brief GetBatteryPercentageFlag
|
||||
@ -2283,6 +2290,21 @@ Result setsysGetFieldTestingFlag(bool *out);
|
||||
*/
|
||||
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.
|
||||
Result setcalInitialize(void);
|
||||
|
||||
|
@ -492,11 +492,11 @@ Result setsysSetAudioOutputMode(SetSysAudioOutputModeTarget target, SetSysAudioO
|
||||
return serviceDispatchIn(&g_setsysSrv, 44, in);
|
||||
}
|
||||
|
||||
Result setsysIsForceMuteOnHeadphoneRemoved(bool *out) {
|
||||
Result setsysGetSpeakerAutoMuteFlag(bool *out) {
|
||||
return _setCmdNoInOutBool(&g_setsysSrv, out, 45);
|
||||
}
|
||||
|
||||
Result setsysSetForceMuteOnHeadphoneRemoved(bool flag) {
|
||||
Result setsysSetSpeakerAutoMuteFlag(bool flag) {
|
||||
return _setCmdInBoolNoOut(&g_setsysSrv, flag, 46);
|
||||
}
|
||||
|
||||
@ -734,23 +734,23 @@ Result setsysSetAutoUpdateEnableFlag(bool flag) {
|
||||
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))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
return serviceDispatchOut(&g_setsysSrv, 97, *total_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))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
return serviceDispatch(&g_setsysSrv, 98,
|
||||
.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);
|
||||
}
|
||||
|
||||
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) {
|
||||
return serviceDispatchOut(&g_setcalSrv, 0, *out);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user