From b2d6d982a9f5719df6436865832fc892a9dc0fca Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Fri, 20 Dec 2024 01:24:37 +0100 Subject: [PATCH] Fix compilation errors on Mac NSUInteger was defined by older wxWidgets versions but is removed in newer versions, so this would fail to compile when not using wxWidgets from a subproject. In font_file_lister_coretext.mm, some mac version number defines in wxWidgets were clashing with static const variables for the same version numbers in AppKit. Moving the wx includes after the AppKit include works around this for now. --- src/dialog_colorpicker.cpp | 4 ++-- src/font_file_lister_coretext.mm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dialog_colorpicker.cpp b/src/dialog_colorpicker.cpp index 1af98dfa24..e0d8882de7 100644 --- a/src/dialog_colorpicker.cpp +++ b/src/dialog_colorpicker.cpp @@ -397,8 +397,8 @@ void ColorPickerScreenDropper::DropFromScreenXY(int x, int y) { CGGetDisplaysWithPoint(CGPointMake(x, y), 1, &display_id, &display_count); agi::scoped_holder img(CGDisplayCreateImageForRect(display_id, CGRectMake(x - resx / 2, y - resy / 2, resx, resy)), CGImageRelease); - NSUInteger width = CGImageGetWidth(img); - NSUInteger height = CGImageGetHeight(img); + size_t width = CGImageGetWidth(img); + size_t height = CGImageGetHeight(img); std::vector imgdata(height * width * 4); agi::scoped_holder colorspace(CGColorSpaceCreateDeviceRGB(), CGColorSpaceRelease); diff --git a/src/font_file_lister_coretext.mm b/src/font_file_lister_coretext.mm index 598f0b2a0c..a776c6d245 100644 --- a/src/font_file_lister_coretext.mm +++ b/src/font_file_lister_coretext.mm @@ -14,11 +14,11 @@ // // Aegisub Project http://www.aegisub.org/ -#include "font_file_lister.h" - #include #include +#include "font_file_lister.h" + namespace { struct FontMatch { NSURL *url = nil;