Skip to content

Commit 46fa045

Browse files
guiltSiegeLord
authored andcommitted
Enable Emitting to both File/Debug Window on Windows.
Restrict Android from emitting to File.
1 parent cdefab4 commit 46fa045

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/debug.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static void open_trace_file(void)
180180
// stderr will be redirected to xcode's debug console though, so
181181
// it's as good to use as the NSLog stuff.
182182
trace_info.trace_file = stderr;
183-
#elif defined(ALLEGRO_WINDOWS)
183+
#elif defined(ALLEGRO_ANDROID)
184184
trace_info.trace_file = NULL;
185185
#else
186186
trace_info.trace_file = fopen("allegro.log", "w");
@@ -207,7 +207,7 @@ static void do_trace(const char *msg, ...)
207207
msg, ap);
208208
va_end(ap);
209209
}
210-
else if (trace_info.trace_file) {
210+
if (!_al_user_trace_handler && trace_info.trace_file) {
211211
va_start(ap, msg);
212212
vfprintf(trace_info.trace_file, msg, ap);
213213
va_end(ap);
@@ -333,7 +333,7 @@ void _al_trace_suffix(const char *msg, ...)
333333
#endif
334334
static_trace_buffer[0] = '\0';
335335
}
336-
else if (trace_info.trace_file) {
336+
if (!_al_user_trace_handler && trace_info.trace_file) {
337337
va_start(ap, msg);
338338
vfprintf(trace_info.trace_file, msg, ap);
339339
va_end(ap);

0 commit comments

Comments
 (0)