From bd553d198207934b418889be058a42df24a2b61e Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 10 Nov 2014 07:58:16 -0800 Subject: [PATCH 1/1] Refix SurfaceAcceleratorTransferSurface prototype. --- Tweak.mm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Tweak.mm b/Tweak.mm index dc0b1aa..c997fdc 100644 --- a/Tweak.mm +++ b/Tweak.mm @@ -140,7 +140,7 @@ extern "C" void IOSurfaceFlushProcessorCaches(IOSurfaceRef buffer); typedef void *IOSurfaceAcceleratorRef; extern "C" int IOSurfaceAcceleratorCreate(CFAllocatorRef allocator, void *type, IOSurfaceAcceleratorRef *accel); -extern "C" unsigned int IOSurfaceAcceleratorTransferSurface(IOSurfaceAcceleratorRef accelerator, IOSurfaceRef dest, IOSurfaceRef src, CFDictionaryRef options/*, void *, void *, void **/); +extern "C" unsigned int IOSurfaceAcceleratorTransferSurface(IOSurfaceAcceleratorRef accelerator, IOSurfaceRef dest, IOSurfaceRef src, void *, void *, void *, void *); typedef void *IOMobileFramebufferRef; @@ -181,7 +181,6 @@ static const size_t BitsPerSample = 8; static IOSurfaceAcceleratorRef accelerator_; static IOSurfaceRef buffer_; -static CFDictionaryRef options_; static NSMutableSet *handlers_; static rfbScreenInfoPtr screen_; @@ -1002,7 +1001,7 @@ static void OnLayer(IOMobileFramebufferRef fb, IOSurfaceRef layer) { VNCBlack(); } else { if (accelerator_ != NULL) - IOSurfaceAcceleratorTransferSurface(accelerator_, layer, buffer_, options_); + IOSurfaceAcceleratorTransferSurface(accelerator_, layer, buffer_, NULL, NULL, NULL, NULL); else { IOSurfaceLock(layer, 2); rfbPixel *data(reinterpret_cast(IOSurfaceGetBaseAddress(layer))); @@ -1147,8 +1146,5 @@ MSInitialize { cfEvent_ = CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, reinterpret_cast(&event_), sizeof(event_), kCFAllocatorNull); - options_ = (CFDictionaryRef) [[NSDictionary dictionaryWithObjectsAndKeys: - nil] retain]; - [pool release]; } -- 2.45.2