diff options
| author | 2024-01-23 10:24:05 -0600 | |
|---|---|---|
| committer | 2024-01-23 10:24:05 -0600 | |
| commit | fc5d76e6e2f92795537ac44b69da19ec4c48250d (patch) | |
| tree | 560135737473d575a2f415d8490b4981ebff4a3b /src/core/hle/service/nvdrv | |
| parent | Merge pull request #12579 from FernandoS27/smmu (diff) | |
| download | yuzu-fc5d76e6e2f92795537ac44b69da19ec4c48250d.tar.gz yuzu-fc5d76e6e2f92795537ac44b69da19ec4c48250d.tar.xz yuzu-fc5d76e6e2f92795537ac44b69da19ec4c48250d.zip | |
service: properly convert buffers to strings
Diffstat (limited to 'src/core/hle/service/nvdrv')
| -rw-r--r-- | src/core/hle/service/nvdrv/nvdrv_interface.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/service/nvdrv/nvdrv_interface.cpp b/src/core/hle/service/nvdrv/nvdrv_interface.cpp index 6e4825313..ffe72f281 100644 --- a/src/core/hle/service/nvdrv/nvdrv_interface.cpp +++ b/src/core/hle/service/nvdrv/nvdrv_interface.cpp | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include "common/logging/log.h" | 5 | #include "common/logging/log.h" |
| 6 | #include "common/scope_exit.h" | 6 | #include "common/scope_exit.h" |
| 7 | #include "common/string_util.h" | ||
| 7 | #include "core/core.h" | 8 | #include "core/core.h" |
| 8 | #include "core/hle/kernel/k_event.h" | 9 | #include "core/hle/kernel/k_event.h" |
| 9 | #include "core/hle/kernel/k_process.h" | 10 | #include "core/hle/kernel/k_process.h" |
| @@ -29,7 +30,7 @@ void NVDRV::Open(HLERequestContext& ctx) { | |||
| 29 | } | 30 | } |
| 30 | 31 | ||
| 31 | const auto& buffer = ctx.ReadBuffer(); | 32 | const auto& buffer = ctx.ReadBuffer(); |
| 32 | const std::string device_name(buffer.begin(), buffer.end()); | 33 | const std::string device_name(Common::StringFromBuffer(buffer)); |
| 33 | 34 | ||
| 34 | if (device_name == "/dev/nvhost-prof-gpu") { | 35 | if (device_name == "/dev/nvhost-prof-gpu") { |
| 35 | rb.Push<DeviceFD>(0); | 36 | rb.Push<DeviceFD>(0); |