notaz.gp2x.de
/
picodrive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
033a505
)
(Libretro) Fixup logging
author
twinaphex
<libretro@gmail.com>
Thu, 2 Jan 2014 01:44:39 +0000
(
02:44
+0100)
committer
twinaphex
<libretro@gmail.com>
Thu, 2 Jan 2014 01:44:39 +0000
(
02:44
+0100)
platform/libretro.c
patch
|
blob
|
blame
|
history
diff --git
a/platform/libretro.c
b/platform/libretro.c
index
67b4369
..
9ce13c5
100644
(file)
--- a/
platform/libretro.c
+++ b/
platform/libretro.c
@@
-263,9
+263,13
@@
void emu_32x_startup(void)
void lprintf(const char *fmt, ...)
{
void lprintf(const char *fmt, ...)
{
+ char buffer[256];
+ va_list ap;
+ va_start(ap, fmt);
+ vsprintf(buffer, fmt, ap);
/* TODO - add 'level' param for warning/error messages? */
if (log_cb)
/* TODO - add 'level' param for warning/error messages? */
if (log_cb)
- log_cb(RETRO_LOG_INFO, fmt);
+ log_cb(RETRO_LOG_INFO,
"%s\n",
fmt);
}
/* libretro */
}
/* libretro */
@@
-870,9
+874,10
@@
void retro_init(void)
level = 0;
environ_cb(RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL, &level);
level = 0;
environ_cb(RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL, &level);
- environ_cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &log);
- if (log.log)
+ if (environ_cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &log))
log_cb = log.log;
log_cb = log.log;
+ else
+ log_cb = NULL;
environ_cb(RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE, &disk_control);
environ_cb(RETRO_ENVIRONMENT_SET_DISK_CONTROL_INTERFACE, &disk_control);