mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-26 22:51:20 -08:00
Merge pull request #807 from lioncash/unused
deconstructed_rom_directory: Remove unused FindRomFS() function
This commit is contained in:
commit
933c9ee853
@ -6,7 +6,6 @@
|
|||||||
#include "common/common_funcs.h"
|
#include "common/common_funcs.h"
|
||||||
#include "common/file_util.h"
|
#include "common/file_util.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/string_util.h"
|
|
||||||
#include "core/file_sys/content_archive.h"
|
#include "core/file_sys/content_archive.h"
|
||||||
#include "core/gdbstub/gdbstub.h"
|
#include "core/gdbstub/gdbstub.h"
|
||||||
#include "core/hle/kernel/process.h"
|
#include "core/hle/kernel/process.h"
|
||||||
@ -18,34 +17,6 @@
|
|||||||
|
|
||||||
namespace Loader {
|
namespace Loader {
|
||||||
|
|
||||||
static std::string FindRomFS(const std::string& directory) {
|
|
||||||
std::string filepath_romfs;
|
|
||||||
const auto callback = [&filepath_romfs](u64*, const std::string& directory,
|
|
||||||
const std::string& virtual_name) -> bool {
|
|
||||||
const std::string physical_name = directory + virtual_name;
|
|
||||||
if (FileUtil::IsDirectory(physical_name)) {
|
|
||||||
// Skip directories
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verify extension
|
|
||||||
const std::string extension = physical_name.substr(physical_name.find_last_of(".") + 1);
|
|
||||||
if (Common::ToLower(extension) != "romfs") {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Found it - we are done
|
|
||||||
filepath_romfs = std::move(physical_name);
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Search the specified directory recursively, looking for the first .romfs file, which will
|
|
||||||
// be used for the RomFS
|
|
||||||
FileUtil::ForeachDirectoryEntry(nullptr, directory, callback);
|
|
||||||
|
|
||||||
return filepath_romfs;
|
|
||||||
}
|
|
||||||
|
|
||||||
AppLoader_DeconstructedRomDirectory::AppLoader_DeconstructedRomDirectory(FileSys::VirtualFile file)
|
AppLoader_DeconstructedRomDirectory::AppLoader_DeconstructedRomDirectory(FileSys::VirtualFile file)
|
||||||
: AppLoader(std::move(file)) {}
|
: AppLoader(std::move(file)) {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user