Merge pull request #2817 from Cacodemon345/global-config-screenshot

Start of global config infrastructure
This commit is contained in:
Jasmine Iwanek
2022-12-03 16:17:37 -05:00
committed by GitHub
4 changed files with 45 additions and 0 deletions

View File

@@ -629,6 +629,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()
{