print() now also outputs to svcOutputDebugString
This commit is contained in:
parent
7470100c23
commit
f0d6468017
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <3ds.h>
|
#include <3ds.h>
|
||||||
|
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
@ -57,3 +59,18 @@ void drawFrame()
|
|||||||
gfxFlushBuffers();
|
gfxFlushBuffers();
|
||||||
gfxSwapBuffers();
|
gfxSwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void print(const char* format, ...)
|
||||||
|
{
|
||||||
|
va_list arguments;
|
||||||
|
char new_str[512];
|
||||||
|
|
||||||
|
va_start(arguments, format);
|
||||||
|
vsprintf(new_str, format, arguments);
|
||||||
|
va_end(arguments);
|
||||||
|
|
||||||
|
sprintf(&superStr[strlen(superStr)], new_str);
|
||||||
|
svcOutputDebugString(new_str, strlen(new_str));
|
||||||
|
|
||||||
|
drawFrame();
|
||||||
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef OUTPUT_H
|
#ifndef OUTPUT_H
|
||||||
#define OUTPUT_H
|
#define OUTPUT_H
|
||||||
|
|
||||||
#define print(...) sprintf(&superStr[strlen(superStr)], __VA_ARGS__); drawFrame()
|
|
||||||
|
|
||||||
void drawFrame();
|
|
||||||
extern char superStr[];
|
extern char superStr[];
|
||||||
|
|
||||||
|
void drawFrame();
|
||||||
|
void print(const char* format, ...);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user