From 7e641b727449a78ef1d27089b344b2487146130a Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Fri, 26 Feb 2016 13:44:45 +0100 Subject: [PATCH] (OSX) Silence deprecation warnings --- gfx/drivers_font_renderer/coretext.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gfx/drivers_font_renderer/coretext.c b/gfx/drivers_font_renderer/coretext.c index 6e5b805626..4f1ad85577 100644 --- a/gfx/drivers_font_renderer/coretext.c +++ b/gfx/drivers_font_renderer/coretext.c @@ -92,10 +92,20 @@ static bool font_renderer_create_atlas(CTFontRef face, ct_font_renderer_t *handl CTFontGetGlyphsForCharacters(face, characters, glyphs, CT_ATLAS_SIZE); - CTFontGetBoundingRectsForGlyphs(face, kCTFontDefaultOrientation, - glyphs, bounds, CT_ATLAS_SIZE); + CTFontGetBoundingRectsForGlyphs(face, +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 + kCTFontOrientationDefault, +#else + kCTFontDefaultOrientation, +#endif + glyphs, bounds, CT_ATLAS_SIZE); - CTFontGetAdvancesForGlyphs(face, kCTFontDefaultOrientation, + CTFontGetAdvancesForGlyphs(face, +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 + kCTFontOrientationDefault, +#else + kCTFontDefaultOrientation, +#endif glyphs, advances, CT_ATLAS_SIZE); ascent = CTFontGetAscent(face);