smasherprog / screen_capture_lite

cross platform screen/window capturing library
MIT License
616 stars 156 forks source link

macOS: Use of deprecated API #164

Open turbo opened 4 months ago

turbo commented 4 months ago

macOS 14 deprecated CGWindowListCreateImage in favor of ScreenCaptureKit:

[ 27%] Building CXX object src_cpp/CMakeFiles/screen_capture_lite_shared.dir/ios/CGFrameProcessor.cpp.o
/Users/turbo/dev/screen_capture_lite/src_cpp/ios/CGFrameProcessor.cpp:21:25: warning: 'CGWindowListCreateImage' is deprecated: first deprecated in macOS 14.0 - This API is deprecated. Please use ScreenCaptureKit's captureScreenshot APIs instead. [-Wdeprecated-declarations]
        auto imageRef = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, static_cast<uint32_t>(window.Handle),
                        ^
smasherprog commented 4 months ago

I dont have a mac any more. If you can submit a PR to fix ill gladly accept it