Skip to content

Commit

Permalink
fix: Initialise pspCommandDataField in processKext
Browse files Browse the repository at this point in the history
Fixes #89
  • Loading branch information
VisualEhrmanntraut committed Nov 5, 2024
1 parent dc9e8e8 commit 59c2fce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions NootRX/HWLibs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ static KernelPatcher::KextInfo kextRadeonX6800HWLibs {
HWLibs *HWLibs::callback = nullptr;

void HWLibs::init() {
if (NootRXMain::callback->attributes.isNavi21() || !NootRXMain::callback->attributes.isVenturaAndLater()) {
this->pspCommandDataField = 0xAF8;
} else {
this->pspCommandDataField = 0xB48;
}

SYSLOG("HWLibs", "Module initialised");

callback = this;
Expand Down Expand Up @@ -94,6 +88,12 @@ bool HWLibs::processKext(KernelPatcher &patcher, size_t id, mach_vm_address_t sl
if (kextRadeonX6810HWLibs.loadIndex == id || kextRadeonX6800HWLibs.loadIndex == id) {
NootRXMain::callback->ensureRMMIO();

if (NootRXMain::callback->attributes.isNavi21() || !NootRXMain::callback->attributes.isVenturaAndLater()) {
this->pspCommandDataField = 0xAF8;
} else {
this->pspCommandDataField = 0xB48;
}

CAILAsicCapsEntry *orgCapsTable = nullptr;
CAILDeviceTypeEntry *orgDeviceTypeTable = nullptr;
DeviceCapabilityEntry *orgDevCapTable = nullptr;
Expand Down

0 comments on commit 59c2fce

Please sign in to comment.