lovr.event.quit

Edit

Pushes an event to quit. An optional number can be passed to set the exit code for the application. An exit code of zero indicates normal termination, whereas a nonzero exit code indicates that an error occurred.

lovr.event.quit(code)

Arguments

NameTypeDefaultDescription
codenumber0 The exit code of the program.

Returns

Nothing

Notes

This function is equivalent to calling lovr.event.push('quit', <args>).

The event won't be processed until the next time lovr.event.poll is called.

The lovr.quit callback will be called when the event is processed, which can be used to do any cleanup work. The callback can also return false to abort the quitting process.

See also