FEXConfig: Adds support for squashfs files in FEXConfig

Searches the RootFS path in the fex-emu config folder for squashfs files and displays them
Allows easy configuration of squashfs
This commit is contained in:
Ryan Houdek 2021-06-15 19:26:42 -07:00
parent a5f07f1d01
commit e5d3699b26

View File

@ -1,4 +1,5 @@
#include "Common/Config.h"
#include "Common/FileFormatCheck.h"
#include <FEXCore/Utils/Event.h>
@ -11,6 +12,7 @@
#include <memory>
#include <mutex>
#include <filesystem>
#include <fstream>
#include <sys/inotify.h>
#include <thread>
#include <unistd.h>
@ -107,6 +109,13 @@ namespace {
if (it.is_directory()) {
NamedRootFS.emplace_back(it.path().filename());
}
else if (it.is_regular_file()) {
// If it is a regular file then we need to check if it is a valid archive
if (it.path().extension() == "sqsh" &&
FEX::FormatCheck::IsSquashFS(it.path().string())) {
NamedRootFS.emplace_back(it.path().filename());
}
}
}
}