fixes for IPC FileIO

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@991 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
fires.gc 2008-10-28 17:00:23 +00:00
parent 418f8a2b23
commit f560fc61da
4 changed files with 10 additions and 16 deletions

View File

@ -254,7 +254,7 @@ void ExecuteCommand(u32 _Address)
IWII_IPC_HLE_Device* pDevice = AccessDeviceByID(DeviceID);
if (pDevice != NULL)
{
// pDevice->Close(_Address);
pDevice->Close(_Address);
LOG(WII_IPC_HLE, "IOP: Close (Device=%s ID=0x%08x)", pDevice->GetDeviceName().c_str(), DeviceID);

View File

@ -38,7 +38,7 @@ public:
u32 GetDeviceID() const { return m_DeviceID; }
virtual bool Open(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Open()", m_Name.c_str()); return true; }
virtual bool Close(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Close()", m_Name.c_str()); return true; }
virtual bool Close(u32 _CommandAddress) { /*_dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Close()", m_Name.c_str()); */ return true; }
virtual bool Seek(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Seek()", m_Name.c_str()); return true; }
virtual bool Read(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Read()", m_Name.c_str()); return true; }
virtual bool Write(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Write()", m_Name.c_str()); return true; }

View File

@ -22,8 +22,6 @@
// smash bros writes to /shared2/sys/SYSCONF
// __________________________________________________________________________________________________
//
CWII_IPC_HLE_Device_FileIO::CWII_IPC_HLE_Device_FileIO(u32 _DeviceID, const std::string& _rDeviceName )
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
, m_pFileHandle(NULL)
@ -32,8 +30,6 @@ CWII_IPC_HLE_Device_FileIO::CWII_IPC_HLE_Device_FileIO(u32 _DeviceID, const std:
{
}
// __________________________________________________________________________________________________
//
CWII_IPC_HLE_Device_FileIO::~CWII_IPC_HLE_Device_FileIO()
{
if (m_pFileHandle != NULL)
@ -43,8 +39,13 @@ CWII_IPC_HLE_Device_FileIO::~CWII_IPC_HLE_Device_FileIO()
}
}
// __________________________________________________________________________________________________
//
bool
CWII_IPC_HLE_Device_FileIO::Close(u32 _CommandAddress)
{
Memory::Write_U32(0, _CommandAddress+4);
return true;
}
bool
CWII_IPC_HLE_Device_FileIO::Open(u32 _CommandAddress)
{
@ -68,8 +69,6 @@ CWII_IPC_HLE_Device_FileIO::Open(u32 _CommandAddress)
return true;
}
// __________________________________________________________________________________________________
//
bool
CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
{
@ -84,8 +83,6 @@ CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
return true;
}
// __________________________________________________________________________________________________
//
bool
CWII_IPC_HLE_Device_FileIO::Read(u32 _CommandAddress)
{
@ -109,8 +106,6 @@ CWII_IPC_HLE_Device_FileIO::Read(u32 _CommandAddress)
return true;
}
// __________________________________________________________________________________________________
//
bool
CWII_IPC_HLE_Device_FileIO::Write(u32 _CommandAddress)
{
@ -125,8 +120,6 @@ CWII_IPC_HLE_Device_FileIO::Write(u32 _CommandAddress)
return true;
}
// __________________________________________________________________________________________________
//
bool
CWII_IPC_HLE_Device_FileIO::IOCtl(u32 _CommandAddress)
{

View File

@ -27,6 +27,7 @@ public:
virtual ~CWII_IPC_HLE_Device_FileIO();
bool Close(u32 _CommandAddress);
bool Open(u32 _CommandAddress);
bool Seek(u32 _CommandAddress);
bool Read(u32 _CommandAddress);