lovr.focus
EditThe lovr.focus callback is called whenever the application acquires or loses focus (for example, when opening or closing the system VR menu). The callback receives a focused argument, indicating whether or not the application is now focused. Additionally, both the headset and desktop window have separate focus states, so a display argument indicates which display gained or lost input focus. It may make sense to pause the game, reduce visual fidelity, or mute audio when the application loses focus.
function lovr.focus(focused, display)
-- your code here
endArguments
| Name | Type | Description |
| focused | boolean | Whether the program is now focused. |
| display | DisplayType | Whether the headset or desktop window changed input focus. |
Returns
Nothing