[Scummvm-git-logs] scummvm master -> 518b731726b19dbdda4a6ebeaf76de5749e4a082
lephilousophe
noreply at scummvm.org
Sun Oct 9 14:00:05 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
518b731726 BACKENDS: OPENGL: Add support for loading JPEG textures
Commit: 518b731726b19dbdda4a6ebeaf76de5749e4a082
https://github.com/scummvm/scummvm/commit/518b731726b19dbdda4a6ebeaf76de5749e4a082
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-10-09T15:59:37+02:00
Commit Message:
BACKENDS: OPENGL: Add support for loading JPEG textures
Changed paths:
backends/graphics/opengl/pipelines/libretro.cpp
diff --git a/backends/graphics/opengl/pipelines/libretro.cpp b/backends/graphics/opengl/pipelines/libretro.cpp
index b5aff56c65b..a3ff0fa030f 100644
--- a/backends/graphics/opengl/pipelines/libretro.cpp
+++ b/backends/graphics/opengl/pipelines/libretro.cpp
@@ -35,6 +35,7 @@
#include "graphics/surface.h"
#include "image/bmp.h"
+#include "image/jpeg.h"
#include "image/png.h"
#include "image/tga.h"
@@ -62,7 +63,8 @@ static Graphics::Surface *loadViaImageDecoder(const Common::FSNode &fileNode) {
#else
Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0),
#endif
- decoder.getPalette());
+ // Use a cast to resolve ambiguities in JPEGDecoder
+ static_cast<Image::ImageDecoder &>(decoder).getPalette());
}
struct ImageLoader {
@@ -72,6 +74,7 @@ struct ImageLoader {
static const ImageLoader s_imageLoaders[] = {
{ "bmp", loadViaImageDecoder<Image::BitmapDecoder> },
+ { "jpg", loadViaImageDecoder<Image::JPEGDecoder> },
{ "png", loadViaImageDecoder<Image::PNGDecoder> },
{ "tga", loadViaImageDecoder<Image::TGADecoder> },
{ nullptr, nullptr }
More information about the Scummvm-git-logs
mailing list