finnvoor / PlaydateKit

Create games for Playdate using Swift.
https://finnvoor.github.io/PlaydateKit/documentation/playdatekit
Creative Commons Zero v1.0 Universal
198 stars 21 forks source link

Implement putchar (sort of) #64

Closed finnvoor closed 4 months ago

finnvoor commented 4 months ago

putchar is required to use print in Embedded Swift. Since there is no way to log to the Playdate console without adding a newline to the end (see here), this PR implements putchar by storing characters in a temporary buffer and only printing them once a newline is received (the default terminator to print).

If/when the C API is updated to support logging without a newline this will be improved.

closes #41