qt: Add support for loading ROMs from ~/Documents/86Box/roms on macOS

This commit is contained in:
Cacodemon345
2022-04-07 00:57:16 +06:00
parent 1a3a7bec0e
commit 0fd3042e0c
2 changed files with 11 additions and 1 deletions

View File

@@ -589,7 +589,10 @@ plat_chdir(char *path)
void
plat_init_rom_paths()
{
#if !defined __APPLE__ && !defined _WIN32
#if defined __APPLE__
QDir::root().mkpath(QStringLiteral("%1/Documents/86Box/roms/").arg(QDir::homePath()));
add_rom_path(QStringLiteral("%1/Documents/86Box/roms/").arg(QDir::homePath()).toUtf8().constData());
#elif !defined _WIN32
if (getenv("XDG_DATA_HOME")) {
char xdg_rom_path[1024] = { 0 };
strncpy(xdg_rom_path, getenv("XDG_DATA_HOME"), 1024);