mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
Add new 10.0.0 settings calls (#404)
This commit is contained in:
parent
b1b80f5493
commit
e79c8a2467
@ -719,6 +719,16 @@ typedef struct {
|
|||||||
u32 extra_color; ///< Extra Color.
|
u32 extra_color; ///< Extra Color.
|
||||||
} SetSysHomeMenuScheme;
|
} SetSysHomeMenuScheme;
|
||||||
|
|
||||||
|
/// ButtonConfigSettings
|
||||||
|
typedef struct {
|
||||||
|
u8 settings[0x5A8];
|
||||||
|
} SetSysButtonConfigSettings;
|
||||||
|
|
||||||
|
/// ButtonConfigRegisteredSettings
|
||||||
|
typedef struct {
|
||||||
|
u8 settings[0x5C8];
|
||||||
|
} SetSysButtonConfigRegisteredSettings;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 offset[0x6];
|
u8 offset[0x6];
|
||||||
} SetCalAccelerometerOffset;
|
} SetCalAccelerometerOffset;
|
||||||
@ -2131,6 +2141,102 @@ Result setsysGetTouchScreenMode(SetSysTouchScreenMode *out);
|
|||||||
*/
|
*/
|
||||||
Result setsysSetTouchScreenMode(SetSysTouchScreenMode mode);
|
Result setsysSetTouchScreenMode(SetSysTouchScreenMode mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GetButtonConfigSettingsFull
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[out] total_out Total output entries.
|
||||||
|
* @param[out] settings Output array of \ref SetSysButtonConfigSettings.
|
||||||
|
* @param[in] count Size of the settings array in entries.
|
||||||
|
*/
|
||||||
|
Result setsysGetButtonConfigSettingsFull(s32 *total_out, SetSysButtonConfigSettings *settings, s32 count);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SetButtonConfigSettingsFull
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[in] settings Input array of \ref SetSysButtonConfigSettings.
|
||||||
|
* @param[in] count Size of the settings array in entries.
|
||||||
|
*/
|
||||||
|
Result setsysSetButtonConfigSettingsFull(const SetSysButtonConfigSettings *settings, s32 count);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GetButtonConfigSettingsEmbedded
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[out] total_out Total output entries.
|
||||||
|
* @param[out] settings Output array of \ref SetSysButtonConfigSettings.
|
||||||
|
* @param[in] count Size of the settings array in entries.
|
||||||
|
*/
|
||||||
|
Result setsysGetButtonConfigSettingsEmbedded(s32 *total_out, SetSysButtonConfigSettings *settings, s32 count);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SetButtonConfigSettingsEmbedded
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[in] settings Input array of \ref SetSysButtonConfigSettings.
|
||||||
|
* @param[in] count Size of the settings array in entries.
|
||||||
|
*/
|
||||||
|
Result setsysSetButtonConfigSettingsEmbedded(const SetSysButtonConfigSettings *settings, s32 count);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GetButtonConfigSettingsLeft
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[out] total_out Total output entries.
|
||||||
|
* @param[out] settings Output array of \ref SetSysButtonConfigSettings.
|
||||||
|
* @param[in] count Size of the settings array in entries.
|
||||||
|
*/
|
||||||
|
Result setsysGetButtonConfigSettingsLeft(s32 *total_out, SetSysButtonConfigSettings *settings, s32 count);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SetButtonConfigSettingsLeft
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[in] settings Input array of \ref SetSysButtonConfigSettings.
|
||||||
|
* @param[in] count Size of the settings array in entries.
|
||||||
|
*/
|
||||||
|
Result setsysSetButtonConfigSettingsLeft(const SetSysButtonConfigSettings *settings, s32 count);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GetButtonConfigSettingsRight
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[out] total_out Total output entries.
|
||||||
|
* @param[out] settings Output array of \ref SetSysButtonConfigSettings.
|
||||||
|
* @param[in] count Size of the settings array in entries.
|
||||||
|
*/
|
||||||
|
Result setsysGetButtonConfigSettingsRight(s32 *total_out, SetSysButtonConfigSettings *settings, s32 count);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SetButtonConfigSettingsRight
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[in] settings Input array of \ref SetSysButtonConfigSettings.
|
||||||
|
* @param[in] count Size of the settings array in entries.
|
||||||
|
*/
|
||||||
|
Result setsysSetButtonConfigSettingsRight(const SetSysButtonConfigSettings *settings, s32 count);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GetButtonConfigRegisteredSettingsEmbedded
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[out] settings \ref SetSysButtonConfigRegisteredSettings
|
||||||
|
*/
|
||||||
|
Result setsysGetButtonConfigRegisteredSettingsEmbedded(SetSysButtonConfigRegisteredSettings *settings);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SetButtonConfigRegisteredSettingsEmbedded
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[in] settings \ref SetSysButtonConfigRegisteredSettings
|
||||||
|
*/
|
||||||
|
Result setsysSetButtonConfigRegisteredSettingsEmbedded(const SetSysButtonConfigRegisteredSettings *settings);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GetButtonConfigRegisteredSettings
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[out] settings \ref SetSysButtonConfigRegisteredSettings
|
||||||
|
*/
|
||||||
|
Result setsysGetButtonConfigRegisteredSettings(s32 *total_out, SetSysButtonConfigRegisteredSettings *settings, s32 count);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SetButtonConfigRegisteredSettings
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[in] settings \ref SetSysButtonConfigRegisteredSettings
|
||||||
|
*/
|
||||||
|
Result setsysSetButtonConfigRegisteredSettings(const SetSysButtonConfigRegisteredSettings *settings, s32 count);
|
||||||
|
|
||||||
/// Initialize setcal.
|
/// Initialize setcal.
|
||||||
Result setcalInitialize(void);
|
Result setcalInitialize(void);
|
||||||
|
|
||||||
@ -2406,3 +2512,17 @@ Result setcalGetConsoleSixAxisSensorHorizontalOffset(SetCalConsoleSixAxisSensorH
|
|||||||
* @param[out] out_version Output BatteryVersion.
|
* @param[out] out_version Output BatteryVersion.
|
||||||
*/
|
*/
|
||||||
Result setcalGetBatteryVersion(u8 *out_version);
|
Result setcalGetBatteryVersion(u8 *out_version);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GetDeviceId
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[out] out_type Output DeviceId.
|
||||||
|
*/
|
||||||
|
Result setcalGetDeviceId(u64 *out_device_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief GetConsoleSixAxisSensorMountType
|
||||||
|
* @note Only available on [10.0.0+].
|
||||||
|
* @param[out] out_type Output ConsoleSixAxisSensorMountType.
|
||||||
|
*/
|
||||||
|
Result setcalGetConsoleSixAxisSensorMountType(u8 *out_type);
|
||||||
|
@ -1420,6 +1420,126 @@ Result setsysSetTouchScreenMode(SetSysTouchScreenMode mode) {
|
|||||||
return _setCmdInU32NoOut(&g_setsysSrv, mode, 188);
|
return _setCmdInU32NoOut(&g_setsysSrv, mode, 188);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result setsysGetButtonConfigSettingsFull(s32 *total_out, SetSysButtonConfigSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatchOut(&g_setsysSrv, 189, *total_out,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysButtonConfigSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysSetButtonConfigSettingsFull(const SetSysButtonConfigSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatch(&g_setsysSrv, 190,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysButtonConfigSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysGetButtonConfigSettingsEmbedded(s32 *total_out, SetSysButtonConfigSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatchOut(&g_setsysSrv, 191, *total_out,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysButtonConfigSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysSetButtonConfigSettingsEmbedded(const SetSysButtonConfigSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatch(&g_setsysSrv, 192,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysButtonConfigSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysGetButtonConfigSettingsLeft(s32 *total_out, SetSysButtonConfigSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatchOut(&g_setsysSrv, 193, *total_out,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysButtonConfigSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysSetButtonConfigSettingsLeft(const SetSysButtonConfigSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatch(&g_setsysSrv, 194,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysButtonConfigSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysGetButtonConfigSettingsRight(s32 *total_out, SetSysButtonConfigSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatchOut(&g_setsysSrv, 195, *total_out,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysButtonConfigSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysSetButtonConfigSettingsRight(const SetSysButtonConfigSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatch(&g_setsysSrv, 196,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysButtonConfigSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysGetButtonConfigRegisteredSettingsEmbedded(SetSysButtonConfigRegisteredSettings *settings) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatch(&g_setsysSrv, 197,
|
||||||
|
.buffer_attrs = { SfBufferAttr_FixedSize | SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
|
.buffers = { { settings, sizeof(SetSysButtonConfigRegisteredSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysSetButtonConfigRegisteredSettingsEmbedded(const SetSysButtonConfigRegisteredSettings *settings) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatch(&g_setsysSrv, 198,
|
||||||
|
.buffer_attrs = { SfBufferAttr_FixedSize | SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
|
.buffers = { { settings, sizeof(SetSysButtonConfigRegisteredSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysGetButtonConfigRegisteredSettings(s32 *total_out, SetSysButtonConfigRegisteredSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatchOut(&g_setsysSrv, 199, *total_out,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysButtonConfigRegisteredSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setsysSetButtonConfigRegisteredSettings(const SetSysButtonConfigRegisteredSettings *settings, s32 count) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return serviceDispatch(&g_setsysSrv, 200,
|
||||||
|
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||||
|
.buffers = { { settings, count*sizeof(SetSysButtonConfigRegisteredSettings) } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Result setcalGetBdAddress(SetCalBdAddress *out) {
|
Result setcalGetBdAddress(SetCalBdAddress *out) {
|
||||||
return serviceDispatchOut(&g_setcalSrv, 0, *out);
|
return serviceDispatchOut(&g_setcalSrv, 0, *out);
|
||||||
}
|
}
|
||||||
@ -1670,3 +1790,17 @@ Result setcalGetBatteryVersion(u8 *out_version) {
|
|||||||
|
|
||||||
return _setCmdNoInOutU8(&g_setcalSrv, out_version, 41);
|
return _setCmdNoInOutU8(&g_setcalSrv, out_version, 41);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result setcalGetDeviceId(u64 *out_device_id) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _setCmdNoInOut64(&g_setcalSrv, out_device_id, 42);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result setcalGetConsoleSixAxisSensorMountType(u8 *out_type) {
|
||||||
|
if (hosversionBefore(10,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _setCmdNoInOutU8(&g_setcalSrv, out_type, 43);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user