Skip to content

Fix arm64 build against current toolchain#10

Open
an1310 wants to merge 1 commit into
OpenEmu:masterfrom
an1310:apple-silicon-revival
Open

Fix arm64 build against current toolchain#10
an1310 wants to merge 1 commit into
OpenEmu:masterfrom
an1310:apple-silicon-revival

Conversation

@an1310
Copy link
Copy Markdown

@an1310 an1310 commented May 21, 2026

Nestopia does not compile under current Xcode. Two issues:

  • Several save-state routines brace-initialize byte arrays from wider
    integer expressions. C++11 makes narrowing in a braced initializer list
    ill-formed, and current clang enforces it. The truncations are
    intentional in serialization code, so -Wc++11-narrowing is disabled
    for the core target rather than casting each site.
  • A state-serialization method declared to return NSData * returned
    NO on its error path. Changed to return nil.

Builds arm64 against the macOS 26 SDK.

@MaddTheSane
Copy link
Copy Markdown
Member

Could you rebase this against master?

@an1310 an1310 force-pushed the apple-silicon-revival branch from f81680c to d15a8bc Compare May 24, 2026 12:47
@an1310
Copy link
Copy Markdown
Author

an1310 commented May 24, 2026

I kept the project default on the rebase. I was using static_cast, but the style used by this branch was a simple byte cast. (Also reverted spaces to tabs because that was the project default as well, though I've been using spaces for 20+ years)

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