mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-01-09 15:05:36 +00:00
Recognize pvr images when loading data.
This commit is contained in:
parent
081866907f
commit
edf7a948c4
|
@ -46,6 +46,7 @@
|
||||||
|
|
||||||
enum EImageFileFormat {
|
enum EImageFileFormat {
|
||||||
eFileFormat_PNG,
|
eFileFormat_PNG,
|
||||||
|
eFileFormat_PVR,
|
||||||
|
|
||||||
kNumImageFileFormats
|
kNumImageFileFormats
|
||||||
};
|
};
|
||||||
|
|
|
@ -61,6 +61,8 @@
|
||||||
# include "ImageWriterPNG.h"
|
# include "ImageWriterPNG.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "ImageLoaderPVR.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Static helper functions
|
// Static helper functions
|
||||||
|
@ -172,6 +174,10 @@ Image *ImageFile::LoadImage(const unsigned char *rawImageData) const {
|
||||||
break;
|
break;
|
||||||
#endif // PNG_FOUND
|
#endif // PNG_FOUND
|
||||||
|
|
||||||
|
case eFileFormat_PVR:
|
||||||
|
loader = new ImageLoaderPVR(rawImageData);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Unable to load image: unknown file format.\n");
|
fprintf(stderr, "Unable to load image: unknown file format.\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -215,6 +221,10 @@ EImageFileFormat ImageFile::DetectFileFormat(const CHAR *filename) {
|
||||||
if(strcmp(ext, ".png") == 0) {
|
if(strcmp(ext, ".png") == 0) {
|
||||||
return eFileFormat_PNG;
|
return eFileFormat_PNG;
|
||||||
}
|
}
|
||||||
|
else if(strcmp(ext, ".pvr") == 0) {
|
||||||
|
return eFileFormat_PVR;
|
||||||
|
}
|
||||||
|
|
||||||
return kNumImageFileFormats;
|
return kNumImageFileFormats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue