Thanks for the insight! Totally fine if it isn't practical to automate it: getHeadphoneState()
is sufficient for working it out. I didn't see mention of it in Inside Playdate with C (though I may have overlooked it), but a simple description of the situation in the manual should be all that's needed.