diff options
author | Lioncash <mathew1800@gmail.com> | 2018-07-26 14:39:25 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-07-26 21:05:24 +0200 |
commit | 82cb5f030d8d9c8903fdd20ec984836b36ec6f3d (patch) | |
tree | 3d3ac220484197b3b825d166ab71d5362d978817 | |
parent | Merge pull request #836 from FearlessTobi/port-3594 (diff) | |
download | yuzu-82cb5f030d8d9c8903fdd20ec984836b36ec6f3d.tar yuzu-82cb5f030d8d9c8903fdd20ec984836b36ec6f3d.tar.gz yuzu-82cb5f030d8d9c8903fdd20ec984836b36ec6f3d.tar.bz2 yuzu-82cb5f030d8d9c8903fdd20ec984836b36ec6f3d.tar.lz yuzu-82cb5f030d8d9c8903fdd20ec984836b36ec6f3d.tar.xz yuzu-82cb5f030d8d9c8903fdd20ec984836b36ec6f3d.tar.zst yuzu-82cb5f030d8d9c8903fdd20ec984836b36ec6f3d.zip |
-rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 3 | ||||
-rw-r--r-- | src/core/hle/service/hid/irs.cpp | 49 | ||||
-rw-r--r-- | src/core/hle/service/hid/irs.h | 21 |
4 files changed, 75 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 063e18d64..73339e2e0 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -160,6 +160,8 @@ add_library(core STATIC hle/service/grc/grc.h hle/service/hid/hid.cpp hle/service/hid/hid.h + hle/service/hid/irs.cpp + hle/service/hid/irs.h hle/service/ldn/ldn.cpp hle/service/ldn/ldn.h hle/service/ldr/ldr.cpp diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 9a02ba686..64a6fdeed 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -14,6 +14,7 @@ #include "core/hle/kernel/event.h" #include "core/hle/kernel/shared_memory.h" #include "core/hle/service/hid/hid.h" +#include "core/hle/service/hid/irs.h" #include "core/hle/service/service.h" namespace Service::HID { @@ -559,6 +560,8 @@ void ReloadInputDevices() {} void InstallInterfaces(SM::ServiceManager& service_manager) { std::make_shared<Hid>()->InstallAsService(service_manager); + std::make_shared<IRS>()->InstallAsService(service_manager); + std::make_shared<IRS_SYS>()->InstallAsService(service_manager); } } // namespace Service::HID diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp new file mode 100644 index 000000000..aaf311912 --- /dev/null +++ b/src/core/hle/service/hid/irs.cpp @@ -0,0 +1,49 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "core/hle/service/hid/irs.h" + +namespace Service::HID { + +IRS::IRS() : ServiceFramework{"irs"} { + // clang-format off + static const FunctionInfo functions[] = { + {302, nullptr, "ActivateIrsensor"}, + {303, nullptr, "DeactivateIrsensor"}, + {304, nullptr, "GetIrsensorSharedMemoryHandle"}, + {305, nullptr, "StopImageProcessor"}, + {306, nullptr, "RunMomentProcessor"}, + {307, nullptr, "RunClusteringProcessor"}, + {308, nullptr, "RunImageTransferProcessor"}, + {309, nullptr, "GetImageTransferProcessorState"}, + {310, nullptr, "RunTeraPluginProcessor"}, + {311, nullptr, "GetNpadIrCameraHandle"}, + {312, nullptr, "RunPointingProcessor"}, + {313, nullptr, "SuspendImageProcessor"}, + {314, nullptr, "CheckFirmwareVersion"}, + {315, nullptr, "SetFunctionLevel"}, + {316, nullptr, "RunImageTransferExProcessor"}, + {317, nullptr, "RunIrLedProcessor"}, + {318, nullptr, "StopImageProcessorAsync"}, + {319, nullptr, "ActivateIrsensorWithFunctionLevel"}, + }; + // clang-format on + + RegisterHandlers(functions); +} + +IRS_SYS::IRS_SYS() : ServiceFramework{"irs:sys"} { + // clang-format off + static const FunctionInfo functions[] = { + {500, nullptr, "SetAppletResourceUserId"}, + {501, nullptr, "RegisterAppletResourceUserId"}, + {502, nullptr, "UnregisterAppletResourceUserId"}, + {503, nullptr, "EnableAppletToGetInput"}, + }; + // clang-format on + + RegisterHandlers(functions); +} + +} // namespace Service::HID diff --git a/src/core/hle/service/hid/irs.h b/src/core/hle/service/hid/irs.h new file mode 100644 index 000000000..a8be701c7 --- /dev/null +++ b/src/core/hle/service/hid/irs.h @@ -0,0 +1,21 @@ +// Copyright 2018 yuzu emulator team +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "core/hle/service/service.h" + +namespace Service::HID { + +class IRS final : public ServiceFramework<IRS> { +public: + explicit IRS(); +}; + +class IRS_SYS final : public ServiceFramework<IRS_SYS> { +public: + explicit IRS_SYS(); +}; + +} // namespace Service::HID |