From 274ba77ca7c85fc5a3b089e112b07478ab59ef27 Mon Sep 17 00:00:00 2001 From: Visual Ehrmanntraut <30368284+VisualEhrmanntraut@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:43:35 +0200 Subject: [PATCH] Rename HDMI class to AppleGFXHDA Signed-off-by: Visual Ehrmanntraut <30368284+VisualEhrmanntraut@users.noreply.github.com> --- NootedRed.xcodeproj/project.pbxproj | 16 ++++++++-------- NootedRed/{HDMI.cpp => AppleGFXHDA.cpp} | 8 ++++---- NootedRed/{HDMI.hpp => AppleGFXHDA.hpp} | 4 ++-- NootedRed/NRed.cpp | 4 ++-- NootedRed/NRed.hpp | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) rename NootedRed/{HDMI.cpp => AppleGFXHDA.cpp} (92%) rename NootedRed/{HDMI.hpp => AppleGFXHDA.hpp} (98%) diff --git a/NootedRed.xcodeproj/project.pbxproj b/NootedRed.xcodeproj/project.pbxproj index 51cbf6a3..c1d128ee 100644 --- a/NootedRed.xcodeproj/project.pbxproj +++ b/NootedRed.xcodeproj/project.pbxproj @@ -23,8 +23,8 @@ 40FC5FDE29BF996900367F9D /* HWLibs.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 40FC5FDC29BF996900367F9D /* HWLibs.hpp */; }; 40FC5FE129BF9E2500367F9D /* X6000.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FC5FDF29BF9E2500367F9D /* X6000.cpp */; }; 40FC5FE229BF9E2500367F9D /* X6000.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 40FC5FE029BF9E2500367F9D /* X6000.hpp */; }; - 6C1B36662A407C6100B184DD /* HDMI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6C1B36642A407C6100B184DD /* HDMI.cpp */; }; - 6C1B36672A407C6200B184DD /* HDMI.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 6C1B36652A407C6100B184DD /* HDMI.hpp */; }; + 6C1B36662A407C6100B184DD /* AppleGFXHDA.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6C1B36642A407C6100B184DD /* AppleGFXHDA.cpp */; }; + 6C1B36672A407C6200B184DD /* AppleGFXHDA.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 6C1B36652A407C6100B184DD /* AppleGFXHDA.hpp */; }; CE405ED91E4A080700AA0B3D /* plugin_start.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE405ED81E4A080700AA0B3D /* plugin_start.cpp */; }; CE8DA0832517C41A008C44E8 /* libkmod.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE8DA0822517C41A008C44E8 /* libkmod.a */; }; CEA03B5E20EE825A00BA842F /* NRed.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEA03B5C20EE825A00BA842F /* NRed.cpp */; }; @@ -108,8 +108,8 @@ 40FC5FDC29BF996900367F9D /* HWLibs.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = HWLibs.hpp; sourceTree = ""; }; 40FC5FDF29BF9E2500367F9D /* X6000.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = X6000.cpp; sourceTree = ""; }; 40FC5FE029BF9E2500367F9D /* X6000.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = X6000.hpp; sourceTree = ""; }; - 6C1B36642A407C6100B184DD /* HDMI.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HDMI.cpp; sourceTree = ""; }; - 6C1B36652A407C6100B184DD /* HDMI.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = HDMI.hpp; sourceTree = ""; }; + 6C1B36642A407C6100B184DD /* AppleGFXHDA.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AppleGFXHDA.cpp; sourceTree = ""; }; + 6C1B36652A407C6100B184DD /* AppleGFXHDA.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = AppleGFXHDA.hpp; sourceTree = ""; }; CE405EBA1E49DD7100AA0B3D /* kern_compression.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = kern_compression.hpp; sourceTree = ""; }; CE405EBB1E49DD7100AA0B3D /* kern_disasm.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = kern_disasm.hpp; sourceTree = ""; }; CE405EBC1E49DD7100AA0B3D /* kern_file.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = kern_file.hpp; sourceTree = ""; }; @@ -168,8 +168,8 @@ 408F201A288AC068002EEC15 /* Firmware */, 408F201F288ACBE6002EEC15 /* Firmware.cpp */, 408F201E288ACBB0002EEC15 /* Firmware.hpp */, - 6C1B36642A407C6100B184DD /* HDMI.cpp */, - 6C1B36652A407C6100B184DD /* HDMI.hpp */, + 6C1B36642A407C6100B184DD /* AppleGFXHDA.cpp */, + 6C1B36652A407C6100B184DD /* AppleGFXHDA.hpp */, 40FC5FDB29BF996900367F9D /* HWLibs.cpp */, 40FC5FDC29BF996900367F9D /* HWLibs.hpp */, 1C748C2E1C21952C0024EED2 /* Info.plist */, @@ -304,7 +304,7 @@ 40FC5FDE29BF996900367F9D /* HWLibs.hpp in Headers */, 4002B2692AE478AA00B40D3B /* ZlibAlloc.hpp in Headers */, 4068898C2A229BF600028D22 /* PatcherPlus.hpp in Headers */, - 6C1B36672A407C6200B184DD /* HDMI.hpp in Headers */, + 6C1B36672A407C6200B184DD /* AppleGFXHDA.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -407,7 +407,7 @@ files = ( 40FC5FDD29BF996900367F9D /* HWLibs.cpp in Sources */, 40FC5FD529BF995000367F9D /* X6000FB.cpp in Sources */, - 6C1B36662A407C6100B184DD /* HDMI.cpp in Sources */, + 6C1B36662A407C6100B184DD /* AppleGFXHDA.cpp in Sources */, 408F2020288ACBE6002EEC15 /* Firmware.cpp in Sources */, 4068898B2A229BF600028D22 /* PatcherPlus.cpp in Sources */, 40FC5FE129BF9E2500367F9D /* X6000.cpp in Sources */, diff --git a/NootedRed/HDMI.cpp b/NootedRed/AppleGFXHDA.cpp similarity index 92% rename from NootedRed/HDMI.cpp rename to NootedRed/AppleGFXHDA.cpp index c1fb7f58..1e538fce 100644 --- a/NootedRed/HDMI.cpp +++ b/NootedRed/AppleGFXHDA.cpp @@ -1,7 +1,7 @@ //! Copyright © 2022-2023 ChefKiss Inc. Licensed under the Thou Shalt Not Profit License version 1.5. //! See LICENSE for details. -#include "HDMI.hpp" +#include "AppleGFXHDA.hpp" #include "NRed.hpp" #include "PatcherPlus.hpp" #include @@ -11,14 +11,14 @@ static const char *pathAppleGFXHDA = "/System/Library/Extensions/AppleGFXHDA.kex static KernelPatcher::KextInfo kextAppleGFXHDA {"com.apple.driver.AppleGFXHDA", &pathAppleGFXHDA, 1, {true}, {}, KernelPatcher::KextInfo::Unloaded}; -HDMI *HDMI::callback = nullptr; +AppleGFXHDA *AppleGFXHDA::callback = nullptr; -void HDMI::init() { +void AppleGFXHDA::init() { callback = this; lilu.onKextLoadForce(&kextAppleGFXHDA); } -bool HDMI::processKext(KernelPatcher &patcher, size_t id, mach_vm_address_t slide, size_t size) { +bool AppleGFXHDA::processKext(KernelPatcher &patcher, size_t id, mach_vm_address_t slide, size_t size) { if (kextAppleGFXHDA.loadIndex == id) { const UInt32 probeFind = 0xAB381002; const UInt32 probeRepl = NRed::callback->deviceId <= 0x15DD ? 0x15DE1002 : 0x16371002; diff --git a/NootedRed/HDMI.hpp b/NootedRed/AppleGFXHDA.hpp similarity index 98% rename from NootedRed/HDMI.hpp rename to NootedRed/AppleGFXHDA.hpp index 7e1333e8..4abdd833 100644 --- a/NootedRed/HDMI.hpp +++ b/NootedRed/AppleGFXHDA.hpp @@ -6,9 +6,9 @@ #include #include -class HDMI { +class AppleGFXHDA { public: - static HDMI *callback; + static AppleGFXHDA *callback; void init(); bool processKext(KernelPatcher &patcher, size_t id, mach_vm_address_t slide, size_t size); }; diff --git a/NootedRed/NRed.cpp b/NootedRed/NRed.cpp index 18723ba2..01ad4f0d 100644 --- a/NootedRed/NRed.cpp +++ b/NootedRed/NRed.cpp @@ -2,7 +2,7 @@ //! See LICENSE for details. #include "NRed.hpp" -#include "HDMI.hpp" +#include "AppleGFXHDA.hpp" #include "HWLibs.hpp" #include "Model.hpp" #include "PatcherPlus.hpp" @@ -31,7 +31,7 @@ static X6000FB x6000fb; static X5000HWLibs hwlibs; static X5000 x5000; static X6000 x6000; -static HDMI agfxhda; +static AppleGFXHDA agfxhda; void NRed::init() { SYSLOG("NRed", "Copyright 2022-2023 ChefKiss Inc. If you've paid for this, you've been scammed."); diff --git a/NootedRed/NRed.hpp b/NootedRed/NRed.hpp index eea24a9c..35b7c0af 100644 --- a/NootedRed/NRed.hpp +++ b/NootedRed/NRed.hpp @@ -59,7 +59,7 @@ static bool checkAtomBios(const UInt8 *bios, size_t size) { } class NRed { - friend class HDMI; + friend class AppleGFXHDA; friend class DYLDPatches; friend class X6000FB; friend class X5000HWLibs;