getDriver.lua 1002 B

1234567891011121314151617181920212223242526272829303132333435
  1. return {
  2. tag = 'headset',
  3. summary = 'Get the VR API currently in use for a device.',
  4. description = [[
  5. Returns the `HeadsetDriver` that is currently in use, optionally for a specific device. The
  6. order of headset drivers can be changed using `lovr.conf` to prefer or exclude specific VR APIs.
  7. ]],
  8. arguments = {
  9. device = {
  10. type = 'Device',
  11. description = [[
  12. The device to get the active driver of. This will be the first driver that is currently
  13. returning a pose for the device.
  14. ]]
  15. }
  16. },
  17. returns = {
  18. driver = {
  19. type = 'HeadsetDriver',
  20. description = 'The driver of the headset in use, e.g. "OpenVR".'
  21. }
  22. },
  23. variants = {
  24. {
  25. description = 'Get the current headset driver that LÖVR is submitting frames to.',
  26. arguments = {},
  27. returns = { 'driver' }
  28. },
  29. {
  30. description = 'Get the current input driver for a device.',
  31. arguments = { 'device' },
  32. returns = { 'driver' }
  33. }
  34. }
  35. }