diff options
author | mailwl <mailwl@gmail.com> | 2018-06-04 13:43:02 +0200 |
---|---|---|
committer | mailwl <mailwl@gmail.com> | 2018-06-04 13:43:02 +0200 |
commit | bb081dd1d2eae765ac429a29d9260d69c184d647 (patch) | |
tree | 4d80cbe3cf673a6b85f8404572ab7a1dc2ed7366 | |
parent | Service/nfp:user : stub some functions. (diff) | |
download | yuzu-bb081dd1d2eae765ac429a29d9260d69c184d647.tar yuzu-bb081dd1d2eae765ac429a29d9260d69c184d647.tar.gz yuzu-bb081dd1d2eae765ac429a29d9260d69c184d647.tar.bz2 yuzu-bb081dd1d2eae765ac429a29d9260d69c184d647.tar.lz yuzu-bb081dd1d2eae765ac429a29d9260d69c184d647.tar.xz yuzu-bb081dd1d2eae765ac429a29d9260d69c184d647.tar.zst yuzu-bb081dd1d2eae765ac429a29d9260d69c184d647.zip |
-rw-r--r-- | src/core/hle/service/nfp/nfp.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp index ebb98144f..1e038645f 100644 --- a/src/core/hle/service/nfp/nfp.cpp +++ b/src/core/hle/service/nfp/nfp.cpp @@ -5,6 +5,7 @@ #include "common/logging/log.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/event.h" +#include "core/hle/service/hid/hid.h" #include "core/hle/service/nfp/nfp.h" #include "core/hle/service/nfp/nfp_user.h" @@ -70,10 +71,16 @@ private: } void ListDevices(Kernel::HLERequestContext& ctx) { - NGLOG_WARNING(Service_NFP, "(STUBBED) called"); + IPC::RequestParser rp{ctx}; + const u32 array_size = rp.Pop<u32>(); + + ctx.WriteBuffer(&device_handle, sizeof(device_handle)); + + NGLOG_WARNING(Service_NFP, "(STUBBED) called, array_size={}", array_size); + IPC::ResponseBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); - rb.Push<u32>(0); + rb.Push<u32>(1); } void AttachActivateEvent(Kernel::HLERequestContext& ctx) { @@ -105,12 +112,17 @@ private: } void GetNpadId(Kernel::HLERequestContext& ctx) { - NGLOG_WARNING(Service_NFP, "(STUBBED) called"); + IPC::RequestParser rp{ctx}; + const u64 dev_handle = rp.Pop<u64>(); + + NGLOG_WARNING(Service_NFP, "(STUBBED) called, dev_handle=0x{:X}", dev_handle); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(RESULT_SUCCESS); - rb.Push<u32>(0); + rb.Push<u32>(npad_id); } + const u64 device_handle{0xDEAD}; + const HID::ControllerID npad_id{HID::Controller_Player1}; State state{State::NonInitialized}; DeviceState device_state{DeviceState::Initialized}; Kernel::SharedPtr<Kernel::Event> activate_event; |