diff options
author | David <25727384+ogniK5377@users.noreply.github.com> | 2018-02-06 03:19:31 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-02-06 03:19:31 +0100 |
commit | d129905a665ce329089338b4e468da84b3dab5d6 (patch) | |
tree | 6606df27c05539b67fd5b6e36e4ed671496904ae /src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | |
parent | Merge pull request #164 from ogniK5377/libnx_sm_fix (diff) | |
download | yuzu-d129905a665ce329089338b4e468da84b3dab5d6.tar yuzu-d129905a665ce329089338b4e468da84b3dab5d6.tar.gz yuzu-d129905a665ce329089338b4e468da84b3dab5d6.tar.bz2 yuzu-d129905a665ce329089338b4e468da84b3dab5d6.tar.lz yuzu-d129905a665ce329089338b4e468da84b3dab5d6.tar.xz yuzu-d129905a665ce329089338b4e468da84b3dab5d6.tar.zst yuzu-d129905a665ce329089338b4e468da84b3dab5d6.zip |
Diffstat (limited to 'src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index 2078f2187..c0e35237a 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -10,12 +10,12 @@ namespace Service { namespace Nvidia { namespace Devices { -u32 nvhost_ctrl::ioctl(u32 command, const std::vector<u8>& input, std::vector<u8>& output) { +u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%lx, output_size=0x%lx", command, input.size(), output.size()); - switch (command) { - case IocGetConfigCommand: + switch (static_cast<IoctlCommand>(command.raw)) { + case IoctlCommand::IocGetConfigCommand: return NvOsGetConfigU32(input, output); } UNIMPLEMENTED(); @@ -23,19 +23,23 @@ u32 nvhost_ctrl::ioctl(u32 command, const std::vector<u8>& input, std::vector<u8 } u32 nvhost_ctrl::NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& output) { - IocGetConfigParams params; + IocGetConfigParams params{}; std::memcpy(¶ms, input.data(), sizeof(params)); LOG_DEBUG(Service_NVDRV, "called, setting=%s!%s", params.domain_str.data(), params.param_str.data()); if (!strcmp(params.domain_str.data(), "nv")) { if (!strcmp(params.param_str.data(), "NV_MEMORY_PROFILER")) { - params.config_str[0] = '1'; + params.config_str[0] = '0'; + } else if (!strcmp(params.param_str.data(), "NVN_THROUGH_OPENGL")) { + params.config_str[0] = '0'; + } else if (!strcmp(params.param_str.data(), "NVRM_GPU_PREVENT_USE")) { + params.config_str[0] = '0'; } else { - UNIMPLEMENTED(); + params.config_str[0] = '0'; } } else { - UNIMPLEMENTED(); + UNIMPLEMENTED(); // unknown domain? Only nv has been seen so far on hardware } std::memcpy(output.data(), ¶ms, sizeof(params)); return 0; |