Skip to content

Make the desktop backend easier to port to non-desktop platforms#294

Draft
Un1q32 wants to merge 2 commits into
ButterscotchRunner:mainfrom
Un1q32:desktop-refactor
Draft

Make the desktop backend easier to port to non-desktop platforms#294
Un1q32 wants to merge 2 commits into
ButterscotchRunner:mainfrom
Un1q32:desktop-refactor

Conversation

@Un1q32

@Un1q32 Un1q32 commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Separates the parseCommandLineArgs bit from the rest, eventually it will be in another file. This way stuff like consoles can pass a struct directly instead of having to create its own argv or whatever.
Sets up the OpenGL FBO calls to use the hostFramebuffer thingy instead of hardcoding 0. Android and iOS and possibly other platforms need this.
When this is done it should be a lot easier to do stuff like use the SDL 2 backend for a console port.
I'm thinking there would be a standard CLI main() file that just does the normal parseCommandLineArgs stuff, and console ports would make their own main() with either just hardcoded preset args, or something configured through some king of options menu.

I was thinking of maybe folding the other backends (PS2/3/vita/android) into the desktop backend, my understanding is all the backend files have a lot of duplicated logic that could be eliminated. If not this would still prolly be useful to make SDL 2 console ports easy.

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