1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 05:53:02 +01:00

Reinstate support for title sequence folders

This commit is contained in:
Ted John
2016-11-13 13:15:01 +00:00
parent bf34920a0b
commit 52ffd5b521
8 changed files with 151 additions and 34 deletions

View File

@@ -34,6 +34,16 @@ namespace Path
return safe_strcat_path(buffer, src, bufferSize);
}
utf8 * GetDirectory(const utf8 * path)
{
size_t maxSize = String::SizeOf(path) + 1;
utf8 * result = Memory::Allocate<utf8>(maxSize);
GetDirectory(result, maxSize, path);
size_t reducedSize = String::SizeOf(path) + 1;
result = Memory::Reallocate(result, reducedSize);
return result;
}
utf8 * GetDirectory(utf8 * buffer, size_t bufferSize, const utf8 * path)
{
size_t lastPathSepIndex = String::LastIndexOf(path, *PATH_SEPARATOR);