Browse Source

Merged default into minor

--HG--
branch : minor
Alex Szpakowski 11 years ago
parent
commit
6f6bf6a2bb

+ 3 - 0
src/common/runtime.cpp

@@ -390,7 +390,10 @@ void luax_rawnewtype(lua_State *L, const char *name, bits flags, love::Object *o
 void luax_pushtype(lua_State *L, const char *name, bits flags, love::Object *object)
 void luax_pushtype(lua_State *L, const char *name, bits flags, love::Object *object)
 {
 {
 	if (object == nullptr)
 	if (object == nullptr)
+	{
 		lua_pushnil(L);
 		lua_pushnil(L);
+		return;
+	}
 
 
 	// Fetch the registry table of instantiated types.
 	// Fetch the registry table of instantiated types.
 	luax_getregistry(L, REGISTRY_TYPES);
 	luax_getregistry(L, REGISTRY_TYPES);

+ 20 - 0
src/modules/graphics/opengl/Graphics.cpp

@@ -109,6 +109,9 @@ void Graphics::restoreState(const DisplayState &s)
 
 
 	setColorMask(s.colorMask);
 	setColorMask(s.colorMask);
 	setWireframe(s.wireframe);
 	setWireframe(s.wireframe);
+
+	setDefaultFilter(s.defaultFilter);
+	setDefaultMipmapFilter(s.defaultMipmapFilter, s.defaultMipmapSharpness);
 }
 }
 
 
 void Graphics::restoreStateChecked(const DisplayState &s)
 void Graphics::restoreStateChecked(const DisplayState &s)
@@ -166,6 +169,9 @@ void Graphics::restoreStateChecked(const DisplayState &s)
 
 
 	if (s.wireframe != cur.wireframe)
 	if (s.wireframe != cur.wireframe)
 		setWireframe(s.wireframe);
 		setWireframe(s.wireframe);
+
+	setDefaultFilter(s.defaultFilter);
+	setDefaultMipmapFilter(s.defaultMipmapFilter, s.defaultMipmapSharpness);
 }
 }
 
 
 void Graphics::setViewportSize(int width, int height)
 void Graphics::setViewportSize(int width, int height)
@@ -847,6 +853,7 @@ Graphics::BlendMode Graphics::getBlendMode() const
 void Graphics::setDefaultFilter(const Texture::Filter &f)
 void Graphics::setDefaultFilter(const Texture::Filter &f)
 {
 {
 	Texture::setDefaultFilter(f);
 	Texture::setDefaultFilter(f);
+	states.back().defaultFilter = f;
 }
 }
 
 
 const Texture::Filter &Graphics::getDefaultFilter() const
 const Texture::Filter &Graphics::getDefaultFilter() const
