Skip to content

Commit

Permalink
refactor: Clean up KextInfo variables
Browse files Browse the repository at this point in the history
  • Loading branch information
VisualEhrmanntraut committed Aug 26, 2024
1 parent 1799da2 commit 0fecdba
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 14 deletions.
34 changes: 26 additions & 8 deletions NootRX/HWLibs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,32 @@ static const char *pathRadeonX6800HWLibs = "/System/Library/Extensions/AMDRadeon
static const char *pathRadeonX6810HWLibs = "/System/Library/Extensions/AMDRadeonX6000HWServices.kext/Contents/PlugIns/"
"AMDRadeonX6810HWLibs.kext/Contents/MacOS/AMDRadeonX6810HWLibs";

static KernelPatcher::KextInfo kextRadeonX6000HWServices {"com.apple.kext.AMDRadeonX6000HWServices",
&pathRadeonX6000HWServices, 1, {}, {}, KernelPatcher::KextInfo::Unloaded};

static KernelPatcher::KextInfo kextRadeonX6810HWLibs {"com.apple.kext.AMDRadeonX6810HWLibs", &pathRadeonX6810HWLibs, 1,
{}, {}, KernelPatcher::KextInfo::Unloaded};

static KernelPatcher::KextInfo kextRadeonX6800HWLibs {"com.apple.kext.AMDRadeonX6800HWLibs", &pathRadeonX6800HWLibs, 1,
{}, {}, KernelPatcher::KextInfo::Unloaded};
static KernelPatcher::KextInfo kextRadeonX6000HWServices {
"com.apple.kext.AMDRadeonX6000HWServices",
&pathRadeonX6000HWServices,
1,
{},
{},
KernelPatcher::KextInfo::Unloaded,
};

static KernelPatcher::KextInfo kextRadeonX6810HWLibs {
"com.apple.kext.AMDRadeonX6810HWLibs",
&pathRadeonX6810HWLibs,
1,
{},
{},
KernelPatcher::KextInfo::Unloaded,
};

static KernelPatcher::KextInfo kextRadeonX6800HWLibs {
"com.apple.kext.AMDRadeonX6800HWLibs",
&pathRadeonX6800HWLibs,
1,
{},
{},
KernelPatcher::KextInfo::Unloaded,
};

HWLibs *HWLibs::callback = nullptr;

Expand Down
10 changes: 8 additions & 2 deletions NootRX/NootRX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@
static const char *pathAGDP = "/System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns/"
"AppleGraphicsDevicePolicy.kext/Contents/MacOS/AppleGraphicsDevicePolicy";

static KernelPatcher::KextInfo kextAGDP {"com.apple.driver.AppleGraphicsDevicePolicy", &pathAGDP, 1, {true}, {},
KernelPatcher::KextInfo::Unloaded};
static KernelPatcher::KextInfo kextAGDP {
"com.apple.driver.AppleGraphicsDevicePolicy",
&pathAGDP,
1,
{true},
{},
KernelPatcher::KextInfo::Unloaded,
};

NootRXMain *NootRXMain::callback = nullptr;

Expand Down
10 changes: 8 additions & 2 deletions NootRX/X6000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@

static const char *pathRadeonX6000 = "/System/Library/Extensions/AMDRadeonX6000.kext/Contents/MacOS/AMDRadeonX6000";

static KernelPatcher::KextInfo kextRadeonX6000 {"com.apple.kext.AMDRadeonX6000", &pathRadeonX6000, 1, {}, {},
KernelPatcher::KextInfo::Unloaded};
static KernelPatcher::KextInfo kextRadeonX6000 {
"com.apple.kext.AMDRadeonX6000",
&pathRadeonX6000,
1,
{},
{},
KernelPatcher::KextInfo::Unloaded,
};

X6000 *X6000::callback = nullptr;

Expand Down
10 changes: 8 additions & 2 deletions NootRX/X6000FB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@
static const char *pathRadeonX6000Framebuffer =
"/System/Library/Extensions/AMDRadeonX6000Framebuffer.kext/Contents/MacOS/AMDRadeonX6000Framebuffer";

static KernelPatcher::KextInfo kextRadeonX6000Framebuffer {"com.apple.kext.AMDRadeonX6000Framebuffer",
&pathRadeonX6000Framebuffer, 1, {}, {}, KernelPatcher::KextInfo::Unloaded};
static KernelPatcher::KextInfo kextRadeonX6000Framebuffer {
"com.apple.kext.AMDRadeonX6000Framebuffer",
&pathRadeonX6000Framebuffer,
1,
{},
{},
KernelPatcher::KextInfo::Unloaded,
};

X6000FB *X6000FB::callback = nullptr;

Expand Down

0 comments on commit 0fecdba

Please sign in to comment.