Skip to content

Fix Switch support#175

Draft
timschneeb wants to merge 63 commits intoHarbourMasters:developfrom
timschneeb:nx-support
Draft

Fix Switch support#175
timschneeb wants to merge 63 commits intoHarbourMasters:developfrom
timschneeb:nx-support

Conversation

@timschneeb
Copy link
Copy Markdown

Depends on pull request #169 to be merged first. I'll rebase this PR when that one is merged.


This fixes the broken Switch implementation and restores the CI build scripts for the platform.
Scripting is disabled due to missing platform support for tcc.

Test build:
Ghostship-switch.zip


Also, initially I ran into a weird glitch that would lock the camera somewhere out of bounds, even on the title screen. After some troubleshooting that I found out that setting the -O2 or -O3 compiler optimization levels in the CFLAGS causes this issue. It looks like there's undefined behavior somewhere in the C code. I was able to narrow the cause down to the -fstrict-aliasing optimization and disabled it.
(It's also reproducible on the PC build, but it didn't manifest there because it used -O1 by default while the Switch build used -O3).

KiritoDv and others added 30 commits April 12, 2026 13:34
Co-authored-by: Copilot <copilot@github.com>
Switch::Init(PostInit) was called multiple times, causing multiple applet hooks (that all point to the same callback address) to be registered. For some reason, the OS started spamming us with FocusUpdate events via that hook because of that.
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