| 462 | } |
| 463 | |
| 464 | Filesystem_Stream::InputStream open_generic(std::string_view dir, std::string_view name, DirectoryTree::Args& args) { |
| 465 | if (!Tr::GetCurrentTranslationId().empty()) { |
| 466 | auto tr_fs = Tr::GetCurrentTranslationFilesystem(); |
| 467 | auto is = tr_fs.OpenFile(args); |
| 468 | if (is) { |
| 469 | return is; |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | auto is = FileFinder::Game().OpenFile(args); |
| 474 | if (!is && Main_Data::filefinder_rtp) { |
| 475 | is = Main_Data::filefinder_rtp->Lookup(dir, name, args.exts); |
| 476 | if (!is) { |
| 477 | Output::Debug("Cannot find: {}/{}", dir, name); |
| 478 | } |
| 479 | } |
| 480 | return is; |
| 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()) { |