working flatpak
Some checks failed
Linux arm64 / Build (push) Failing after 1m47s

This commit is contained in:
2025-07-24 14:54:26 +02:00
parent 161c9425ae
commit 19d953891b
14 changed files with 120 additions and 155 deletions

View File

@@ -11,6 +11,7 @@
#include <algorithm>
#include "../Common/Compression.h"
#include "../Utils/AssetManager.h"
PiecesFiles::PiecesFiles() {
@@ -140,7 +141,7 @@ bool PiecesFiles::loadPieces(int polyominoSize, std::vector<Piece>& pieces, std:
}
bool PiecesFiles::getFilePath(int polyominoSize, std::string& filePath) const {
std::string dataFolderPath = "data/pieces/";
auto dataFolderPath = AssetManager::getResourcePath("data/pieces");
if (!std::filesystem::exists(dataFolderPath)) {
std::filesystem::create_directories(dataFolderPath);
@@ -150,6 +151,6 @@ bool PiecesFiles::getFilePath(int polyominoSize, std::string& filePath) const {
return false;
}
filePath = dataFolderPath + std::to_string(polyominoSize) + "minos.bin";
filePath = dataFolderPath / (std::to_string(polyominoSize) + "minos.bin");
return true;
}