Add love.window.getDisplayOrientation and a love.displayrotated callback. Resolves issue #1441.

Note that this tracks screen orientation, rather than device orientation.
This commit is contained in:
Alex Szpakowski
2018-12-17 16:19:56 -04:00
parent 43ee232897
commit d4762b4612
8 changed files with 134 additions and 0 deletions
+3
View File
@@ -272,6 +272,9 @@ function love.createhandlers()
collectgarbage()
collectgarbage()
end,
displayrotated = function (display, orient)
if love.displayrotated then return love.displayrotated(display, orient) end
end,
}, {
__index = function(self, name)
error("Unknown event: " .. name)