@@ -858,6 +865,9 @@ void Graphics::setDefaultMipmapFilter(Texture::FilterMode filter, float sharpnes
 {
 {
 	Image::setDefaultMipmapFilter(filter);
 	Image::setDefaultMipmapFilter(filter);
 	Image::setDefaultMipmapSharpness(sharpness);
 	Image::setDefaultMipmapSharpness(sharpness);
+
+	states.back().defaultMipmapFilter = filter;
+	states.back().defaultMipmapSharpness = sharpness;
 }
 }
 
 
 void Graphics::getDefaultMipmapFilter(Texture::FilterMode *filter, float *sharpness) const
 void Graphics::getDefaultMipmapFilter(Texture::FilterMode *filter, float *sharpness) const
@@ -1365,6 +1375,9 @@ Graphics::DisplayState::DisplayState()
 	, font(nullptr)
 	, font(nullptr)
 	, shader(nullptr)
 	, shader(nullptr)
 	, wireframe(false)
 	, wireframe(false)
+	, defaultFilter()
+	, defaultMipmapFilter(Texture::FILTER_NEAREST)
+	, defaultMipmapSharpness(0.0f)
 {
 {
 	// We should just directly initialize the array in the initializer list, but
 	// We should just directly initialize the array in the initializer list, but
 	// that feature of C++11 is broken in Visual Studio 2013...
 	// that feature of C++11 is broken in Visual Studio 2013...
@@ -1387,6 +1400,9 @@ Graphics::DisplayState::DisplayState(const DisplayState &other)
 	, shader(other.shader)
 	, shader(other.shader)
 	, canvases(other.canvases)
 	, canvases(other.canvases)
 	, wireframe(other.wireframe)
 	, wireframe(other.wireframe)
+	, defaultFilter(other.defaultFilter)
+	, defaultMipmapFilter(other.defaultMipmapFilter)
+	, defaultMipmapSharpness(other.defaultMipmapSharpness)
 {
 {
 	for (int i = 0; i < 4; i++)
 	for (int i = 0; i < 4; i++)
 		colorMask[i] = other.colorMask[i];
 		colorMask[i] = other.colorMask[i];
@@ -1419,6 +1435,10 @@ Graphics::DisplayState &Graphics::DisplayState::operator = (const DisplayState &
 
 
 	wireframe = other.wireframe;
 	wireframe = other.wireframe;
 
 
+	defaultFilter = other.defaultFilter;
+	defaultMipmapFilter = other.defaultMipmapFilter;
+	defaultMipmapSharpness = other.defaultMipmapSharpness;
+
 	return *this;
 	return *this;
 }
 }
 
 

+ 7 - 0
src/modules/graphics/opengl/Graphics.h

@@ -456,6 +456,13 @@ private:
 
 
 		bool wireframe;
 		bool wireframe;
 
 
+		// Default filter.
+		Texture::Filter defaultFilter;
+
+		// Default mipmap filter and sharpness.
+		Texture::FilterMode defaultMipmapFilter;
+		float defaultMipmapSharpness;
+
 		DisplayState();
 		DisplayState();
 		DisplayState(const DisplayState &other);
 		DisplayState(const DisplayState &other);
 		~DisplayState();
 		~DisplayState();

+ 0 - 52
src/modules/graphics/opengl/OpenGL.cpp

@@ -529,58 +529,6 @@ void OpenGL::setTextureFilter(graphics::Texture::Filter &f)
 		f.anisotropy = 1.0f;
 		f.anisotropy = 1.0f;
 }
 }
 
 
-graphics::Texture::Filter OpenGL::getTextureFilter()
-{
-	GLint gmin, gmag;
-	glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, &gmin);
-	glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, &gmag);
-
-	Texture::Filter f;
-
-	switch (gmin)
-	{
-	case GL_NEAREST:
-		f.min = Texture::FILTER_NEAREST;
-		f.mipmap = Texture::FILTER_NONE;
-		break;
-	case GL_NEAREST_MIPMAP_NEAREST:
-		f.min = f.mipmap = Texture::FILTER_NEAREST;
-		break;
-	case GL_NEAREST_MIPMAP_LINEAR:
-		f.min = Texture::FILTER_NEAREST;
-		f.mipmap = Texture::FILTER_LINEAR;
-		break;
-	case GL_LINEAR_MIPMAP_NEAREST:
-		f.min = Texture::FILTER_LINEAR;
-		f.mipmap = Texture::FILTER_NEAREST;
-		break;
-	case GL_LINEAR_MIPMAP_LINEAR:
-		f.min = f.mipmap = Texture::FILTER_LINEAR;
-		break;
-	case GL_LINEAR:
-	default:
-		f.min = Texture::FILTER_LINEAR;
-		f.mipmap = Texture::FILTER_NONE;
-		break;
-	}
-
-	switch (gmag)
-	{
-	case GL_NEAREST:
-		f.mag = Texture::FILTER_NEAREST;
-		break;
-	case GL_LINEAR:
-	default:
-		f.mag = Texture::FILTER_LINEAR;
-		break;
-	}
-
-	if (GLAD_EXT_texture_filter_anisotropic)
-		glGetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, &f.anisotropy);
-
-	return f;
-}
-
 void OpenGL::setTextureWrap(const graphics::Texture::Wrap &w)
 void OpenGL::setTextureWrap(const graphics::Texture::Wrap &w)
 {
 {
 	GLint gs, gt;
 	GLint gs, gt;

+ 0 - 5
src/modules/graphics/opengl/OpenGL.h

@@ -276,11 +276,6 @@ public:
 	 **/
 	 **/
 	void setTextureFilter(graphics::Texture::Filter &f);
 	void setTextureFilter(graphics::Texture::Filter &f);
 
 
-	/**
-	 * Returns the texture filter mode for the currently bound texture.
-	 **/
-	graphics::Texture::Filter getTextureFilter();
-
 	/**
 	/**
 	 * Sets the texture wrap mode for the currently bound texture.
 	 * Sets the texture wrap mode for the currently bound texture.
 	 **/
 	 **/

+ 1 - 1
src/modules/image/magpie/ddsHandler.h

@@ -58,7 +58,7 @@ public:
 	 * a single block of memory containing all the images.
 	 * a single block of memory containing all the images.
 	 *
 	 *
 	 * @param[in] filedata The data to parse.
 	 * @param[in] filedata The data to parse.
-	 * @param[out] image The list of sub-images generated. Byte data is a pointer
+	 * @param[out] images The list of sub-images generated. Byte data is a pointer
 	 *             to the returned data.
 	 *             to the returned data.
 	 * @param[out] dataSize The total size in bytes of the returned data.
 	 * @param[out] dataSize The total size in bytes of the returned data.
 	 * @param[out] format The format of the Compressed Data.
 	 * @param[out] format The format of the Compressed Data.

+ 12 - 8
src/modules/joystick/sdl/JoystickModule.cpp

@@ -218,8 +218,8 @@ bool JoystickModule::setGamepadMapping(const std::string &guid, Joystick::Gamepa
 			joyinputstream << "b" << joyinput.button;
 			joyinputstream << "b" << joyinput.button;
 		break;
 		break;
 	case Joystick::INPUT_TYPE_HAT:
 	case Joystick::INPUT_TYPE_HAT:
-		if (joyinput.hat.value >= 0 && Joystick::getConstant(joyinput.hat.value, sdlhat))
-			joyinputstream << "h" << joyinput.hat.value << "." << int(sdlhat);
+		if (joyinput.hat.index >= 0 && Joystick::getConstant(joyinput.hat.value, sdlhat))
+			joyinputstream << "h" << joyinput.hat.index << "." << int(sdlhat);
 		break;
 		break;
 	default:
 	default:
 		break;
 		break;
@@ -297,7 +297,7 @@ Joystick::JoystickInput JoystickModule::getGamepadMapping(const std::string &gui
 	if (findpos == std::string::npos)
 	if (findpos == std::string::npos)
 		return jinput;
 		return jinput;
 
 
-	size_t endpos = mapstr.find_first_of(',', findpos);
+	size_t endpos = mapstr.find_first_of(',', findpos + 1);
 	if (endpos == std::string::npos)
 	if (endpos == std::string::npos)
 	{
 	{
 		// Assume end-of-string if we can't find the next comma.
 		// Assume end-of-string if we can't find the next comma.
@@ -364,19 +364,19 @@ Joystick::JoystickInput JoystickModule::JoystickInputFromString(const std::strin
 	{
 	{
 	case 'a':
 	case 'a':
 		jinput.type = Joystick::INPUT_TYPE_AXIS;
 		jinput.type = Joystick::INPUT_TYPE_AXIS;
-		jinput.axis = atoi(bindvalues.c_str());
+		jinput.axis = (int) strtol(bindvalues.c_str(), nullptr, 10);
 		break;
 		break;
 	case 'b':
 	case 'b':
 		jinput.type = Joystick::INPUT_TYPE_BUTTON;
 		jinput.type = Joystick::INPUT_TYPE_BUTTON;
-		jinput.button = atoi(bindvalues.c_str());
+		jinput.button = (int) strtol(bindvalues.c_str(), nullptr, 10);
 		break;
 		break;
 	case 'h':
 	case 'h':
 		// Hat string syntax is "index.value".
 		// Hat string syntax is "index.value".
 		if (bindvalues.length() < 3)
 		if (bindvalues.length() < 3)
 			break;
 			break;
 		jinput.type = Joystick::INPUT_TYPE_HAT;
 		jinput.type = Joystick::INPUT_TYPE_HAT;
-		jinput.hat.index = atoi(bindvalues.substr(0, 1).c_str());
-		sdlhat = (Uint8) atoi(bindvalues.substr(2, 1).c_str());
+		jinput.hat.index = (int) strtol(bindvalues.substr(0, 1).c_str(), nullptr, 10);
+		sdlhat = (Uint8) strtol(bindvalues.substr(2).c_str(), nullptr, 10);
 		if (!Joystick::getConstant(sdlhat, jinput.hat.value))
 		if (!Joystick::getConstant(sdlhat, jinput.hat.value))
 		{
 		{
 			// Return an invalid value if we can't find the hat constant.
 			// Return an invalid value if we can't find the hat constant.
@@ -405,10 +405,14 @@ void JoystickModule::removeBindFromMapString(std::string &mapstr, const std::str
 	if (joybindpos == std::string::npos)
 	if (joybindpos == std::string::npos)
 		return;
 		return;
 
 
-	// Find the start of the entire bind.
+	// Find the start of the entire bind by looking for the separator between
+	// the end of one section of the map string and the start of this section.
 	size_t bindstart = mapstr.rfind(',', joybindpos);
 	size_t bindstart = mapstr.rfind(',', joybindpos);
 	if (bindstart != std::string::npos && bindstart < mapstr.length() - 1)
 	if (bindstart != std::string::npos && bindstart < mapstr.length() - 1)
 	{
 	{
+		// The start of the bind is directly after the separator.
+		bindstart++;
+
 		size_t bindend = mapstr.find(',', bindstart + 1);
 		size_t bindend = mapstr.find(',', bindstart + 1);
 		if (bindend == std::string::npos)
 		if (bindend == std::string::npos)
 			bindend = mapstr.length() - 1;
 			bindend = mapstr.length() - 1;

+ 9 - 6
src/scripts/boot.lua

@@ -343,12 +343,11 @@ function love.init()
 
 
 	-- Yes, conf.lua might not exist, but there are other ways of making
 	-- Yes, conf.lua might not exist, but there are other ways of making
 	-- love.conf appear, so we should check for it anyway.
 	-- love.conf appear, so we should check for it anyway.
+	local confok, conferr
 	if love.conf then
 	if love.conf then
-		local ok, err = pcall(love.conf, c)
-		if not ok then
-			print(err)
-			-- continue
-		end
+		confok, conferr = pcall(love.conf, c)
+		-- If love.conf errors, we'll trigger the error after loading modules so
+		-- the error message can be displayed in the window.
 	end
 	end
 
 
 	if love.arg.options.console.set then
 	if love.arg.options.console.set then
@@ -387,6 +386,10 @@ function love.init()
 		love.createhandlers()
 		love.createhandlers()
 	end
 	end
 
 
+	if not confok and conferr then
+		error(conferr)
+	end
+
 	-- Setup window here.
 	-- Setup window here.
 	if c.window and c.modules.window then
 	if c.window and c.modules.window then
 		assert(love.window.setMode(c.window.width, c.window.height,
 		assert(love.window.setMode(c.window.width, c.window.height,
@@ -1552,7 +1555,7 @@ function love.errhand(msg)
 	local font = love.graphics.setNewFont(math.floor(14 * love.window.getPixelScale()))
 	local font = love.graphics.setNewFont(math.floor(14 * love.window.getPixelScale()))
 
 
 	local sRGB = select(3, love.window.getMode()).srgb
 	local sRGB = select(3, love.window.getMode()).srgb
-	if sRGB then
+	if sRGB and love.math then
 		love.graphics.setBackgroundColor(love.math.gammaToLinear(89, 157, 220))
 		love.graphics.setBackgroundColor(love.math.gammaToLinear(89, 157, 220))
 	else
 	else
 		love.graphics.setBackgroundColor(89, 157, 220)
 		love.graphics.setBackgroundColor(89, 157, 220)

+ 19 - 8
src/scripts/boot.lua.h

@@ -617,14 +617,20 @@ const unsigned char boot_lua[] =
 	0x61, 0x72, 0x2c, 0x20, 0x73, 0x6f, 0x20, 0x77, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x63, 
 	0x61, 0x72, 0x2c, 0x20, 0x73, 0x6f, 0x20, 0x77, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x63, 
 	0x68, 0x65, 0x63, 0x6b, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x79, 0x77, 0x61, 0x79, 
 	0x68, 0x65, 0x63, 0x6b, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x74, 0x20, 0x61, 0x6e, 0x79, 0x77, 0x61, 0x79, 
 	0x2e, 0x0a,
 	0x2e, 0x0a,
+	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x6b, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 
+	0x66, 0x65, 0x72, 0x72, 0x0a,
 	0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
 	0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6f, 0x6b, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3d, 0x20, 
-	0x70, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2c, 0x20, 0x63, 
-	0x29, 0x0a,
-	0x09, 0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6f, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
-	0x09, 0x09, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x28, 0x65, 0x72, 0x72, 0x29, 0x0a,
-	0x09, 0x09, 0x09, 0x2d, 0x2d, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x0a,
-	0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
+	0x09, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x6b, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x72, 0x20, 
+	0x3d, 0x20, 0x70, 0x63, 0x61, 0x6c, 0x6c, 0x28, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2c, 
+	0x20, 0x63, 0x29, 0x0a,
+	0x09, 0x09, 0x2d, 0x2d, 0x20, 0x49, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x20, 
+	0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2c, 0x20, 0x77, 0x65, 0x27, 0x6c, 0x6c, 0x20, 0x74, 0x72, 0x69, 0x67, 
+	0x67, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x61, 0x66, 0x74, 0x65, 
+	0x72, 0x20, 0x6c, 0x6f, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x20, 
+	0x73, 0x6f, 0x0a,
+	0x09, 0x09, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6d, 0x65, 0x73, 
+	0x73, 0x61, 0x67, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 
+	0x79, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 
 	0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x72, 0x67, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 
 	0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 
 	0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 
@@ -669,6 +675,10 @@ const unsigned char boot_lua[] =
 	0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x68, 0x61, 0x6e, 0x64, 0x6c, 
 	0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x68, 0x61, 0x6e, 0x64, 0x6c, 
 	0x65, 0x72, 0x73, 0x28, 0x29, 0x0a,
 	0x65, 0x72, 0x73, 0x28, 0x29, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
+	0x09, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x6b, 0x20, 0x61, 0x6e, 0x64, 
+	0x20, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x72, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
+	0x09, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x28, 0x63, 0x6f, 0x6e, 0x66, 0x65, 0x72, 0x72, 0x29, 0x0a,
+	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x2d, 0x2d, 0x20, 0x53, 0x65, 0x74, 0x75, 0x70, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x68, 
 	0x09, 0x2d, 0x2d, 0x20, 0x53, 0x65, 0x74, 0x75, 0x70, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x68, 
 	0x65, 0x72, 0x65, 0x2e, 0x0a,
 	0x65, 0x72, 0x65, 0x2e, 0x0a,
 	0x09, 0x69, 0x66, 0x20, 0x63, 0x2e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 
 	0x09, 0x69, 0x66, 0x20, 0x63, 0x2e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 
@@ -5258,7 +5268,8 @@ const unsigned char boot_lua[] =
 	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x52, 0x47, 0x42, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x65, 
 	0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x73, 0x52, 0x47, 0x42, 0x20, 0x3d, 0x20, 0x73, 0x65, 0x6c, 0x65, 
 	0x63, 0x74, 0x28, 0x33, 0x2c, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 
 	0x63, 0x74, 0x28, 0x33, 0x2c, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 
 	0x67, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x28, 0x29, 0x29, 0x2e, 0x73, 0x72, 0x67, 0x62, 0x0a,
 	0x67, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x28, 0x29, 0x29, 0x2e, 0x73, 0x72, 0x67, 0x62, 0x0a,
-	0x09, 0x69, 0x66, 0x20, 0x73, 0x52, 0x47, 0x42, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
+	0x09, 0x69, 0x66, 0x20, 0x73, 0x52, 0x47, 0x42, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 
+	0x6d, 0x61, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
 	0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 
 	0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 
 	0x74, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x6c, 
 	0x74, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x6c, 
 	0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x67, 0x61, 0x6d, 0x6d, 0x61, 0x54, 0x6f, 0x4c, 0x69, 
 	0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x67, 0x61, 0x6d, 0x6d, 0x61, 0x54, 0x6f, 0x4c, 0x69,