Skip to content

Commit

Permalink
Fixed deprecated code in unfairgva
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Jan 3, 2022
1 parent a83819c commit 11d77da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
WhateverGreen Changelog
=======================
#### v1.5.6
- Fixed deprecated code in unfairgva

#### v1.5.5
- Changed the default delay of optimizing display data buffer allocations from 0 to 1 second to fix the issue that both internal and external displays flicker on some Ice Lake-based laptops. (Thanks @m0d16l14n1)
- Disabled the black screen fix on Ice Lake platforms as it is only applicable to SKL/KBL/CFL/CML platforms.
Expand Down
5 changes: 1 addition & 4 deletions WhateverGreen/kern_unfair.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ void UNFAIR::init() {

if (disableUnfair)
return;

sharedCachePath = UserPatcher::getSharedCachePath();
DBGLOG("unfair", "chosen shared cache path is %s", sharedCachePath);
}

void UNFAIR::deinit() {
Expand All @@ -45,7 +42,7 @@ void UNFAIR::csValidatePage(vnode *vp, memory_object_t pager, memory_object_offs
if (vn_getpath(vp, path, &pathlen) == 0) {
//DBGLOG("unfair", "csValidatePage %s", path);

if ((callbackUNFAIR->unfairGva & UnfairDyldSharedCache) != 0 && UNLIKELY(strcmp(path, callbackUNFAIR->sharedCachePath) == 0)) {
if ((callbackUNFAIR->unfairGva & UnfairDyldSharedCache) != 0 && UserPatcher::matchSharedCachePath(path)) {
if ((callbackUNFAIR->unfairGva & UnfairRelaxHdcpRequirements) != 0) {
static const uint8_t find[29] = {
0x4D, 0x61, 0x63, 0x50, 0x72, 0x6F, 0x35, 0x2C, 0x31, 0x00, 0x4D, 0x61, 0x63, 0x50, 0x72, 0x6F,
Expand Down
5 changes: 0 additions & 5 deletions WhateverGreen/kern_unfair.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ class UNFAIR {
* Original codesign page validation pointer.
*/
mach_vm_address_t orgCsValidatePage {0};

/**
* Cyrrent shared cache.
*/
const char *sharedCachePath {nullptr};
};

#endif /* kern_unfair_hpp */

0 comments on commit 11d77da

Please sign in to comment.