Skip to content

Commit

Permalink
#2440 diff attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
koekeishiya committed Dec 19, 2024
1 parent dedddfb commit f4ada8d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/osax/payload.m
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,6 @@ static bool verify_os_version(NSOperatingSystemVersion os_version)
return false;
}

#ifdef __x86_64__
static double *animation_time;
#endif

static void init_instances()
{
NSOperatingSystemVersion os_version = [[NSProcessInfo processInfo] operatingSystemVersion];
Expand Down Expand Up @@ -377,13 +373,7 @@ static void init_instances()
NSLog(@"[yabai-sa] (0x%llx) animation_time_addr found at address 0x%llX (0x%llx)", baseaddr, animation_time_addr, animation_time_addr - baseaddr);
if (vm_protect(mach_task_self(), page_align(animation_time_addr), vm_page_size, 0, VM_PROT_READ | VM_PROT_WRITE | VM_PROT_COPY) == KERN_SUCCESS) {
#ifdef __x86_64__
animation_time = malloc(sizeof(double));
if (animation_time) {
*animation_time = 0.0001;
*(uint32_t *)(animation_time_addr + 4) = (uint32_t)((uint64_t)animation_time - (animation_time_addr + 8));
} else {
NSLog(@"[yabai-sa] unable to allocate memory for animation_time; unable to patch instruction!");
}
*(uint64_t *) animation_time_addr = 0x660fefc0660fefc0;
#elif __arm64__
*(uint32_t *) animation_time_addr = 0x2f00e400;
#endif
Expand Down

0 comments on commit f4ada8d

Please sign in to comment.