Skip to content

Commit

Permalink
kram - allow DDS
Browse files Browse the repository at this point in the history
Windows often uses all caps extensions.
  • Loading branch information
alecazam committed Jun 9, 2024
1 parent 47e9132 commit 9bc3fa0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion kramv/KramViewerBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,8 @@ bool Data::listFilesInArchive(int32_t urlIndex)

// filter out unsupported extensions
vector<string> extensions = {
".ktx", ".ktx2", ".png", ".dds" // textures
".ktx", ".ktx2", ".png", // textures
".dds", ".DDS" // allow caps for dds
#if USE_GLTF
// TODO: can't support these until have a loader from memory block
// GLTFAsset requires a URL.
Expand Down
3 changes: 2 additions & 1 deletion libkram/kram/Kram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ bool isKTX2Filename(const char* filename)
bool isDDSFilename(const char* filename)
{
// should really look at first 4 bytes of data
return endsWithExtension(filename, ".dds");
return endsWithExtension(filename, ".dds") ||
endsWithExtension(filename, ".DDS"); // allow uppercase
}
bool isPNGFilename(const char* filename)
{
Expand Down

0 comments on commit 9bc3fa0

Please sign in to comment.