Browse Source

Add love.localechanged callback.

Miku AuahDark 3 years ago
parent
commit
75b1098572
2 changed files with 6 additions and 0 deletions
  1. 3 0
      src/modules/event/sdl/Event.cpp
  2. 3 0
      src/modules/love/callbacks.lua

+ 3 - 0
src/modules/event/sdl/Event.cpp

@@ -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 - 0
src/modules/love/callbacks.lua

@@ -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)