Attempt to correct Linux appimage behavior. (#6215)

Also make Windows rom search react to the set search path.
This commit is contained in:
Malkierian
2026-02-01 11:35:54 -07:00
committed by GitHub
parent a4eacdd267
commit cc0941cc9f
2 changed files with 5 additions and 1 deletions

View File

@@ -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)) {

View File

@@ -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(