diff options
author | bunnei <bunneidev@gmail.com> | 2018-01-17 03:06:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-17 03:06:52 +0100 |
commit | 8c05e935bd14ab526e35a33b854e36b30aacdcc0 (patch) | |
tree | fd6d1db6ea25ee744f4e65733b4450bdd0fab5ac /src/core/hle/service/nvdrv/nvdrv_a.h | |
parent | Merge pull request #52 from ogniK5377/fsp (diff) | |
parent | applet_oe: Fix GetOperationMode and GetPerformanceMode. (diff) | |
download | yuzu-8c05e935bd14ab526e35a33b854e36b30aacdcc0.tar yuzu-8c05e935bd14ab526e35a33b854e36b30aacdcc0.tar.gz yuzu-8c05e935bd14ab526e35a33b854e36b30aacdcc0.tar.bz2 yuzu-8c05e935bd14ab526e35a33b854e36b30aacdcc0.tar.lz yuzu-8c05e935bd14ab526e35a33b854e36b30aacdcc0.tar.xz yuzu-8c05e935bd14ab526e35a33b854e36b30aacdcc0.tar.zst yuzu-8c05e935bd14ab526e35a33b854e36b30aacdcc0.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nvdrv/nvdrv_a.h | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/core/hle/service/nvdrv/nvdrv_a.h b/src/core/hle/service/nvdrv/nvdrv_a.h deleted file mode 100644 index 62f10e9f6..000000000 --- a/src/core/hle/service/nvdrv/nvdrv_a.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2018 yuzu emulator team -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include <memory> -#include <string> -#include "core/hle/service/nvdrv/nvdrv.h" -#include "core/hle/service/service.h" - -namespace Service { -namespace NVDRV { - -namespace Devices { -class nvdevice; -} - -class NVDRV_A final : public ServiceFramework<NVDRV_A> { -public: - NVDRV_A(); - ~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; -}; - -extern std::weak_ptr<NVDRV_A> nvdrv_a; - -} // namespace NVDRV -} // namespace Service |