Skip to content

Commit

Permalink
Fix compilation errors on Mac
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
arch1t3cht committed Dec 20, 2024
1 parent f1c36c9 commit b2d6d98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/dialog_colorpicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ void ColorPickerScreenDropper::DropFromScreenXY(int x, int y) {
CGGetDisplaysWithPoint(CGPointMake(x, y), 1, &display_id, &display_count);

agi::scoped_holder<CGImageRef> 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<uint8_t> imgdata(height * width * 4);

agi::scoped_holder<CGColorSpaceRef> colorspace(CGColorSpaceCreateDeviceRGB(), CGColorSpaceRelease);
Expand Down
4 changes: 2 additions & 2 deletions src/font_file_lister_coretext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
//
// Aegisub Project http://www.aegisub.org/

#include "font_file_lister.h"

#include <AppKit/AppKit.h>
#include <CoreText/CoreText.h>

#include "font_file_lister.h"

namespace {
struct FontMatch {
NSURL *url = nil;
Expand Down

0 comments on commit b2d6d98

Please sign in to comment.