Преглед на файлове

Fix love.graphics.newTexture(imagedata, {canvas=true}) not using an sRGB format when it should

Alex Szpakowski преди 5 години
родител
ревизия
e0ff593d09
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/modules/graphics/Texture.cpp

+ 2 - 0
src/modules/graphics/Texture.cpp

@@ -194,6 +194,8 @@ Texture::Texture(const Settings &settings, const Slices *slices)
 		love::image::ImageDataBase *slice = slices->get(0, 0);
 
 		format = slice->getFormat();
+		if (sRGB)
+			format = getSRGBPixelFormat(format);
 
 		pixelWidth = slice->getWidth();
 		pixelHeight = slice->getHeight();