Start of global config infrastructure

This commit is contained in:
Cacodemon345
2022-11-06 22:32:58 +06:00
parent 954e022244
commit e4e1852462
4 changed files with 45 additions and 0 deletions

View File

@@ -609,6 +609,18 @@ plat_chdir(char *path)
return QDir::setCurrent(QString(path)) ? 0 : -1;
}
void
plat_get_global_config_dir(char* strptr)
{
#ifdef __APPLE__
auto dir = QDir(QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation)[0] + "/net.86Box.86Box/");
#else
auto dir = QDir(QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation)[0] + "/86Box/");
#endif
if (!dir.exists()) dir.mkpath(".");
strncpy(strptr, dir.canonicalPath().toUtf8().constData(), 1024);
}
void
plat_init_rom_paths()
{