diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nvdrv/nvdrv.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index cf525a875..9d3013c16 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp @@ -7,8 +7,8 @@ #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" #include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h" #include "core/hle/service/nvdrv/devices/nvmap.h" -#include "core/hle/service/nvdrv/nvdrv.h" #include "core/hle/service/nvdrv/interface.h" +#include "core/hle/service/nvdrv/nvdrv.h" namespace Service { namespace Nvidia { @@ -49,5 +49,15 @@ u32 Module::Ioctl(u32 fd, u32 command, const std::vector<u8>& input, std::vector return device->ioctl(command, input, output); } +ResultCode Module::Close(u32 fd) { + auto itr = open_files.find(fd); + ASSERT_MSG(itr != open_files.end(), "Tried to talk to an invalid device"); + + open_files.erase(itr); + + // TODO(flerovium): return correct result code if operation failed. + return RESULT_SUCCESS; +} + } // namespace Nvidia } // namespace Service |