diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/nvdrv/nvdrv.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index cc5cfe34e..c5d3e2fff 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <utility> | ||
| 6 | |||
| 5 | #include "core/hle/ipc_helpers.h" | 7 | #include "core/hle/ipc_helpers.h" |
| 6 | #include "core/hle/service/nvdrv/devices/nvdevice.h" | 8 | #include "core/hle/service/nvdrv/devices/nvdevice.h" |
| 7 | #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" | 9 | #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" |
| @@ -45,9 +47,9 @@ u32 Module::Open(std::string device_name) { | |||
| 45 | device_name); | 47 | device_name); |
| 46 | 48 | ||
| 47 | auto device = devices[device_name]; | 49 | auto device = devices[device_name]; |
| 48 | u32 fd = next_fd++; | 50 | const u32 fd = next_fd++; |
| 49 | 51 | ||
| 50 | open_files[fd] = device; | 52 | open_files[fd] = std::move(device); |
| 51 | 53 | ||
| 52 | return fd; | 54 | return fd; |
| 53 | } | 55 | } |
| @@ -56,7 +58,7 @@ u32 Module::Ioctl(u32 fd, u32_le command, const std::vector<u8>& input, std::vec | |||
| 56 | auto itr = open_files.find(fd); | 58 | auto itr = open_files.find(fd); |
| 57 | ASSERT_MSG(itr != open_files.end(), "Tried to talk to an invalid device"); | 59 | ASSERT_MSG(itr != open_files.end(), "Tried to talk to an invalid device"); |
| 58 | 60 | ||
| 59 | auto device = itr->second; | 61 | auto& device = itr->second; |
| 60 | return device->ioctl({command}, input, output); | 62 | return device->ioctl({command}, input, output); |
| 61 | } | 63 | } |
| 62 | 64 | ||