Skip to content

Avoid to open a virtual drive if no content is present - #18659

Merged
elad335 merged 2 commits into
RPCS3:masterfrom
digant73:add_bd_check
Apr 30, 2026
Merged

Avoid to open a virtual drive if no content is present#18659
elad335 merged 2 commits into
RPCS3:masterfrom
digant73:add_bd_check

Conversation

@digant73

@digant73 digant73 commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Related to #18648. A fix in case:

  • virtual drives (e.g. provided by power iso etc.) are configured as current VFS games folder but no disc is mounted
  • an external SCSI HDD is wrongly detected as CDROM instead of removable HDD (thanks to powerful API provided by Windows). The issue is now by-passed in case the configured base folder for games is not the root folder (e.g. D:/rpcs3 where D:/ is a SCSI HDD (wrongly) discovered by Windows as CDROM)

NOTE: With the exception of virtual drives provided by Windows, virtual drives provided by other tools (e.g. power iso) are not supported (they will not work even mounting a valid ISO game).

MINOR IMPROVEMENT:

  • Skip a useless check to detect an optical raw device if navigating on subfolders (e.g. C:/subfolder_1/subfolder_2/), it means we are on a hdd/ssd. A path for an optical drive should include only the drive letter (e.g. E:/). This small optimization also allows the fix reported on second bullet above without the need to replace the used GetDriveType() function with a more complex code (e.g. based on DeviceIoControl() function)

@digant73 digant73 changed the title Avoid to open bd drive if no content is present Avoid to open a virtual drive if no content is present Apr 29, 2026
Comment thread Utilities/File.cpp
@elad335
elad335 merged commit 79d0e0e into RPCS3:master Apr 30, 2026
10 checks passed
@Megamouse Megamouse added the ISO label Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants