Browse Source

Merge branch 'love2d:12.0-development' into 12.0-development

nikeinikei 2 years ago
parent
commit
a2cf8821c0

+ 4 - 3
src/modules/filesystem/wrap_Filesystem.cpp

@@ -866,9 +866,7 @@ static void replaceAll(std::string &str, const std::string &substr, const std::s
 int loader(lua_State *L)
 int loader(lua_State *L)
 {
 {
 	std::string modulename = luax_checkstring(L, 1);
 	std::string modulename = luax_checkstring(L, 1);
-
-	if (modulename.find('/') != std::string::npos)
-		luax_markdeprecated(L, 2, "character in require string (forward slashes), use dots instead.", API_CUSTOM);
+	bool hasSlash = modulename.find('/') != std::string::npos;
 
 
 	for (char &c : modulename)
 	for (char &c : modulename)
 	{
 	{
@@ -884,6 +882,9 @@ int loader(lua_State *L)
 		Filesystem::Info info = {};
 		Filesystem::Info info = {};
 		if (inst->getInfo(element.c_str(), info) && info.type != Filesystem::FILETYPE_DIRECTORY)
 		if (inst->getInfo(element.c_str(), info) && info.type != Filesystem::FILETYPE_DIRECTORY)
 		{
 		{
+			if (hasSlash)
+				luax_markdeprecated(L, 2, "character in require string (forward slashes), use dots instead.", API_CUSTOM);
+
 			lua_pop(L, 1);
 			lua_pop(L, 1);
 			lua_pushstring(L, element.c_str());
 			lua_pushstring(L, element.c_str());
 			return w_load(L);
 			return w_load(L);

+ 1 - 1
src/modules/graphics/Shader.cpp

@@ -551,7 +551,7 @@ std::string Shader::createShaderStageCode(Graphics *gfx, ShaderStageType stage,
 	// Note: backends are expected to handle this situation if highp is ever
 	// Note: backends are expected to handle this situation if highp is ever
 	// conditional in that backend.
 	// conditional in that backend.
 	if (!gfx->getCapabilities().features[Graphics::FEATURE_PIXEL_SHADER_HIGHP])
 	if (!gfx->getCapabilities().features[Graphics::FEATURE_PIXEL_SHADER_HIGHP])
-		ss << "#define LOVE_SPLIT_UNIFORMS_PER_DRAW 1";
+		ss << "#define LOVE_SPLIT_UNIFORMS_PER_DRAW 1\n";
 
 
 	for (const auto &def : options.defines)
 	for (const auto &def : options.defines)
 		ss << "#define " + def.first + " " + def.second + "\n";
 		ss << "#define " + def.first + " " + def.second + "\n";

+ 1 - 1
src/modules/graphics/opengl/Shader.cpp

@@ -469,7 +469,7 @@ bool Shader::loadVolatile()
 	// love::graphics::Shader sets up the shader code-side of this.
 	// love::graphics::Shader sets up the shader code-side of this.
 	auto gfx = Module::getInstance<love::graphics::Graphics>(Module::M_GRAPHICS);
 	auto gfx = Module::getInstance<love::graphics::Graphics>(Module::M_GRAPHICS);
 	if (gfx != nullptr)
 	if (gfx != nullptr)
-		splitUniformsPerDraw = gfx->getCapabilities().features[Graphics::FEATURE_PIXEL_SHADER_HIGHP];
+		splitUniformsPerDraw = !gfx->getCapabilities().features[Graphics::FEATURE_PIXEL_SHADER_HIGHP];
 
 
 	// zero out active texture list
 	// zero out active texture list
 	textureUnits.clear();
 	textureUnits.clear();