diff options
author | bunnei <bunneidev@gmail.com> | 2018-01-22 04:01:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-22 04:01:27 +0100 |
commit | fdbb039427b077ef92532f07e4b4e730457a1057 (patch) | |
tree | 5ededfe6efb510061f918331fd8974abca4ca32d /src/core/hle/service/nvdrv | |
parent | Merge pull request #130 from MerryMage/dynarmic (diff) | |
parent | nvmap: Add a return 0 underneath the UNIMPLEMENTED macro (diff) | |
download | yuzu-fdbb039427b077ef92532f07e4b4e730457a1057.tar yuzu-fdbb039427b077ef92532f07e4b4e730457a1057.tar.gz yuzu-fdbb039427b077ef92532f07e4b4e730457a1057.tar.bz2 yuzu-fdbb039427b077ef92532f07e4b4e730457a1057.tar.lz yuzu-fdbb039427b077ef92532f07e4b4e730457a1057.tar.xz yuzu-fdbb039427b077ef92532f07e4b4e730457a1057.tar.zst yuzu-fdbb039427b077ef92532f07e4b4e730457a1057.zip |
Diffstat (limited to 'src/core/hle/service/nvdrv')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvmap.cpp | 13 | ||||
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvmap.h | 12 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp index d37b5b159..74ee7e154 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.cpp +++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp @@ -22,20 +22,21 @@ VAddr nvmap::GetObjectAddress(u32 handle) const { } u32 nvmap::ioctl(u32 command, const std::vector<u8>& input, std::vector<u8>& output) { - switch (command) { - case IocCreateCommand: + switch (static_cast<IoctlCommand>(command)) { + case IoctlCommand::Create: return IocCreate(input, output); - case IocAllocCommand: + case IoctlCommand::Alloc: return IocAlloc(input, output); - case IocGetIdCommand: + case IoctlCommand::GetId: return IocGetId(input, output); - case IocFromIdCommand: + case IoctlCommand::FromId: return IocFromId(input, output); - case IocParamCommand: + case IoctlCommand::Param: return IocParam(input, output); } UNIMPLEMENTED(); + return 0; } u32 nvmap::IocCreate(const std::vector<u8>& input, std::vector<u8>& output) { diff --git a/src/core/hle/service/nvdrv/devices/nvmap.h b/src/core/hle/service/nvdrv/devices/nvmap.h index 6954c0324..42e00f370 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.h +++ b/src/core/hle/service/nvdrv/devices/nvmap.h @@ -48,12 +48,12 @@ private: /// Mapping of currently allocated handles to the objects they represent. std::unordered_map<u32, std::shared_ptr<Object>> handles; - enum IoctlCommands { - IocCreateCommand = 0xC0080101, - IocFromIdCommand = 0xC0080103, - IocAllocCommand = 0xC0200104, - IocParamCommand = 0xC00C0109, - IocGetIdCommand = 0xC008010E + enum class IoctlCommand : u32 { + Create = 0xC0080101, + FromId = 0xC0080103, + Alloc = 0xC0200104, + Param = 0xC00C0109, + GetId = 0xC008010E }; struct IocCreateParams { |