mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 04:22:50 +02:00
btm: update GetHostDeviceProperty for 13.0.0
This commit is contained in:
parent
2c341f1da3
commit
459a5c2125
@ -85,10 +85,21 @@ typedef struct {
|
||||
|
||||
/// HostDeviceProperty
|
||||
typedef struct {
|
||||
BtdrvAddress addr; ///< Same as BtdrvAdapterProperty::addr.
|
||||
BtmClassOfDevice class_of_device; ///< Same as BtdrvAdapterProperty::class_of_device.
|
||||
BtmBdName name; ///< Same as BtdrvAdapterProperty::name (except the last byte which is always zero).
|
||||
u8 feature_set; ///< Same as BtdrvAdapterProperty::feature_set.
|
||||
union {
|
||||
struct {
|
||||
BtdrvAddress addr; ///< Same as BtdrvAdapterProperty::addr.
|
||||
BtmClassOfDevice class_of_device; ///< Same as BtdrvAdapterProperty::class_of_device.
|
||||
BtmBdName name; ///< Same as BtdrvAdapterProperty::name (except the last byte which is always zero).
|
||||
u8 feature_set; ///< Same as BtdrvAdapterProperty::feature_set.
|
||||
} v1; ///< [1.0.0-12.1.0]
|
||||
|
||||
struct {
|
||||
BtdrvAddress addr; ///< Same as BtdrvAdapterProperty::addr.
|
||||
BtmClassOfDevice class_of_device; ///< Same as BtdrvAdapterProperty::class_of_device.
|
||||
char name[0xF9]; ///< Same as BtdrvAdapterProperty::name (except the last byte which is always zero).
|
||||
u8 feature_set; ///< Same as BtdrvAdapterProperty::feature_set.
|
||||
} v13; ///< [13.0.0+]
|
||||
};
|
||||
} BtmHostDeviceProperty;
|
||||
|
||||
/// BtmConnectedDevice [1.0.0-12.1.0]
|
||||
|
@ -156,7 +156,10 @@ Result btmGetState(BtmState *out) {
|
||||
}
|
||||
|
||||
Result btmGetHostDeviceProperty(BtmHostDeviceProperty *out) {
|
||||
return serviceDispatchOut(&g_btmSrv, 1, *out);
|
||||
if (hosversionBefore(13,0,0))
|
||||
return serviceDispatchOut(&g_btmSrv, 1, (*out).v1);
|
||||
|
||||
return _btmCmdOutBufPtrFixed(out, sizeof((*out).v13), 1);
|
||||
}
|
||||
|
||||
Result btmAcquireDeviceConditionEvent(Event* out_event) {
|
||||
|
Loading…
Reference in New Issue
Block a user