mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
btdrv: Use InitializeBluetoothDriver during init.
This commit is contained in:
parent
a5e8572019
commit
7e06e0e657
@ -6,10 +6,16 @@
|
||||
|
||||
static Service g_btdrvSrv;
|
||||
|
||||
static Result _btdrvCmdNoIO(u32 cmd_id);
|
||||
|
||||
NX_GENERATE_SERVICE_GUARD(btdrv);
|
||||
|
||||
Result _btdrvInitialize(void) {
|
||||
return smGetService(&g_btdrvSrv, "btdrv");
|
||||
Result rc=0;
|
||||
|
||||
rc = smGetService(&g_btdrvSrv, "btdrv");
|
||||
if (R_SUCCEEDED(rc)) rc = _btdrvCmdNoIO(0); // InitializeBluetoothDriver
|
||||
return rc;
|
||||
}
|
||||
|
||||
void _btdrvCleanup(void) {
|
||||
@ -20,6 +26,10 @@ Service* btdrvGetServiceSession(void) {
|
||||
return &g_btdrvSrv;
|
||||
}
|
||||
|
||||
static Result _btdrvCmdNoIO(u32 cmd_id) {
|
||||
return serviceDispatch(&g_btdrvSrv, cmd_id);
|
||||
}
|
||||
|
||||
Result btdrvReadGattCharacteristic(bool flag, u8 unk, u32 unk2, const BtdrvGattId *id0, const BtdrvGattId *id1) {
|
||||
if (hosversionBefore(5,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
Loading…
Reference in New Issue
Block a user