Add love.localechanged callback.

This commit is contained in:
Miku AuahDark
2022-03-17 23:39:54 +08:00
parent c2104f896a
commit 75b1098572
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -551,6 +551,9 @@ Message *Event::convertJoystickEvent(const SDL_Event &e) const
msg = new Message("joystickremoved", vargs);
}
break;
case SDL_LOCALECHANGED:
msg = new Message("localechanged");
break;
default:
break;
}
+3
View File
@@ -120,6 +120,9 @@ function love.createhandlers()
displayrotated = function (display, orient)
if love.displayrotated then return love.displayrotated(display, orient) end
end,
localechanged = function ()
if love.localechanged then return love.localechanged() end
end,
}, {
__index = function(self, name)
error("Unknown event: " .. name)