aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorEugene Sandulenko2010-10-18 19:07:24 +0000
committerEugene Sandulenko2010-10-18 19:07:24 +0000
commit05b3f2a0711df91230bf39587c9eed4da36e1afa (patch)
tree40128a05b6941cc4515cf3c6fec56612606081ac /gui
parent4b5640883c851bc9f771da98190b8d416095ba0d (diff)
downloadscummvm-rg350-05b3f2a0711df91230bf39587c9eed4da36e1afa.tar.gz
scummvm-rg350-05b3f2a0711df91230bf39587c9eed4da36e1afa.tar.bz2
scummvm-rg350-05b3f2a0711df91230bf39587c9eed4da36e1afa.zip
GUI: Use vprintf in Console class. Patch by littleboy
svn-id: r53577
Diffstat (limited to 'gui')
-rw-r--r--gui/console.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/gui/console.cpp b/gui/console.cpp
index a53e97888b..2fede327f1 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -660,7 +660,7 @@ void ConsoleDialog::updateScrollBuffer() {
}
int ConsoleDialog::printf(const char *format, ...) {
- va_list argptr;
+ va_list argptr;
va_start(argptr, format);
int count = this->vprintf(format, argptr);
@@ -669,17 +669,10 @@ int ConsoleDialog::printf(const char *format, ...) {
}
int ConsoleDialog::vprintf(const char *format, va_list argptr) {
- char buf[2048];
+ Common::String output = Common::String::vprintf(format, argptr);
-#if defined(WIN32)
- int count = _vsnprintf(buf, sizeof(buf), format, argptr);
-#elif defined(__SYMBIAN32__)
- int count = vsprintf(buf, format, argptr);
-#else
- int count = vsnprintf(buf, sizeof(buf), format, argptr);
-#endif
- print(buf);
- return count;
+ print(output.c_str());
+ return output.size();
}
void ConsoleDialog::putchar(int c) {