diff options
| author | Tony Puccinelli | 2010-08-10 23:21:08 +0000 |
|---|---|---|
| committer | Tony Puccinelli | 2010-08-10 23:21:08 +0000 |
| commit | 682807f0e916b189c69b60765418ee1ccc327cbf (patch) | |
| tree | e8b220b934f6b14d4dac290181fce0c1b209579a /backends/platform/psp/trace.cpp | |
| parent | 83f1531cb8fa5ba43c246143ecdde2cb1d140a8e (diff) | |
| parent | fffec23a02cc88ed8daba0a3b50007b7e220c075 (diff) | |
| download | scummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.tar.gz scummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.tar.bz2 scummvm-rg350-682807f0e916b189c69b60765418ee1ccc327cbf.zip | |
merged trunk into branch, reverted Cruise Singleton changes
svn-id: r51961
Diffstat (limited to 'backends/platform/psp/trace.cpp')
| -rw-r--r-- | backends/platform/psp/trace.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/backends/platform/psp/trace.cpp b/backends/platform/psp/trace.cpp index 4bf5450177..7bac6534da 100644 --- a/backends/platform/psp/trace.cpp +++ b/backends/platform/psp/trace.cpp @@ -30,8 +30,9 @@ #include <stdio.h> int psp_debug_indent = 0; +bool firstWriteToFile = true; -void PSPDebugTrace(bool alsoToScreen, const char *format, ...) { +void PspDebugTrace(bool alsoToScreen, const char *format, ...) { va_list opt; char buffer[2048]; int bufsz; @@ -41,8 +42,12 @@ void PSPDebugTrace(bool alsoToScreen, const char *format, ...) { bufsz = vsnprintf(buffer, (size_t) sizeof(buffer), format, opt); va_end(opt); - //fd = fopen("MS0:/SCUMMTRACE.TXT", "ab"); - fd = fopen("SCUMMTRACE.TXT", "ab"); + if (firstWriteToFile) { + fd = fopen("SCUMMTRACE.TXT", "wb"); // erase the file the first time we write + firstWriteToFile = false; + } else { + fd = fopen("SCUMMTRACE.TXT", "ab"); + } if (fd == 0) return; |
