diff --git a/Lilu/Headers/kern_iokit.hpp b/Lilu/Headers/kern_iokit.hpp index ea407d70..1fa4e3af 100644 --- a/Lilu/Headers/kern_iokit.hpp +++ b/Lilu/Headers/kern_iokit.hpp @@ -50,6 +50,17 @@ namespace WIOKit { return false; } + template + inline bool getOSDataValue(const OSObject *obj, const char *name, T &value) { + AS tmp; + if (getOSDataValue(obj, name, tmp)) { + value = static_cast(tmp); + return true; + } + + return false; + } + /** * Read typed OSData from IORegistryEntry *