From 59c2fce06250082dba455d7a266c4f41efd68db0 Mon Sep 17 00:00:00 2001 From: Visual Ehrmanntraut <30368284+VisualEhrmanntraut@users.noreply.github.com> Date: Tue, 5 Nov 2024 17:57:19 +0200 Subject: [PATCH] fix: Initialise pspCommandDataField in processKext Fixes #89 --- NootRX/HWLibs.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/NootRX/HWLibs.cpp b/NootRX/HWLibs.cpp index ec8dc2c..19b89b9 100644 --- a/NootRX/HWLibs.cpp +++ b/NootRX/HWLibs.cpp @@ -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; @@ -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;