head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.20 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.18 pkgsrc-2025Q4-base:1.1 pkgsrc-2025Q3:1.1.0.16 pkgsrc-2025Q3-base:1.1 pkgsrc-2025Q2:1.1.0.14 pkgsrc-2025Q2-base:1.1 pkgsrc-2025Q1:1.1.0.12 pkgsrc-2025Q1-base:1.1 pkgsrc-2024Q4:1.1.0.10 pkgsrc-2024Q4-base:1.1 pkgsrc-2024Q3:1.1.0.8 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.6 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.4 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.2 pkgsrc-2023Q4-base:1.1; locks; strict; comment @// @; 1.1 date 2023.11.14.17.57.41; author nia; state Exp; branches; next ; commitid 6j4nJUj41nclxBME; desc @@ 1.1 log @Import emulators/duckstation-qt DuckStation is an simulator/emulator of the Sony PlayStation(TM) console, focusing on playability, speed, and long-term maintainability. The goal is to be as accurate as possible while maintaining performance suitable for low-end devices. A "BIOS" ROM image is required to to start the emulator and to play games. You can use an image from any hardware version or region, although mismatching game regions and BIOS regions may have compatibility issues. @ text @$NetBSD$ NetBSD (and more POSIX platforms) support. --- src/duckstation-qt/qthost.cpp.orig 2023-08-12 04:46:09.000000000 +0000 +++ src/duckstation-qt/qthost.cpp @@@@ -240,13 +240,7 @@@@ void QtHost::SetAppRoot() void QtHost::SetResourcesDirectory() { -#ifndef __APPLE__ - // On Windows/Linux, these are in the binary directory. - EmuFolders::Resources = Path::Combine(EmuFolders::AppRoot, "resources"); -#else - // On macOS, this is in the bundle resources directory. - EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, "../Resources")); -#endif + EmuFolders::Resources = "@@PREFIX@@/share/duckstation"; } void QtHost::SetDataDirectory() @@@@ -270,7 +264,12 @@@@ void QtHost::SetDataDirectory() EmuFolders::DataRoot = Path::Combine(StringUtil::WideStringToUTF8String(documents_directory), "DuckStation"); CoTaskMemFree(documents_directory); } -#elif defined(__linux__) +#elif defined(__APPLE__) + static constexpr char MAC_DATA_DIR[] = "Library/Application Support/DuckStation"; + const char* home_dir = getenv("HOME"); + if (home_dir) + EmuFolders::DataRoot = Path::Combine(home_dir, MAC_DATA_DIR); +#else // Use $XDG_CONFIG_HOME/duckstation if it exists. const char* xdg_config_home = getenv("XDG_CONFIG_HOME"); if (xdg_config_home && Path::IsAbsolute(xdg_config_home)) @@@@ -291,11 +290,6 @@@@ void QtHost::SetDataDirectory() EmuFolders::DataRoot = Path::Combine(share_dir, "duckstation"); } } -#elif defined(__APPLE__) - static constexpr char MAC_DATA_DIR[] = "Library/Application Support/DuckStation"; - const char* home_dir = getenv("HOME"); - if (home_dir) - EmuFolders::DataRoot = Path::Combine(home_dir, MAC_DATA_DIR); #endif // make sure it exists @