Define macros wrappers for logs

Use macros to wrap SDL_Log* functions with the "application" category.
This commit is contained in:
Romain Vimont
2018-02-13 10:10:18 +01:00
parent d45ef1a295
commit 3ed80a1fac
16 changed files with 105 additions and 81 deletions

View File

@@ -1,9 +1,9 @@
#include "controlevent.h"
#include <SDL2/SDL_log.h>
#include <SDL2/SDL_stdinc.h>
#include "lockutil.h"
#include "log.h"
static inline void write16(Uint8 *buf, Uint16 value) {
buf[0] = value >> 8;
@@ -56,7 +56,7 @@ int control_event_serialize(const struct control_event *event, unsigned char *bu
buf[1] = event->command_event.action;
return 2;
default:
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "Unknown event type: %u", (unsigned) event->type);
LOGW("Unknown event type: %u", (unsigned) event->type);
return 0;
}
}