summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-29 03:08:08 +0200
committerLioncash <mathew1800@gmail.com>2018-07-29 03:09:07 +0200
commit7ce68580862b36d17cb9367506b02b9457f93065 (patch)
tree158f72aba42087d227432ae8776f44f91b34cfe5 /src
parentservice: Add btm services (diff)
downloadyuzu-7ce68580862b36d17cb9367506b02b9457f93065.tar
yuzu-7ce68580862b36d17cb9367506b02b9457f93065.tar.gz
yuzu-7ce68580862b36d17cb9367506b02b9457f93065.tar.bz2
yuzu-7ce68580862b36d17cb9367506b02b9457f93065.tar.lz
yuzu-7ce68580862b36d17cb9367506b02b9457f93065.tar.xz
yuzu-7ce68580862b36d17cb9367506b02b9457f93065.tar.zst
yuzu-7ce68580862b36d17cb9367506b02b9457f93065.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/btm/btm.cpp36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp
index f6c0fb8d9..b949bfabd 100644
--- a/src/core/hle/service/btm/btm.cpp
+++ b/src/core/hle/service/btm/btm.cpp
@@ -4,6 +4,9 @@
#include <memory>
+#include "common/logging/log.h"
+#include "core/hle/ipc_helpers.h"
+#include "core/hle/kernel/hle_ipc.h"
#include "core/hle/service/btm/btm.h"
#include "core/hle/service/service.h"
#include "core/hle/service/sm/sm.h"
@@ -65,17 +68,48 @@ public:
}
};
+class IBtmSystemCore final : public ServiceFramework<IBtmSystemCore> {
+public:
+ explicit IBtmSystemCore() : ServiceFramework{"IBtmSystemCore"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "StartGamepadPairingImpl"},
+ {1, nullptr, "CancelGamepadPairingImpl"},
+ {2, nullptr, "ClearGamepadPairingDatabaseImpl"},
+ {3, nullptr, "GetPairedGamepadCountImpl"},
+ {4, nullptr, "EnableRadioImpl"},
+ {5, nullptr, "DisableRadioImpl"},
+ {6, nullptr, "GetRadioOnOffImpl"},
+ {7, nullptr, "AcquireRadioEventImpl"},
+ {8, nullptr, "AcquireGamepadPairingEventImpl"},
+ {9, nullptr, "IsGamepadPairingStartedImpl"},
+ };
+ // clang-format on
+
+ RegisterHandlers(functions);
+ }
+};
+
class BTM_SYS final : public ServiceFramework<BTM_SYS> {
public:
explicit BTM_SYS() : ServiceFramework{"btm:sys"} {
// clang-format off
static const FunctionInfo functions[] = {
- {0, nullptr, "GetCoreImpl"},
+ {0, &BTM_SYS::GetCoreImpl, "GetCoreImpl"},
};
// clang-format on
RegisterHandlers(functions);
}
+
+private:
+ void GetCoreImpl(Kernel::HLERequestContext& ctx) {
+ IPC::ResponseBuilder rb{ctx, 2, 0, 1};
+ rb.Push(RESULT_SUCCESS);
+ rb.PushIpcInterface<IBtmSystemCore>();
+
+ LOG_DEBUG(Service_BTM, "called");
+ }
};
void InstallInterfaces(SM::ServiceManager& sm) {