android: Add missing entries to SDL_category_prefixes table.

Add static assert so this shouldn't happen in the future.

Fixes #5883
This commit is contained in:
Eddy Jansson 2022-07-05 22:29:43 +02:00 committed by Sam Lantinga
parent 98411c0d33
commit ad0b91302d
1 changed files with 6 additions and 2 deletions

View File

@ -80,16 +80,20 @@ static const char *SDL_priority_prefixes[SDL_NUM_LOG_PRIORITIES] = {
}; };
#ifdef __ANDROID__ #ifdef __ANDROID__
static const char *SDL_category_prefixes[SDL_LOG_CATEGORY_RESERVED1] = { static const char *SDL_category_prefixes[] = {
"APP", "APP",
"ERROR", "ERROR",
"ASSERT",
"SYSTEM", "SYSTEM",
"AUDIO", "AUDIO",
"VIDEO", "VIDEO",
"RENDER", "RENDER",
"INPUT" "INPUT",
"TEST"
}; };
SDL_COMPILE_TIME_ASSERT(category_prefixes_enum, SDL_TABLESIZE(SDL_category_prefixes) == SDL_LOG_CATEGORY_RESERVED1);
static int SDL_android_priority[SDL_NUM_LOG_PRIORITIES] = { static int SDL_android_priority[SDL_NUM_LOG_PRIORITIES] = {
ANDROID_LOG_UNKNOWN, ANDROID_LOG_UNKNOWN,
ANDROID_LOG_VERBOSE, ANDROID_LOG_VERBOSE,