pub fn install(
port: ControllerPort,
config: Config,
) -> Result<(), ControllerPort>Expand description
Take over the controller port: put the exception wrapper in front of the handler the vector leads to and start polling on every VBlank.
From here the port belongs to the engine, so nothing may poll it
synchronously; a memory card borrows it through lease. It chains to
whatever the vector led to, and psx-cdstream’s wrapper does the same, so
the two can be installed in either order. Ask for analog mode with the synchronous
require_analog_on before installing, or with request_analog after.
If psx-rt’s handler is not in the vector yet this installs it first
(install_vblank_counter). The root counter 0 is the engine’s from here.
Returns the token if the engine is already installed, or if the vector holds something that cannot be chained to.