Kitware / LookingGlassVTKModule

Other
15 stars 12 forks source link

Compiler warning: CGDisplayIOServicePort deprecated #51

Open rmlearney opened 2 years ago

rmlearney commented 2 years ago

Building on M1 Mac, MacOS 12.5, Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: arm64-apple-darwin21.6.0

/Users/rmlearney/git/VTK/Remote/RenderingLookingGlass/vtkCocoaLookingGlassRenderWindow.mm:41:71: warning: 'CGDisplayIOServicePort' is deprecated: first deprecated in macOS 10.9 - No longer supported [-Wdeprecated-declarations]
      (NSDictionary *)CFBridgingRelease(IODisplayCreateInfoDictionary(CGDisplayIOServicePort(currentDisplayID),
                                                                      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:372:24: note: 'CGDisplayIOServicePort' has been explicitly marked deprecated here
CG_EXTERN io_service_t CGDisplayIOServicePort(CGDirectDisplayID display)
                       ^
psavery commented 2 years ago

This one is a little more challenging to fix because Apple did not provide a replacement for the function.

I see some examples here that might work, but we should try them to confirm.

Until this is fixed, Mac will probably only support one Looking Glass display at a time.

aylward commented 2 years ago

Not a problem!

Nice hunting!

S

On Sat, Aug 20, 2022, 8:56 PM Patrick Avery @.***> wrote:

This one is a little more challenging to fix because Apple did not provide a replacement for the function https://developer.apple.com/documentation/coregraphics/1543516-cgdisplayioserviceport .

I see some examples here https://stackoverflow.com/questions/20025868/cgdisplayioserviceport-is-deprecated-in-os-x-10-9-how-to-replace/39589275 that might work, but we should try them to confirm.

Until this is fixed, Mac will probably only support one Looking Glass display at a time.

— Reply to this email directly, view it on GitHub https://github.com/Kitware/LookingGlassVTKModule/issues/51#issuecomment-1221439229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACEJL6HLUQS4X4WHJOLAHTV2F5CLANCNFSM564XT3LA . You are receiving this because you are subscribed to this thread.Message ID: @.***>