Proper write protection handling for RAM drives

This commit is contained in:
d0k3 2016-05-02 11:40:12 +02:00
parent e3e8b40061
commit 59f7d6173e

View File

@ -86,6 +86,8 @@ bool CheckWritePermissions(const char* path) {
(GetVirtualSource(path) == VRT_SYSNAND) ? 1 :
(GetVirtualSource(path) == VRT_EMUNAND) ? 4 : 7;
else return false;
} else if ((pdrv == 7) && (GetMountState() == IMG_RAMDRV)) {
pdrv = 0; // ...and another hack
}
if ((pdrv >= 1) && (pdrv <= 3) && (write_permission_level < 3)) {