Skip to content
Tangent 128 edited this page Mar 28, 2015 · 3 revisions

SDL.waitEvent

Wait for an event with an optional timeout.

Function

SYNOPSIS

function SDL.waitEvent([timeout])

ARGUMENTS

  • timeout, the maximal number of milliseconds to wait

RETURNS

  • the event on success or nil (see Event)
  • the error message

EXAMPLES

Wait for an event with a timeout of 1 second.

local e = SDL.waitEvent(1000)

Wait for an event indefinitely.

local e = SDL.waitEvent()
Clone this wiki locally