From e960cf1ce622c8c8bc0a3a265c7373bb477cda08 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Thu, 27 May 2010 21:28:48 +0000 Subject: [PATCH] Fix another piece of cleanup fallout which appears to have been the cause of the file save bug. (_dbg_*() should really get the same treatment as *_LOG() to remove this whole class of #ifdef hell.) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5519 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 1ef195d4cc..758684dd5a 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 @@ -210,14 +210,16 @@ bool CWII_IPC_HLE_Device_FileIO::Write(u32 _CommandAddress) INFO_LOG(WII_IPC_FILEIO, "FileIO: Write 0x%04x bytes from 0x%08x to %s", Size, Address, m_Name.c_str()); -#if MAX_LOGLEVEL >= DEBUG_LEVEL if (m_pFileHandle) { size_t Result = fwrite(Memory::GetPointer(Address), Size, 1, m_pFileHandle); - _dbg_assert_msg_(WII_IPC_FILEIO, Result == 1, "fwrite failed"); - ReturnValue = Size; - } +#if MAX_LOGLEVEL >= DEBUG_LEVEL + _dbg_assert_msg_(WII_IPC_FILEIO, Result == 1, "fwrite failed"); +#else + (void)Result; #endif + ReturnValue = Size; + } Memory::Write_U32(ReturnValue, _CommandAddress + 0x4); return true;