getDriver.lua 707 B

12345678910111213141516171819202122232425262728
  1. return {
  2. tag = 'headset-misc',
  3. summary = 'Get the VR API currently in use for a device.',
  4. description = [[
  5. Returns the `HeadsetDriver` that is currently in use, plus the name of the VR runtime. The
  6. order of headset drivers can be changed using `lovr.conf`.
  7. ]],
  8. arguments = {},
  9. returns = {
  10. driver = {
  11. type = 'HeadsetDriver',
  12. description = 'The current headset backend, e.g. `openxr` or `simulator`.'
  13. },
  14. runtime = {
  15. type = 'string',
  16. description = 'The name of the VR runtime, e.g. `SteamVR/OpenXR`.'
  17. }
  18. },
  19. variants = {
  20. {
  21. arguments = {},
  22. returns = { 'driver', 'runtime' }
  23. }
  24. },
  25. related = {
  26. 'lovr.headset.getName'
  27. }
  28. }