/ src / core / hle / service / hid / hid_user.cpp
hid_user.cpp
 1  // Copyright 2015 Citra Emulator Project
 2  // Licensed under GPLv2 or any later version
 3  // Refer to the license.txt file included.
 4  
 5  #include "common/archives.h"
 6  #include "core/hle/service/hid/hid_user.h"
 7  
 8  SERIALIZE_EXPORT_IMPL(Service::HID::User)
 9  
10  namespace Service::HID {
11  
12  User::User(std::shared_ptr<Module> hid) : Module::Interface(std::move(hid), "hid:USER", 6) {
13      static const FunctionInfo functions[] = {
14          // clang-format off
15          {0x0001, nullptr, "CalibrateTouchScreen"},
16          {0x0002, nullptr, "UpdateTouchConfig"},
17          {0x000A, &User::GetIPCHandles, "GetIPCHandles"},
18          {0x000B, nullptr, "StartAnalogStickCalibration"},
19          {0x000E, nullptr, "GetAnalogStickCalibrateParam"},
20          {0x0011, &User::EnableAccelerometer, "EnableAccelerometer"},
21          {0x0012, &User::DisableAccelerometer, "DisableAccelerometer"},
22          {0x0013, &User::EnableGyroscopeLow, "EnableGyroscopeLow"},
23          {0x0014, &User::DisableGyroscopeLow, "DisableGyroscopeLow"},
24          {0x0015, &User::GetGyroscopeLowRawToDpsCoefficient, "GetGyroscopeLowRawToDpsCoefficient"},
25          {0x0016, &User::GetGyroscopeLowCalibrateParam, "GetGyroscopeLowCalibrateParam"},
26          {0x0017, &User::GetSoundVolume, "GetSoundVolume"},
27          // clang-format on
28      };
29      RegisterHandlers(functions);
30  }
31  
32  } // namespace Service::HID