diff options
author | Chloe Marcec <dmarcecguzman@gmail.com> | 2021-03-25 02:56:42 +0100 |
---|---|---|
committer | Chloe Marcec <dmarcecguzman@gmail.com> | 2021-03-25 02:56:42 +0100 |
commit | 99fdfa1fcdcdba6abcc04733dc2bacd92b285f0a (patch) | |
tree | 4f328dc45f0c8f8068ad4773bef43b66d803b12b /src/core/hle/service/nvdrv/nvdrv.cpp | |
parent | Merge pull request #6101 from ogniK5377/alloc-as-ex (diff) | |
download | yuzu-99fdfa1fcdcdba6abcc04733dc2bacd92b285f0a.tar yuzu-99fdfa1fcdcdba6abcc04733dc2bacd92b285f0a.tar.gz yuzu-99fdfa1fcdcdba6abcc04733dc2bacd92b285f0a.tar.bz2 yuzu-99fdfa1fcdcdba6abcc04733dc2bacd92b285f0a.tar.lz yuzu-99fdfa1fcdcdba6abcc04733dc2bacd92b285f0a.tar.xz yuzu-99fdfa1fcdcdba6abcc04733dc2bacd92b285f0a.tar.zst yuzu-99fdfa1fcdcdba6abcc04733dc2bacd92b285f0a.zip |
Diffstat (limited to 'src/core/hle/service/nvdrv/nvdrv.cpp')
-rw-r--r-- | src/core/hle/service/nvdrv/nvdrv.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index abba80112..ede77858a 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp @@ -89,6 +89,8 @@ DeviceFD Module::Open(const std::string& device_name) { auto device = devices[device_name]; const DeviceFD fd = next_fd++; + device->OnOpen(fd); + open_files[fd] = std::move(device); return fd; @@ -108,7 +110,7 @@ NvResult Module::Ioctl1(DeviceFD fd, Ioctl command, const std::vector<u8>& input return NvResult::NotImplemented; } - return itr->second->Ioctl1(command, input, output); + return itr->second->Ioctl1(fd, command, input, output); } NvResult Module::Ioctl2(DeviceFD fd, Ioctl command, const std::vector<u8>& input, @@ -125,7 +127,7 @@ NvResult Module::Ioctl2(DeviceFD fd, Ioctl command, const std::vector<u8>& input return NvResult::NotImplemented; } - return itr->second->Ioctl2(command, input, inline_input, output); + return itr->second->Ioctl2(fd, command, input, inline_input, output); } NvResult Module::Ioctl3(DeviceFD fd, Ioctl command, const std::vector<u8>& input, @@ -142,7 +144,7 @@ NvResult Module::Ioctl3(DeviceFD fd, Ioctl command, const std::vector<u8>& input return NvResult::NotImplemented; } - return itr->second->Ioctl3(command, input, output, inline_output); + return itr->second->Ioctl3(fd, command, input, output, inline_output); } NvResult Module::Close(DeviceFD fd) { @@ -158,6 +160,8 @@ NvResult Module::Close(DeviceFD fd) { return NvResult::NotImplemented; } + itr->second->OnClose(fd); + open_files.erase(itr); return NvResult::Success; |