Skip to content

Commit

Permalink
fixed forced texture override via GetOrCreate calls
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaGW2 committed Dec 12, 2024
1 parent c750d61 commit ea57ba1
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions src/Services/Textures/TextureLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ Texture* CTextureLoader::GetOrCreate(const char* aIdentifier, const char* aFilen
{
Texture* result = Get(aIdentifier);

if (this->OverrideTexture(aIdentifier, nullptr))
{
return result;
}
else if (!result)
if (!result)
{
this->Load(aIdentifier, aFilename, nullptr);
}
Expand All @@ -73,11 +69,7 @@ Texture* CTextureLoader::GetOrCreate(const char* aIdentifier, unsigned aResource
{
Texture* result = this->Get(aIdentifier);

if (this->OverrideTexture(aIdentifier, nullptr))
{
return result;
}
else if (!result)
if (!result)
{
this->Load(aIdentifier, aResourceID, aModule, nullptr);
}
Expand All @@ -89,11 +81,7 @@ Texture* CTextureLoader::GetOrCreate(const char* aIdentifier, const char* aRemot
{
Texture* result = this->Get(aIdentifier);

if (this->OverrideTexture(aIdentifier, nullptr))
{
return result;
}
else if (!result)
if (!result)
{
this->Load(aIdentifier, aRemote, aEndpoint, nullptr);
}
Expand All @@ -105,11 +93,7 @@ Texture* CTextureLoader::GetOrCreate(const char* aIdentifier, void* aData, size_
{
Texture* result = this->Get(aIdentifier);

if (this->OverrideTexture(aIdentifier, nullptr))
{
return result;
}
else if (!result)
if (!result)
{
this->Load(aIdentifier, aData, aSize, nullptr);
}
Expand Down

0 comments on commit ea57ba1

Please sign in to comment.