status for network has to be 3 to enter settings, fixed files so they can have more than one handle opened at a time.
This commit is contained in:
parent
9a712a9fab
commit
82ffbc338a
|
@ -287,7 +287,7 @@ void ExecuteCommand(u32 _Address)
|
||||||
DeviceID = GetDeviceIDByName(DeviceName);
|
DeviceID = GetDeviceIDByName(DeviceName);
|
||||||
|
|
||||||
// check if a device with this name has been created already
|
// check if a device with this name has been created already
|
||||||
if (DeviceID == -1)
|
if (DeviceName.find("/dev/") == std::string::npos || DeviceID == -1)
|
||||||
{
|
{
|
||||||
if (DeviceName.find("/dev/") != std::string::npos)
|
if (DeviceName.find("/dev/") != std::string::npos)
|
||||||
{
|
{
|
||||||
|
|
|
@ -168,7 +168,7 @@ bool CWII_IPC_HLE_Device_FileIO::Open(u32 _CommandAddress, u32 _Mode)
|
||||||
else if (ReturnValue == 0)
|
else if (ReturnValue == 0)
|
||||||
{
|
{
|
||||||
ERROR_LOG(WII_IPC_FILEIO, " FileIO failed open: %s (%s) - I/O Error", m_Filename.c_str(), Modes[_Mode]);
|
ERROR_LOG(WII_IPC_FILEIO, " FileIO failed open: %s (%s) - I/O Error", m_Filename.c_str(), Modes[_Mode]);
|
||||||
ReturnValue = FS_INVALID_ARGUMENT;
|
ReturnValue = FS_RESULT_FATAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_CommandAddress)
|
if (_CommandAddress)
|
||||||
|
@ -179,7 +179,7 @@ bool CWII_IPC_HLE_Device_FileIO::Open(u32 _CommandAddress, u32 _Mode)
|
||||||
|
|
||||||
bool CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
|
bool CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
|
||||||
{
|
{
|
||||||
u32 ReturnValue = FS_INVALID_ARGUMENT;
|
u32 ReturnValue = FS_RESULT_FATAL;
|
||||||
const s32 SeekPosition = Memory::Read_U32(_CommandAddress + 0xC);
|
const s32 SeekPosition = Memory::Read_U32(_CommandAddress + 0xC);
|
||||||
const s32 Mode = Memory::Read_U32(_CommandAddress + 0x10);
|
const s32 Mode = Memory::Read_U32(_CommandAddress + 0x10);
|
||||||
|
|
||||||
|
|
|
@ -109,17 +109,16 @@ bool CWII_IPC_HLE_Device_fs::IOCtlV(u32 _CommandAddress)
|
||||||
if (!File::Exists(DirName))
|
if (!File::Exists(DirName))
|
||||||
{
|
{
|
||||||
WARN_LOG(WII_IPC_FILEIO, "FS: Search not found: %s", DirName.c_str());
|
WARN_LOG(WII_IPC_FILEIO, "FS: Search not found: %s", DirName.c_str());
|
||||||
ReturnValue = FS_DIRFILE_NOT_FOUND;
|
ReturnValue = FS_FILE_NOT_EXIST;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// AyuanX: what if we return "found one successfully" if it is a file?
|
|
||||||
else if (!File::IsDirectory(DirName))
|
else if (!File::IsDirectory(DirName))
|
||||||
{
|
{
|
||||||
// It's not a directory, so error.
|
// It's not a directory, so error.
|
||||||
// Games don't usually seem to care WHICH error they get, as long as it's <0
|
// Games don't usually seem to care WHICH error they get, as long as it's <
|
||||||
WARN_LOG(WII_IPC_FILEIO, "\tNot a directory - return FS_INVALID_ARGUMENT");
|
// Well the system menu CARES!
|
||||||
ReturnValue = FS_INVALID_ARGUMENT;
|
WARN_LOG(WII_IPC_FILEIO, "\tNot a directory - return FS_RESULT_FATAL");
|
||||||
|
ReturnValue = FS_RESULT_FATAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,11 +32,13 @@ struct NANDStat
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
FS_RESULT_OK = 0,
|
FS_RESULT_OK = 0,
|
||||||
|
FS_INVALID = -4,
|
||||||
FS_DIRFILE_NOT_FOUND = -6,
|
FS_DIRFILE_NOT_FOUND = -6,
|
||||||
FS_INVALID_ARGUMENT = -101,
|
FS_RESULT_FATAL = -101,
|
||||||
|
FS_NO_ACCESS = -102,
|
||||||
FS_FILE_EXIST = -105,
|
FS_FILE_EXIST = -105,
|
||||||
FS_FILE_NOT_EXIST = -106,
|
FS_FILE_NOT_EXIST = -106,
|
||||||
FS_RESULT_FATAL = -128,
|
FS_NO_HANDLE = -106,
|
||||||
};
|
};
|
||||||
|
|
||||||
class CWII_IPC_HLE_Device_fs : public IWII_IPC_HLE_Device
|
class CWII_IPC_HLE_Device_fs : public IWII_IPC_HLE_Device
|
||||||
|
|
|
@ -80,7 +80,7 @@ it failed)
|
||||||
|
|
||||||
extern std::queue<std::pair<u32,std::string> > g_ReplyQueueLater;
|
extern std::queue<std::pair<u32,std::string> > g_ReplyQueueLater;
|
||||||
const u8 default_address[] = { 0x00, 0x17, 0xAB, 0x99, 0x99, 0x99 };
|
const u8 default_address[] = { 0x00, 0x17, 0xAB, 0x99, 0x99, 0x99 };
|
||||||
int status = 5;
|
int status = 3;
|
||||||
// **********************************************************************************
|
// **********************************************************************************
|
||||||
// Handle /dev/net/kd/request requests
|
// Handle /dev/net/kd/request requests
|
||||||
CWII_IPC_HLE_Device_net_kd_request::CWII_IPC_HLE_Device_net_kd_request(u32 _DeviceID, const std::string& _rDeviceName)
|
CWII_IPC_HLE_Device_net_kd_request::CWII_IPC_HLE_Device_net_kd_request(u32 _DeviceID, const std::string& _rDeviceName)
|
||||||
|
|
Loading…
Reference in New Issue