Skip to content

Tweak debug platform to work on macos#6

Draft
pkingstonxyz wants to merge 2 commits into
pokemon-mini:masterfrom
pkingstonxyz:support-macos-applesilicon-sdl2
Draft

Tweak debug platform to work on macos#6
pkingstonxyz wants to merge 2 commits into
pokemon-mini:masterfrom
pkingstonxyz:support-macos-applesilicon-sdl2

Conversation

@pkingstonxyz

Copy link
Copy Markdown
Contributor

Makefile

Use rm -rf when the make target is clean instead of -rmdir --ignore-fail-on-non-empty $(BUILD)

GTK vs SDL event loop

The SDL event loop wasn't properly routing the user interaction events to the GTK event loop, but GTK does send events to SDL. Some stackoverflow posts indicate that there's probably a more robust way to handle this, but 'werks on my machine' as they say.

The SDL event loop seemed to be starving
the gtk event loop of event, swapping them
around allows for proper event handling
and the application to function
@pkingstonxyz

pkingstonxyz commented Mar 12, 2026

Copy link
Copy Markdown
Contributor Author

Going to treat this as something of a devlog becuase I saw this PR mentioned on the pokemon mini website.

date update
Mar 12, 2026 Converted this to a draft because now the Pokemon Mini window isn't accepting events. Looking into making the event loops play nice now
June 8, 2026 This PR will soon be changed to 'Add SDL3 and sdl3-debug platform' because I don't think integrating SDL1 and GTK2 is worth the energy. They're legacy systems that require compatibility layers and the work required to make the two event loops integrate nicely on macos (namely by rendering the SDL buffer to a GTK pane or whatever it's called) is too much work. Instead, I'll be doing a complete (ish) re-write in SDL3 with Dear ImGui. It'll start off with the creation of a new sdl3 platform and then I'll expand that with a debugger written with Dear ImGui.

Argument for SDL3

I'm using SDL3+DearImGui instead of the existing SDl2 build becuase I'd like an emscripten web platform and, by going from the ground up with SDL3 callback functions, making it web compatible will be much easier than ripping out and re-architecting the necessary data/variables for the main_loop vs menu_loop. I have attempted this in the SDl2 codebase, but it's frustrating.

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.

1 participant