From b0a5dab0f767ecca23a5c42917f2b8602d7be93c Mon Sep 17 00:00:00 2001 From: Billy Laws <blaws05@gmail.com> Date: Sun, 24 Oct 2021 16:01:20 +0100 Subject: [PATCH] Support passing additional constructor arguments to nvdrv devices Needed for host1x channels which use the same class for multiple types. --- app/src/main/cpp/skyline/services/nvdrv/driver.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/cpp/skyline/services/nvdrv/driver.cpp b/app/src/main/cpp/skyline/services/nvdrv/driver.cpp index a0d651ea..340ac62d 100644 --- a/app/src/main/cpp/skyline/services/nvdrv/driver.cpp +++ b/app/src/main/cpp/skyline/services/nvdrv/driver.cpp @@ -23,12 +23,12 @@ namespace skyline::service::nvdrv { break; \ } - #define DEVICE_CASE(path, object) \ - case util::Hash(path): \ - { \ - std::unique_lock lock(deviceMutex); \ - devices.emplace(fd, std::make_unique<device::object>(state, *this, core, ctx)); \ - return NvResult::Success; \ + #define DEVICE_CASE(path, object, ...) \ + case util::Hash(path): \ + { \ + std::unique_lock lock(deviceMutex); \ + devices.emplace(fd, std::make_unique<device::object>(state, *this, core, ctx, ##__VA_ARGS__)); \ + return NvResult::Success; \ } DEVICE_SWITCH(