This bounty has been claimed! Original post is below.
Github / BountySource
The premise for this bounty is fairly straight-forward: If the player has an Onscreen Controller Overlay enabled and is using a physical controller, allow RetroArch to listen to the user's input binds, and display them through the Onscreen Controller Overlay.
I see this being primarily useful for recording/streaming and speedrunning, where controller input is more useful for an audience. That said, this could also make it easier to test the visual side of Onscreen Controller Overlays on PC environments.
Given that RetroArch's overlays already provide visual feedback for touch-input (buttons light up, joysticks move around) and custom overlays can be made fairly easily, it seems like the perfect fit for controller input display. I hope it'd give onscreen controller overlays more purpose on PC/Mac/Linux.