uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit eea4a5a3db90824e864c4b575181d47cdf1f76c4
parent 691d3fd26710a9c6bcd36fbc539d7ffa75fa3c68
Author: Aleksandr Pasechnik <al@megamicron.net>
Date:   Sun, 29 Jun 2025 19:31:45 -0400

fix builds on macOS Catalina (10.15.7)

The `_DARWIN_BETTER_REALPATH` flag fixes the file device reading directories.

The colors change fixes an integer size error in the code below it.

I have a few other quality of life commits on the `macbuild` branch of my
git.sr.ht/~apiarian/uxn fork for more Mac convenience, but the probably don't
belong in the main branch of uxn. Maybe we can explore adding them as build
flags?

- al

Diffstat:
Mbuild.sh | 2+-
Msrc/devices/screen.c | 3++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/build.sh b/build.sh @@ -64,7 +64,7 @@ MSYS_NT*|MINGW*) # MSYS2 on Windows fi ;; Darwin) # macOS - CFLAGS="${CFLAGS} -Wno-typedef-redefinition -D_C99_SOURCE" + CFLAGS="${CFLAGS} -Wno-typedef-redefinition -D_C99_SOURCE -D_DARWIN_BETTER_REALPATH" UXNEMU_LDFLAGS="$(sdl2-config --cflags --static-libs)" ;; Linux|*) diff --git a/src/devices/screen.c b/src/devices/screen.c @@ -50,7 +50,8 @@ screen_change(int x1, int y1, int x2, int y2) void screen_palette(void) { - int i, shift, colors[4]; + int i, shift; + unsigned long colors[4]; for(i = 0, shift = 4; i < 4; ++i, shift ^= 4) { Uint8 r = (uxn.dev[0x8 + i / 2] >> shift) & 0xf,