From b6080108c34e90c43fa93cfc7ab3a806378035a7 Mon Sep 17 00:00:00 2001 From: Saran Tunyasuvunakool Date: Tue, 14 Mar 2023 05:52:52 -0700 Subject: [PATCH] Ignore `-Wdeprecated-declarations` for `NSOpenGLContext`. PiperOrigin-RevId: 516500366 Change-Id: I39d974626e51627c767c52a7f90135963fdeb1c2 --- simulate/glfw_corevideo.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/simulate/glfw_corevideo.mm b/simulate/glfw_corevideo.mm index 571cc991..4780384b 100644 --- a/simulate/glfw_corevideo.mm +++ b/simulate/glfw_corevideo.mm @@ -68,7 +68,10 @@ int GlfwCoreVideo::DisplayLinkCallback() { } void GlfwCoreVideo::UpdateDisplayLink() { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" NSOpenGLContext* nsgl = Glfw().glfwGetNSGLContext(window_); +#pragma clang diagnostic pop CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(display_link_, [nsgl CGLContextObj], [nsgl.pixelFormat CGLPixelFormatObj]); }