diff options
| author | bunnei <bunneidev@gmail.com> | 2018-01-17 12:29:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-17 12:29:23 -0500 |
| commit | 8bff9c91525da2617e5152a16e09b980237dce75 (patch) | |
| tree | 16b569b3e1e1cdf463b5a2effbb266f95571bce2 /src/core/hle/service/nvdrv/interface.cpp | |
| parent | 7fa32af1c7da616eeff970b246274cc5c111abd2 (diff) | |
| parent | 60d650cc4ec377fc0d3096bb3f9900fc4bc10299 (diff) | |
Merge pull request #70 from flerovii/nvdrv-close
nvdrv: stubbed Close(cmd 2)
Diffstat (limited to 'src/core/hle/service/nvdrv/interface.cpp')
| -rw-r--r-- | src/core/hle/service/nvdrv/interface.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp index 0670ca155..848615fa7 100644 --- a/src/core/hle/service/nvdrv/interface.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp @@ -48,6 +48,18 @@ void NVDRV::Ioctl(Kernel::HLERequestContext& ctx) { rb.Push(nv_result); } +void NVDRV::Close(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service, "(STUBBED) called"); + + IPC::RequestParser rp{ctx}; + u32 fd = rp.Pop<u32>(); + + auto result = nvdrv->Close(fd); + + IPC::RequestBuilder rb{ctx, 2}; + rb.Push(result); +} + void NVDRV::Initialize(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service, "(STUBBED) called"); IPC::RequestBuilder rb{ctx, 3}; @@ -60,6 +72,7 @@ NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name) static const FunctionInfo functions[] = { {0, &NVDRV::Open, "Open"}, {1, &NVDRV::Ioctl, "Ioctl"}, + {2, &NVDRV::Close, "Close"}, {3, &NVDRV::Initialize, "Initialize"}, }; RegisterHandlers(functions); |
