-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add support to play from a BD Drive (currently only on Windows) #18648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
530f157
5124119
9b2ac3f
29abcfb
2501c17
0c9aa3d
9d0b2f1
e15fe15
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -638,7 +638,7 @@ void Emulator::Init() | |
|
|
||
| const std::string games_common_dir = g_cfg_vfs.get(g_cfg_vfs.games_dir, emu_dir); | ||
|
|
||
| if (make_path_verbose(games_common_dir, true)) | ||
| if (!is_iso_file(games_common_dir) && make_path_verbose(games_common_dir, true)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see a point in this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. otherwise a Fatal error (trying to write on a read only device) is logged. You can see it in current build simply setting a VFS games to a dvd drive.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why would you do that? That's user error
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's to provide dynamic scan (and the only available feature is based on VFS) also for BD drive. IMO, dynamic list is very useful (I basically use only that, so I can display some games instead of others). Of course, the Fatal error is not impacting the functionality (it will work without any issue). I simply suppressed that misleading error |
||
| { | ||
| fs::write_file(games_common_dir + "/Disc Games Can Be Put Here For Automatic Detection.txt", fs::create + fs::excl + fs::write, ""s); | ||
|
|
||
|
|
@@ -985,7 +985,7 @@ game_boot_result Emulator::BootGame(const std::string& path, const std::string& | |
| m_db_config = db_config; | ||
|
|
||
| // Handle files and special paths inside Load unmodified | ||
| if (direct || !fs::is_dir(path)) | ||
| if (direct || !fs::is_dir(path) || fs::get_optical_raw_device(path)) | ||
| { | ||
| m_path = path; | ||
|
|
||
|
|
@@ -1201,7 +1201,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch, | |
| std::string disc_info; | ||
| m_ar->serialize(argv.emplace_back(), disc_info, klic.emplace_back(), m_game_dir, hdd1); | ||
|
|
||
| launching_from_disc_archive = is_file_iso(disc_info); | ||
| launching_from_disc_archive = is_iso_file(disc_info); | ||
|
|
||
| sys_log.notice("Savestate: is iso archive = %d ('%s')", launching_from_disc_archive, disc_info); | ||
|
|
||
|
|
@@ -1218,7 +1218,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch, | |
| // Load /dev_bdvd/ from game list if available | ||
| if (std::string game_path = m_games_config.get_path(m_title_id); !game_path.empty()) | ||
| { | ||
| if (is_file_iso(game_path)) | ||
| if (is_iso_file(game_path)) | ||
| { | ||
| game_path = iso_device::virtual_device_name + "/PS3_GAME/./"; | ||
| } | ||
|
|
@@ -1389,7 +1389,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch, | |
| title_path = std::move(game_path); | ||
| } | ||
|
|
||
| if (is_file_iso(title_path)) | ||
| if (is_iso_file(title_path)) | ||
| { | ||
| m_path = std::move(title_path); | ||
| ok = true; | ||
|
|
@@ -1480,7 +1480,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch, | |
| } | ||
|
|
||
| const std::string resolved_path = GetCallbacks().resolve_path(m_path); | ||
| if (!launching_from_disc_archive && is_file_iso(m_path)) | ||
| if (!launching_from_disc_archive && is_iso_file(m_path)) | ||
| { | ||
| sys_log.notice("Loading iso archive '%s'", m_path); | ||
|
|
||
|
|
@@ -1933,7 +1933,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch, | |
| // Load /dev_bdvd/ from game list if available | ||
| if (std::string game_path = m_games_config.get_path(m_title_id); !game_path.empty()) | ||
| { | ||
| if (is_file_iso(game_path)) | ||
| if (is_iso_file(game_path)) | ||
| { | ||
| sys_log.notice("Loading iso archive for patch ('%s')", game_path); | ||
|
|
||
|
|
@@ -4237,7 +4237,7 @@ u32 Emulator::AddGamesFromDir(const std::string& path) | |
| // search direct subdirectories, that way we can drop one folder containing all games | ||
| for (; path_it != entries.end(); ++path_it) | ||
| { | ||
| auto dir_entry = std::move(*path_it); | ||
| const auto dir_entry = std::move(*path_it); | ||
|
|
||
| if (dir_entry.name == "." || dir_entry.name == "..") | ||
| { | ||
|
|
@@ -4246,7 +4246,7 @@ u32 Emulator::AddGamesFromDir(const std::string& path) | |
|
|
||
| const std::string dir_path = path + '/' + dir_entry.name; | ||
|
|
||
| if (!dir_entry.is_directory && !is_file_iso(dir_path)) | ||
| if (!dir_entry.is_directory && !is_iso_file(dir_path)) | ||
| { | ||
| continue; | ||
| } | ||
|
|
@@ -4283,7 +4283,7 @@ u32 Emulator::AddGamesFromDir(const std::string& path) | |
| game_boot_result Emulator::AddGame(const std::string& path) | ||
| { | ||
| // Handle files directly | ||
| if (!fs::is_dir(path)) | ||
| if (!fs::is_dir(path) || fs::get_optical_raw_device(path)) | ||
| { | ||
| return AddGameToYml(path); | ||
| } | ||
|
|
@@ -4354,7 +4354,7 @@ game_boot_result Emulator::AddGameToYml(const std::string& path) | |
| } | ||
|
|
||
| std::unique_ptr<iso_archive> archive; | ||
| if (is_file_iso(path)) | ||
| if (is_iso_file(path)) | ||
| { | ||
| archive = std::make_unique<iso_archive>(path); | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.