Fix custom brush loading
This commit is contained in:
parent
cfeda0fdba
commit
05f722b397
@ -299,9 +299,6 @@ std::vector<ByteString> DirectorySearch(ByteString directory, ByteString search,
|
||||
findFileHandle = _wfindfirst(Platform::WinWiden(fileMatch).c_str(), ¤tFile);
|
||||
if (findFileHandle == -1L)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Unable to open directory: %s\n", directory.c_str());
|
||||
#endif
|
||||
return std::vector<ByteString>();
|
||||
}
|
||||
do
|
||||
@ -318,9 +315,6 @@ std::vector<ByteString> DirectorySearch(ByteString directory, ByteString search,
|
||||
DIR *directoryHandle = opendir(directory.c_str());
|
||||
if (!directoryHandle)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Unable to open directory: %s\n", directory.c_str());
|
||||
#endif
|
||||
return std::vector<ByteString>();
|
||||
}
|
||||
while ((directoryEntry = readdir(directoryHandle)))
|
||||
|
@ -476,7 +476,7 @@ void GameModel::BuildBrushList()
|
||||
std::vector<ByteString> brushFiles = Platform::DirectorySearch(BRUSH_DIR, "", { ".ptb" });
|
||||
for (size_t i = 0; i < brushFiles.size(); i++)
|
||||
{
|
||||
std::vector<unsigned char> brushData = Client::Ref().ReadFile(brushFiles[i]);
|
||||
std::vector<unsigned char> brushData = Client::Ref().ReadFile(BRUSH_DIR + ByteString(PATH_SEP) + brushFiles[i]);
|
||||
if(!brushData.size())
|
||||
{
|
||||
std::cout << "Brushes: Skipping " << brushFiles[i] << ". Could not open" << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user