Add NeoUI passcode configurator, duress mode profile, and Bluetooth OBEX UI

This commit is contained in:
Luxferre committed 2026-10-30 19:28:31 +02:00
1 parent 51a1a91d42
commit 62ac46e498
100 files changed
+2736 -240

No files matched your search

+13 -5
View File
@@ -247,13 +247,14 @@ void scanTracksInDir(const std::string& dirPath,
}
std::string getHomePath() {
const char* h = std::getenv("HOME");
return (h && *h) ? std::string(h) : "/home/user";
return getHomeDirPath();
}
std::string getConfigDirPath() {
const char* c = std::getenv("XDG_CONFIG_HOME");
if (c && *c) return std::string(c) + "/sxmo";
if (!isDuressMode()) {
const char* c = std::getenv("XDG_CONFIG_HOME");
if (c && *c) return std::string(c) + "/sxmo";
}
return getHomePath() + "/.config/sxmo";
}
@@ -617,6 +618,12 @@ int runMusicApp(int argc, char** argv) {
if (::realpath(targetDir.c_str(), resolved) != nullptr) {
dir = resolved;
}
if (isDuressMode()) {
std::string root = getHomeDirPath();
if (dir != root && dir.rfind(root + "/", 0) != 0) {
dir = root;
}
}
DIR* d = ::opendir(dir.c_str());
if (!d) {
setBanner("Cannot open folder");
@@ -625,7 +632,8 @@ int runMusicApp(int argc, char** argv) {
browserDir = dir;
browserItems.clear();
if (browserDir != "/") {
std::string topLimit = isDuressMode() ? getHomeDirPath() : "/";
if (browserDir != "/" && browserDir != topLimit) {
BrowserItem up;
up.name = ".. (Up)";
size_t sl = browserDir.rfind('/');