diff options
author | Subv <subv2112@gmail.com> | 2018-01-15 23:39:00 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-17 01:03:49 +0100 |
commit | 30657f9ca1485dcf9611d3c4ea3c74d52b350dec (patch) | |
tree | 66254dcdc6002297706d9c7169a46eaff806c611 /src/core/hle/service/nvdrv/nvdrv_a.h | |
parent | VI: Stubbed GetNativeHandle, Create/DestroyStrayLayer and CloseDisplay (diff) | |
download | yuzu-30657f9ca1485dcf9611d3c4ea3c74d52b350dec.tar yuzu-30657f9ca1485dcf9611d3c4ea3c74d52b350dec.tar.gz yuzu-30657f9ca1485dcf9611d3c4ea3c74d52b350dec.tar.bz2 yuzu-30657f9ca1485dcf9611d3c4ea3c74d52b350dec.tar.lz yuzu-30657f9ca1485dcf9611d3c4ea3c74d52b350dec.tar.xz yuzu-30657f9ca1485dcf9611d3c4ea3c74d52b350dec.tar.zst yuzu-30657f9ca1485dcf9611d3c4ea3c74d52b350dec.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nvdrv/nvdrv_a.h | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/src/core/hle/service/nvdrv/nvdrv_a.h b/src/core/hle/service/nvdrv/nvdrv_a.h index 62f10e9f6..743870555 100644 --- a/src/core/hle/service/nvdrv/nvdrv_a.h +++ b/src/core/hle/service/nvdrv/nvdrv_a.h @@ -10,42 +10,20 @@ #include "core/hle/service/service.h" namespace Service { -namespace NVDRV { - -namespace Devices { -class nvdevice; -} +namespace Nvidia { class NVDRV_A final : public ServiceFramework<NVDRV_A> { public: - NVDRV_A(); + NVDRV_A(std::shared_ptr<Module> nvdrv); ~NVDRV_A() = default; - /// Returns a pointer to one of the available devices, identified by its name. - template <typename T> - std::shared_ptr<T> GetDevice(std::string name) { - auto itr = devices.find(name); - if (itr == devices.end()) - return nullptr; - return std::static_pointer_cast<T>(itr->second); - } - private: void Open(Kernel::HLERequestContext& ctx); void Ioctl(Kernel::HLERequestContext& ctx); void Initialize(Kernel::HLERequestContext& ctx); - /// Id to use for the next open file descriptor. - u32 next_fd = 1; - - /// Mapping of file descriptors to the devices they reference. - std::unordered_map<u32, std::shared_ptr<Devices::nvdevice>> open_files; - - /// Mapping of device node names to their implementation. - std::unordered_map<std::string, std::shared_ptr<Devices::nvdevice>> devices; + std::shared_ptr<Module> nvdrv; }; -extern std::weak_ptr<NVDRV_A> nvdrv_a; - -} // namespace NVDRV +} // namespace Nvidia } // namespace Service |