aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ps2/ps2debug.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2008-03-10 20:34:34 +0000
committerRobert Göffringmann2008-03-10 20:34:34 +0000
commit4f30f09456cd672797e69d574888a65dd60dedce (patch)
treee85213daad9d52f66e6a30e15601194d8462f48f /backends/platform/ps2/ps2debug.cpp
parentb1f1447234a5daf45f51336e7082af4c0bd151a1 (diff)
downloadscummvm-rg350-4f30f09456cd672797e69d574888a65dd60dedce.tar.gz
scummvm-rg350-4f30f09456cd672797e69d574888a65dd60dedce.tar.bz2
scummvm-rg350-4f30f09456cd672797e69d574888a65dd60dedce.zip
forgot to commit these
svn-id: r31099
Diffstat (limited to 'backends/platform/ps2/ps2debug.cpp')
-rw-r--r--backends/platform/ps2/ps2debug.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/backends/platform/ps2/ps2debug.cpp b/backends/platform/ps2/ps2debug.cpp
new file mode 100644
index 0000000000..272d256232
--- /dev/null
+++ b/backends/platform/ps2/ps2debug.cpp
@@ -0,0 +1,25 @@
+#include "ps2debug.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <sio.h>
+
+void sioprintf(const char *zFormat, ...) {
+ va_list ap;
+ char resStr[2048];
+
+ va_start(ap,zFormat);
+ vsnprintf(resStr, 2048, zFormat, ap);
+ va_end(ap);
+
+ char *pos = resStr;
+ while (*pos) {
+ if (*pos == '\n') {
+ // SIO terminal needs explicit CRLF
+ sio_putc('\r');
+ sio_putc('\n');
+ } else
+ sio_putc(*pos);
+ pos++;
+ }
+}
+