Skip to main content
โ† PSoXide SDK guides and examples ยท SDK f2fec1c301f1 ยท All Cargo features enabled; check feature gates before use.

vsync

Function vsync 

Source
pub fn vsync()
๐Ÿ‘ŽDeprecated:

busy-waits a fixed 242 HBlanks from the call site instead of syncing to the display; use psx_rt::interrupts::wait_vblank()

Expand description

Wait 242 HBlank periods (~15.4ms) from the moment of the call.

Despite the name, this does NOT sync to the display: reconfiguring Timer 1 resets its counter, so the wait starts from zero at the call site. Frame time becomes work + 15.4ms instead of snapping to the next VBlank โ€“ nearly right for light frames, badly slow for heavy ones. It cannot be repaired here: syncing needs the VBlank IRQ, which the runtime owns.