fix: no carregava correctament data/shapes/jailgames.png si s'executava desde fora del directori de l'executable

This commit is contained in:
2026-03-08 22:24:41 +01:00
parent fa285519b2
commit b9264c96a1
3 changed files with 5 additions and 2 deletions

View File

@@ -269,7 +269,7 @@ void ShapeManager::activateShapeInternal(ShapeType type) {
active_shape_ = std::make_unique<AtomShape>();
break;
case ShapeType::PNG_SHAPE:
active_shape_ = std::make_unique<PNGShape>("data/shapes/jailgames.png");
active_shape_ = std::make_unique<PNGShape>((getResourcesDirectory() + "/data/shapes/jailgames.png").c_str());
break;
default:
active_shape_ = std::make_unique<SphereShape>(); // Fallback