Implemented the infrastructure for the non-ROM assets to go with the new repository.

This commit is contained in:
OBattler
2025-11-28 01:32:58 +01:00
parent 1888087b7c
commit 3e8a62c5c6
5 changed files with 219 additions and 4 deletions

View File

@@ -836,6 +836,30 @@ plat_init_rom_paths(void)
}
}
void
plat_init_asset_paths(void)
{
auto paths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
#ifdef _WIN32
// HACK: The standard locations returned for GenericDataLocation include
// the EXE path and a `data` directory within it as the last two entries.
// Remove the entries as we don't need them.
paths.removeLast();
paths.removeLast();
#endif
for (auto &path : paths) {
#ifdef __APPLE__
rom_add_path(QDir(path).filePath("net.86Box.86Box/asset").toUtf8().constData());
rom_add_path(QDir(path).filePath("86Box/asset").toUtf8().constData());
#else
rom_add_path(QDir(path).filePath("86Box/asset").toUtf8().constData());
#endif
}
}
void
plat_get_cpu_string(char *outbuf, uint8_t len)
{