Skip to content

Commit

Permalink
Rename HDMI class to AppleGFXHDA
Browse files Browse the repository at this point in the history
Signed-off-by: Visual Ehrmanntraut <[email protected]>
  • Loading branch information
VisualEhrmanntraut committed Mar 14, 2024
1 parent 86c561c commit 274ba77
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
16 changes: 8 additions & 8 deletions NootedRed.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -108,8 +108,8 @@
40FC5FDC29BF996900367F9D /* HWLibs.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = HWLibs.hpp; sourceTree = "<group>"; };
40FC5FDF29BF9E2500367F9D /* X6000.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = X6000.cpp; sourceTree = "<group>"; };
40FC5FE029BF9E2500367F9D /* X6000.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = X6000.hpp; sourceTree = "<group>"; };
6C1B36642A407C6100B184DD /* HDMI.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HDMI.cpp; sourceTree = "<group>"; };
6C1B36652A407C6100B184DD /* HDMI.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = HDMI.hpp; sourceTree = "<group>"; };
6C1B36642A407C6100B184DD /* AppleGFXHDA.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AppleGFXHDA.cpp; sourceTree = "<group>"; };
6C1B36652A407C6100B184DD /* AppleGFXHDA.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = AppleGFXHDA.hpp; sourceTree = "<group>"; };
CE405EBA1E49DD7100AA0B3D /* kern_compression.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = kern_compression.hpp; sourceTree = "<group>"; };
CE405EBB1E49DD7100AA0B3D /* kern_disasm.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = kern_disasm.hpp; sourceTree = "<group>"; };
CE405EBC1E49DD7100AA0B3D /* kern_file.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = kern_file.hpp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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;
};
Expand Down Expand Up @@ -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 */,
Expand Down
8 changes: 4 additions & 4 deletions NootedRed/HDMI.cpp → NootedRed/AppleGFXHDA.cpp
Original file line number Diff line number Diff line change
@@ -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 <Headers/kern_api.hpp>
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions NootedRed/HDMI.hpp → NootedRed/AppleGFXHDA.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <Headers/kern_patcher.hpp>
#include <Headers/kern_util.hpp>

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);
};
Expand Down
4 changes: 2 additions & 2 deletions NootedRed/NRed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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.");
Expand Down
2 changes: 1 addition & 1 deletion NootedRed/NRed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 274ba77

Please sign in to comment.