From 75cd8cf155068f9c2ecc141904e8e27b795b74dc Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 11 Mar 2016 10:51:18 +0100 Subject: commented out regression slow error.log on Windows --- src/emu/machine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/emu/machine.cpp') diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index 70c3f2f1569..b1b67ab81d0 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -1011,7 +1011,9 @@ void running_machine::logfile_callback(const running_machine &machine, const cha if (machine.m_logfile != nullptr) { machine.m_logfile->puts(buffer); - machine.m_logfile->flush(); + + // TODO: commented out for now - it causes -log slow down to a crawl on Windows + //machine.m_logfile->flush(); } } -- cgit v1.2.3-70-g09d2 From a880f01b17e4d268a25b4646d580b736d14b9e02 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 11 Mar 2016 20:56:08 +1100 Subject: Don't need to call FlushFileBuffers (it's equivalent to fsync, not fflush) --- src/emu/machine.cpp | 3 +-- src/osd/windows/winfile.cpp | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-) (limited to 'src/emu/machine.cpp') diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index b1b67ab81d0..b3ac263473e 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -1012,8 +1012,7 @@ void running_machine::logfile_callback(const running_machine &machine, const cha { machine.m_logfile->puts(buffer); - // TODO: commented out for now - it causes -log slow down to a crawl on Windows - //machine.m_logfile->flush(); + machine.m_logfile->flush(); } } diff --git a/src/osd/windows/winfile.cpp b/src/osd/windows/winfile.cpp index e8fcc30ab2c..742f97363d6 100644 --- a/src/osd/windows/winfile.cpp +++ b/src/osd/windows/winfile.cpp @@ -290,19 +290,6 @@ file_error osd_fflush(osd_file *file) if (!file || !file->handle) return FILERR_FAILURE; - switch (file->type) - { - case WINFILE_FILE: - // attempt to flush file buffers - if (!FlushFileBuffers(file->handle)) - return win_error_to_mame_file_error(GetLastError()); - break; - case WINFILE_SOCKET: - return FILERR_FAILURE; - case WINFILE_PTTY: - return FILERR_FAILURE; - - } return FILERR_NONE; } -- cgit v1.2.3-70-g09d2