From f4ada8d557aeb9c8ba0d031ee6f645acffff50fd Mon Sep 17 00:00:00 2001 From: koekeishiya Date: Thu, 19 Dec 2024 20:29:38 +0100 Subject: [PATCH] #2440 diff attempt --- src/osax/payload.m | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/osax/payload.m b/src/osax/payload.m index c5c94e13..d1155199 100644 --- a/src/osax/payload.m +++ b/src/osax/payload.m @@ -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]; @@ -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