Remove remnants of old logging code

This commit is contained in:
twinaphex 2014-01-12 15:12:23 +01:00
parent 6a76124e3f
commit 068324da69
3 changed files with 6 additions and 33 deletions

4
gl.hpp
View File

@ -81,8 +81,8 @@ namespace GL
if (!func) if (!func)
{ {
func = get_symbol(sym); func = get_symbol(sym);
if (!func) if (!func && log_cb)
retro_stderr_print("Didn't find GL symbol: %s\n", sym.c_str()); log_cb(RETRO_LOG_ERROR, "Didn't find GL symbol: %s\n", sym.c_str());
} }
return reinterpret_cast<Func>(func); return reinterpret_cast<Func>(func);

View File

@ -35,7 +35,7 @@
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
static struct retro_hw_render_callback hw_render; static struct retro_hw_render_callback hw_render;
static struct retro_camera_callback camera_cb; static struct retro_camera_callback camera_cb;
static retro_log_printf_t log_cb; retro_log_printf_t log_cb;
static retro_video_refresh_t video_cb; static retro_video_refresh_t video_cb;
static retro_audio_sample_t audio_cb; static retro_audio_sample_t audio_cb;
static retro_audio_sample_batch_t audio_batch_cb; static retro_audio_sample_batch_t audio_batch_cb;
@ -371,34 +371,6 @@ void retro_get_system_av_info(struct retro_system_av_info *info)
info->geometry.max_height = MAX_HEIGHT; info->geometry.max_height = MAX_HEIGHT;
} }
#ifdef ANDROID
#include <android/log.h>
#endif
#include <stdarg.h>
void retro_stderr(const char *str)
{
#if defined(_WIN32)
OutputDebugStringA(str);
#elif defined(ANDROID)
__android_log_print(ANDROID_LOG_INFO, "InstancingViewer: ", "%s", str);
#else
fputs(str, stderr);
#endif
}
void retro_stderr_print(const char *fmt, ...)
{
char buf[1024];
va_list list;
va_start(list, fmt);
vsprintf(buf, fmt, list); // Unsafe, but vsnprintf isn't in C++03 :(
va_end(list);
retro_stderr(buf);
}
void retro_set_environment(retro_environment_t cb) void retro_set_environment(retro_environment_t cb)
{ {
environ_cb = cb; environ_cb = cb;

View File

@ -27,14 +27,15 @@
#include <tr1/memory> #include <tr1/memory>
#endif #endif
#include "libretro.h"
#if defined(__QNX__) || defined(__CELLOS_LV2__) || defined(IOS) || defined(OSX) #if defined(__QNX__) || defined(__CELLOS_LV2__) || defined(IOS) || defined(OSX)
namespace std1 = compat; namespace std1 = compat;
#elif !defined(EMSCRIPTEN) #elif !defined(EMSCRIPTEN)
namespace std1 = std::tr1; namespace std1 = std::tr1;
#endif #endif
void retro_stderr(const char *str); extern retro_log_printf_t log_cb;
void retro_stderr_print(const char *fmt, ...);
#endif #endif