Entry: Fixed file path.

This commit is contained in:
Бранимир Караџић
2025-11-02 21:30:56 -08:00
parent eb7b35c8d8
commit e113d598ae

View File

@@ -34,7 +34,8 @@ namespace entry
extern bx::AllocatorI* getDefaultAllocator(); extern bx::AllocatorI* getDefaultAllocator();
bx::AllocatorI* g_allocator = getDefaultAllocator(); bx::AllocatorI* g_allocator = getDefaultAllocator();
static bx::FilePath s_currentDir; using FixedString4096 = bx::FixedStringT<4096>;
static FixedString4096 s_currentDir;
class FileReader : public bx::FileReader class FileReader : public bx::FileReader
{ {
@@ -43,8 +44,9 @@ namespace entry
public: public:
virtual bool open(const bx::FilePath& _filePath, bx::Error* _err) override virtual bool open(const bx::FilePath& _filePath, bx::Error* _err) override
{ {
bx::FilePath filePath(s_currentDir); FixedString4096 filePath(s_currentDir);
filePath.join(_filePath); filePath.append(_filePath);
return super::open(filePath.getCPtr(), _err); return super::open(filePath.getCPtr(), _err);
} }
}; };