Skip to content

Commit

Permalink
BLUGA-GRAPHICS: Add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Saverio976 committed Nov 4, 2023
1 parent 08f982c commit 4bf2833
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libs/B-luga-graphics/src/RaylibImpl/Graphics/Graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ namespace Raylib {
::Texture2D &TextureManagerImpl::getTexture(const std::string &path)
{
std::lock_guard<std::mutex> lock(_mutex);
auto it = _textures.find(path);
std::string fileName = PathResolver::resolve(path);
auto it = _textures.find(fileName);

if (it == _textures.end()) {
_textures[path] = LoadTexture(path.c_str());
_textures[fileName] = LoadTexture(fileName.c_str());
Logger::error("wtf: " + fileName);
}
return _textures[path];
return _textures[fileName];
}

void TextureManagerImpl::preloadTexture(const std::string &path)
Expand Down

0 comments on commit 4bf2833

Please sign in to comment.