mirror of
https://github.com/joel16/CMFileManager-PSP.git
synced 2024-11-26 21:20:24 +00:00
ftp: Add access to umd (disc0:/)
This commit is contained in:
parent
6aa13c18c9
commit
b3c59faadc
@ -212,14 +212,15 @@ namespace GUI {
|
||||
}
|
||||
else if (!is_psp_go) {
|
||||
if (sceUmdCheckMedium() != 0) {
|
||||
sceUmdActivate(1, "disc0:");
|
||||
sceUmdWaitDriveStat(UMD_WAITFORINIT);
|
||||
if (R_FAILED(ret = sceUmdActivate(1, "disc0:")))
|
||||
Log::Error("sceUmdActivate(disc0) failed: 0x%x\n", ret);
|
||||
|
||||
cfg.cwd = "disc0:";
|
||||
device = BROWSE_STATE_UMD;
|
||||
if (R_FAILED(ret = sceUmdWaitDriveStat(PSP_UMD_READY)))
|
||||
Log::Error("sceUmdWaitDriveStat() failed: 0x%x\n", ret);
|
||||
}
|
||||
else
|
||||
Log::Error("Cannot read UMD drive!\n");
|
||||
|
||||
cfg.cwd = "disc0:/";
|
||||
device = BROWSE_STATE_UMD;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <pspnet_apctl.h>
|
||||
#include <pspnet_inet.h>
|
||||
#include <psppower.h>
|
||||
#include <pspumd.h>
|
||||
#include <psputility.h>
|
||||
|
||||
#include "config.h"
|
||||
@ -201,6 +202,16 @@ namespace Net {
|
||||
ftppsp_add_device("flash1:");
|
||||
ftppsp_add_device("flash2:");
|
||||
ftppsp_add_device("flash3:");
|
||||
|
||||
if (sceUmdCheckMedium() != 0) {
|
||||
if (R_FAILED(ret = sceUmdActivate(1, "disc0:")))
|
||||
Log::Error("sceUmdActivate(disc0) failed: 0x%x\n", ret);
|
||||
|
||||
if (R_FAILED(ret = sceUmdWaitDriveStat(PSP_UMD_READY)))
|
||||
Log::Error("sceUmdWaitDriveStat() failed: 0x%x\n", ret);
|
||||
|
||||
ftppsp_add_device("disc0:");
|
||||
}
|
||||
}
|
||||
|
||||
if (ret < 0) {
|
||||
@ -225,11 +236,20 @@ namespace Net {
|
||||
ftppsp_del_device("ms0:");
|
||||
|
||||
if (cfg.dev_options) {
|
||||
Flash::Init();
|
||||
Flash::Exit();
|
||||
ftppsp_del_device("flash0:");
|
||||
ftppsp_del_device("flash1:");
|
||||
ftppsp_del_device("flash2:");
|
||||
ftppsp_del_device("flash3:");
|
||||
|
||||
if (sceUmdCheckMedium() != 0) {
|
||||
int ret = 0;
|
||||
|
||||
if (R_FAILED(ret = sceUmdDeactivate(1, "disc0:")))
|
||||
Log::Error("sceUmdDeactivate(disc0) failed: 0x%x\n", ret);
|
||||
|
||||
ftppsp_del_device("disc0:");
|
||||
}
|
||||
}
|
||||
|
||||
ftppsp_fini();
|
||||
|
Loading…
Reference in New Issue
Block a user