Skip to main content
← PSoXide SDK guides and examples · SDK 80d1c329e977 · All Cargo features enabled; check feature gates before use.

ensure_installed

Function ensure_installed 

Source
pub fn ensure_installed(config: Config) -> bool
Expand description

Put the transport in the exception vector if it is not there, taking the controller token itself. For a program that reads with the polled SectorReader and hands only some reads (a streamed asset the frame loop must not wait for) to the transport: call it before each such read and nothing else needs tracking.

Idempotent. install_vblank_counter puts psx-rt’s handler back in the vector, which drops the wrapper; this notices (by [psx_rt::interrupts::vector_epoch]) and installs again, which a program that calls install_vblank_counter for every scene (Half-Life does, for every map) must do. Returns false when it could not: a read is in flight or queued while the vector was reset, or an audio lease holds the controller. Polled commands may run whenever no request is queued or active and is_idle reads true: with [IrqMaskPolicy::OnlyWhileBusy] the CD interrupt source is closed then.