mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 12:21:51 +01:00
Support passing additional constructor arguments to nvdrv devices
Needed for host1x channels which use the same class for multiple types.
This commit is contained in:
parent
eb6f052873
commit
b0a5dab0f7
@ -23,11 +23,11 @@ namespace skyline::service::nvdrv {
|
|||||||
break; \
|
break; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEVICE_CASE(path, object) \
|
#define DEVICE_CASE(path, object, ...) \
|
||||||
case util::Hash(path): \
|
case util::Hash(path): \
|
||||||
{ \
|
{ \
|
||||||
std::unique_lock lock(deviceMutex); \
|
std::unique_lock lock(deviceMutex); \
|
||||||
devices.emplace(fd, std::make_unique<device::object>(state, *this, core, ctx)); \
|
devices.emplace(fd, std::make_unique<device::object>(state, *this, core, ctx, ##__VA_ARGS__)); \
|
||||||
return NvResult::Success; \
|
return NvResult::Success; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user