From 216d5ca4b2ab04bd765daa4c23c00b81b4aedf08 Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Sat, 21 Aug 2021 14:31:44 +0800 Subject: [PATCH 1/2] Fix love.displayrotated passes boolean instead of string Fixes #1722 --- src/modules/event/sdl/Event.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/event/sdl/Event.cpp b/src/modules/event/sdl/Event.cpp index 33f41c948..bbeec8d1f 100644 --- a/src/modules/event/sdl/Event.cpp +++ b/src/modules/event/sdl/Event.cpp @@ -398,7 +398,7 @@ Message *Event::convert(const SDL_Event &e) txt = "unknown"; vargs.emplace_back((double)(e.display.display + 1)); - vargs.emplace_back(txt); + vargs.emplace_back(txt, strlen(txt)); msg = new Message("displayrotated", vargs); } From 16ebaea3904938d7f1e7a7d3a9108a9a80d11fff Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sun, 5 Sep 2021 12:55:32 -0300 Subject: [PATCH 2/2] Fix DXT1 textures which use 1 bit alpha-cutout. Note that premultiplied alpha blending must be used with DXT1 alpha cutout textures if linear filtering is used, otherwise transparent black pixels will be blended with opaque non-black pixels resulting in dark fringes. --- src/modules/graphics/opengl/OpenGL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 9cf2e4715..4bb2b1057 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -1575,7 +1575,7 @@ OpenGL::TextureFormat OpenGL::convertPixelFormat(PixelFormat pixelformat, bool r break; case PIXELFORMAT_DXT1: - f.internalformat = isSRGB ? GL_COMPRESSED_SRGB_S3TC_DXT1_EXT : GL_COMPRESSED_RGB_S3TC_DXT1_EXT; + f.internalformat = isSRGB ? GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT : GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; break; case PIXELFORMAT_DXT3: f.internalformat = isSRGB ? GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT : GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;