lovr.visible

Edit

The lovr.visible callback is called whenever the application becomes visible or invisible. lovr.draw may still be called even while invisible to give the VR runtime timing info. If the VR runtime decides the application doesn't need to render anymore, LÖVR will detect this and stop calling lovr.draw.

This event is also fired when the desktop window is minimized or restored. It's possible to distinguish between the headset and window using the display parameter.

function lovr.visible(visible, display)
  -- your code here
end

Arguments

NameTypeDescription
visibleboolean Whether the application is visible in the headset display.
displayDisplayType Whether the headset or desktop window changed visibility.

Returns

Nothing

See also