Attempt to correct Linux appimage behavior. (#6215)
Also make Windows rom search react to the set search path.
This commit is contained in:
@@ -229,7 +229,8 @@ void Extractor::FilterRoms(std::vector<std::string>& roms, RomSearchMode searchM
|
||||
void Extractor::GetRoms(std::vector<std::string>& roms) {
|
||||
#ifdef _WIN32
|
||||
WIN32_FIND_DATAA ffd;
|
||||
HANDLE h = FindFirstFileA(".\\*", &ffd);
|
||||
std::string search = std::string(mSearchPath + "\\*");
|
||||
HANDLE h = FindFirstFileA(search.c_str(), &ffd);
|
||||
|
||||
do {
|
||||
if (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
|
||||
|
||||
@@ -415,6 +415,7 @@ void OTRGlobals::RunExtract(int argc, char* argv[]) {
|
||||
std::atomic<size_t> extractCount = 0, totalExtract = 0;
|
||||
|
||||
std::string installPath = Ship::Context::GetAppBundlePath();
|
||||
std::string dataPath = Ship::Context::GetAppDirectoryPath(appShortName);
|
||||
std::string file;
|
||||
|
||||
#if defined(__SWITCH__)
|
||||
@@ -632,6 +633,8 @@ void OTRGlobals::RunExtract(int argc, char* argv[]) {
|
||||
extract = Extractor();
|
||||
extract.SetSearchPath(installPath);
|
||||
extract.GetRoms(args);
|
||||
extract.SetSearchPath(dataPath);
|
||||
extract.GetRoms(args);
|
||||
if (!args.empty()) {
|
||||
promptStep = PS_WAIT;
|
||||
SohGui::RegisterPopup(
|
||||
|
||||
Reference in New Issue
Block a user