| 481 | } |
| 482 | |
| 483 | Filesystem_Stream::InputStream open_generic_with_fallback(std::string_view dir, std::string_view name, DirectoryTree::Args& args) { |
| 484 | if (!Tr::GetCurrentTranslationId().empty()) { |
| 485 | auto tr_fs = Tr::GetCurrentTranslationFilesystem(); |
| 486 | auto is = tr_fs.OpenFile(args); |
| 487 | if (is) { |
| 488 | return is; |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | auto is = FileFinder::Save().OpenFile(args); |
| 493 | if (!is) { is = open_generic(dir, name, args); } |
| 494 | if (!is) { |
| 495 | Output::Debug("Unable to open in either Game or Save: {}/{}", dir, name); |
| 496 | } |
| 497 | |
| 498 | return is; |
| 499 | } |
| 500 | |
| 501 | Filesystem_Stream::InputStream FileFinder::OpenImage(std::string_view dir, std::string_view name) { |
| 502 | DirectoryTree::Args args = { MakePath(dir, name), IMG_TYPES, 1, false }; |
no test coverage detected