diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index 5ffc54a858..d476d38aa3 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -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); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h index bb0c12579f..4bf83479e5 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device.h @@ -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; } diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp index ea8bea2b30..277ff0a267 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp @@ -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) { diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.h index cff1abe465..566b8d2f00 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.h @@ -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);