libnds
libnds copied to clipboard
Feature Request: Ability to map file descriptors to consoles
Feature Request
What feature are you suggesting?
Overview:
- Add the ability to map file descriptors to
PrintConsoleobjects, so that an application can print to several and display any of them as needed (either on the top or bottom screen, or switching between consoles like Linux's TTYs for example).
Smaller Details:
- Involves figuring out what newlib passes to the
devoptab_t'swrite_rcallback - Add a table in
console.cto map FDs to consoles, and a function to create mappings - In
con_writeuse the passedfdto select the console to render to
Why would this feature be useful?
- This can make debugging better by separating streams into different consoles for different components of an application
- In the case of console-only apps, this can add the ability to have separate windows for tasks/sub-applications
A working libnds with this feature is complete! https://github.com/trustytrojan/libnds/tree/consoles-per-fd