Skip to content

Make sdl2 platform compatible with apple silicon#5

Merged
logicplace merged 4 commits into
pokemon-mini:masterfrom
pkingstonxyz:support-macos-applesilicon-sdl2
Mar 11, 2026
Merged

Make sdl2 platform compatible with apple silicon#5
logicplace merged 4 commits into
pokemon-mini:masterfrom
pkingstonxyz:support-macos-applesilicon-sdl2

Conversation

@pkingstonxyz

@pkingstonxyz pkingstonxyz commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

large file handling

Mac doesn't (seem to) support fopen64, ftello64, or fseeko64, so use #define to switch to the supported versions (fopen, ftello, and fseeko).

There's a stackoverflow answer https://stackoverflow.com/questions/4003479/how-to-enable-large-file-support-under-darwin that claims that this code should just use fopen/ftello/fseeko by default instead of the large file fWHATEVER64 versions, so it would be easy modify this PR to switch all instance of fWHATEVER64 to fWHATEVER.

makefile

Use rm -rf on all created files instead of rmdir --ignore-fail-on-non-empty Build

strcpy->memmove

I was getting SIGTRACEs because the strs in the strcpy operations had overlap and memmove is safer.

@pkingstonxyz pkingstonxyz changed the title Use fopen instead of fopen64 on macos sdl2 platform Make sdl2 platform compatible with apple silicon Mar 11, 2026
@logicplace

Copy link
Copy Markdown
Contributor

Looks good! If you figure out the fixes for the dev build it can be a separate PR, I'll go ahead and merge this one.

@logicplace
logicplace merged commit e1b0c60 into pokemon-mini:master Mar 11, 2026
@pkingstonxyz

Copy link
Copy Markdown
Contributor Author

PR #6 should get debug working o7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants