-
-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix texture loading if casing mismatches filename
Always use lower-case unqualified names to find and cache the actual textures.
- Loading branch information
Showing
8 changed files
with
77 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "Utils.hpp" | ||
|
||
#include <algorithm> | ||
|
||
namespace libprojectM { | ||
namespace Utils { | ||
|
||
auto ToLower(const std::string& str) -> std::string | ||
{ | ||
std::string lowerStr(str); | ||
ToLowerInPlace(lowerStr); | ||
return lowerStr; | ||
} | ||
|
||
auto ToUpper(const std::string& str) -> std::string | ||
{ | ||
std::string upperStr(str); | ||
ToUpperInPlace(upperStr); | ||
return upperStr; | ||
} | ||
|
||
void ToLowerInPlace(std::string& str) | ||
{ | ||
std::transform(str.begin(), str.end(), str.begin(), ::tolower); | ||
} | ||
|
||
void ToUpperInPlace(std::string& str) | ||
{ | ||
std::transform(str.begin(), str.end(), str.begin(), ::toupper); | ||
} | ||
|
||
} // namespace Utils | ||
} // namespace libprojectM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
namespace libprojectM { | ||
namespace Utils { | ||
|
||
auto ToLower(const std::string& str) -> std::string; | ||
auto ToUpper(const std::string& str) -> std::string; | ||
|
||
void ToLowerInPlace(std::string& str); | ||
void ToUpperInPlace(std::string& str); | ||
|
||
} // namespace Utils | ||
} // namespace libprojectM |