summaryrefslogtreecommitdiff
path: root/games/openmw/files/patch-components_resource_imagemanager.cpp
blob: 5064982f2abe1e4fdcf2c5531d573be4ea3926cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- components/resource/imagemanager.cpp.orig	2023-08-08 09:23:20 UTC
+++ components/resource/imagemanager.cpp
@@ -58,7 +58,7 @@ namespace Resource
 
     }
 
-    bool checkSupported(osg::Image* image, const std::string& filename)
+    bool checkSupported(osg::Image* image)
     {
         switch(image->getPixelFormat())
         {
@@ -83,7 +83,7 @@ namespace Resource
         return true;
     }
 
-    osg::ref_ptr<osg::Image> ImageManager::getImage(const std::string &filename, bool disableFlip)
+    osg::ref_ptr<osg::Image> ImageManager::getImage(std::string_view filename, bool disableFlip)
     {
         const std::string normalized = mVFS->normalizeFilename(filename);
 
@@ -147,7 +147,7 @@ namespace Resource
             osg::ref_ptr<osg::Image> image = result.getImage();
 
             image->setFileName(normalized);
-            if (!checkSupported(image, filename))
+            if (!checkSupported(image))
             {
                 static bool uncompress = (getenv("OPENMW_DECOMPRESS_TEXTURES") != nullptr);
                 if (!uncompress)