diff options
| author | Andre Weissflog <floooh@gmail.com> | 2025-09-04 14:03:49 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2025-09-04 14:03:49 +0200 |
| commit | affc44e6f7a585e90d6ee43dca20c51252b6b4ad (patch) | |
| tree | 4236462bec7414742195da8bc78f305cbd108651 /sokol_app.h | |
| parent | 569247345718b30b8669e0dfe86cb8ff22ac72db (diff) | |
sokol_app.h macos+gl: move GL_SILENCE_DEPRECATION define in front of Cocoa.h
Diffstat (limited to 'sokol_app.h')
| -rw-r--r-- | sokol_app.h | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sokol_app.h b/sokol_app.h index 495906f5..ec240513 100644 --- a/sokol_app.h +++ b/sokol_app.h @@ -2209,6 +2209,9 @@ inline void sapp_run(const sapp_desc& desc) { return sapp_run(&desc); } #endif #if defined(_SAPP_APPLE) + #ifndef GL_SILENCE_DEPRECATION + #define GL_SILENCE_DEPRECATION + #endif #if defined(SOKOL_METAL) #import <Metal/Metal.h> #import <MetalKit/MetalKit.h> @@ -2216,9 +2219,6 @@ inline void sapp_run(const sapp_desc& desc) { return sapp_run(&desc); } #if defined(_SAPP_MACOS) #import <Cocoa/Cocoa.h> #if defined(_SAPP_ANY_GL) - #ifndef GL_SILENCE_DEPRECATION - #define GL_SILENCE_DEPRECATION - #endif #include <OpenGL/gl3.h> #endif #if defined(SOKOL_WGPU) @@ -2598,12 +2598,9 @@ typedef struct { @interface _sapp_macos_view : MTKView @end #elif defined(SOKOL_GLCORE) - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated-declarations" @interface _sapp_macos_view : NSOpenGLView - (void)timerFired:(id)sender; @end - #pragma clang diagnostic pop #elif defined(SOKOL_WGPU) @interface _sapp_macos_view : NSView - (void)displayLinkFired:(id)sender; @@ -2647,11 +2644,8 @@ typedef struct { @interface _sapp_ios_view : MTKView; @end #else - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wdeprecated-declarations" @interface _sapp_ios_view : GLKView @end - #pragma clang diagnostic pop #endif typedef struct { @@ -3943,11 +3937,6 @@ _SOKOL_PRIVATE void _sapp_wgpu_frame(void) { // >>apple #if defined(_SAPP_APPLE) -#if defined(_SAPP_ANY_GL) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#endif - #if __has_feature(objc_arc) #define _SAPP_OBJC_RELEASE(obj) { obj = nil; } #else @@ -5434,10 +5423,6 @@ _SOKOL_PRIVATE void _sapp_ios_show_keyboard(bool shown) { @end #endif /* TARGET_OS_IPHONE */ -#if defined(_SAPP_ANY_GL) -#pragma clang diagnostic pop // -Wdeprecated-declarations -#endif - #endif /* _SAPP_APPLE */ // ███████ ███ ███ ███████ ██████ ██████ ██ ██████ ████████ ███████ ███ ██ |