贵港吾悦商业管理有限公司多角色网上演练(吾悦广场)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

30 lines
594 B

//
// intercept.c
// Unity-iPhone
//
// Created by MaxBotvinev on 02.10.17.
//
#include <stdio.h>
#include <string.h>
#include "intercept.h"
#include "ffmpeg_wrapper.h"
int printf_redirect(const char *format, ...) {
va_list arg;
int done;
va_start (arg, format);
//vfprintf(stdout, "\nREDIRECT to Unity: \n", NULL);
done = vfprintf(stdout, format, arg);
int LOG_BUFFER_LENGTH = 1024;
char buf[LOG_BUFFER_LENGTH];
vsnprintf(buf, LOG_BUFFER_LENGTH, format, arg);
on_progress(buf);
va_end (arg);
return done;
}