Header menu logo Nu

SdlEvents Module

Functions and values

Function or value Description

SdlEvents.poll ()

Full Usage: SdlEvents.poll ()

Parameters:
    () : unit

Accumulate SDL events. Necessary to call when you have a long-running process on the main thread to keep OS's like Windows from eco-hanging the application when it sees user input not getting processed in a timely fashion.

() : unit

SdlEvents.tryConsume event

Full Usage: SdlEvents.tryConsume event

Parameters:
Returns: bool

Attempt to consume an SDL event. Usually only the engine should call this, but there might be cases where the user needs to utilize it to cancel a long-running process or something.

event : outref<SDL_Event>
Returns: bool

Type something to start searching.