Remove newlines from log messages

This commit is contained in:
nightmareci
2025-01-22 12:59:57 -08:00
committed by Sam Lantinga
parent 17625e20df
commit 718034f5fa
123 changed files with 1143 additions and 1118 deletions

View File

@@ -22,7 +22,7 @@ report_power(void)
const SDL_PowerState state = SDL_GetPowerInfo(&seconds, &percent);
const char *statestr = NULL;
SDL_Log("SDL-reported power info...\n");
SDL_Log("SDL-reported power info...");
switch (state) {
case SDL_POWERSTATE_UNKNOWN:
statestr = "Unknown";
@@ -44,18 +44,18 @@ report_power(void)
break;
}
SDL_Log("State: %s\n", statestr);
SDL_Log("State: %s", statestr);
if (percent == -1) {
SDL_Log("Percent left: unknown\n");
SDL_Log("Percent left: unknown");
} else {
SDL_Log("Percent left: %d%%\n", percent);
SDL_Log("Percent left: %d%%", percent);
}
if (seconds == -1) {
SDL_Log("Time left: unknown\n");
SDL_Log("Time left: unknown");
} else {
SDL_Log("Time left: %d minutes, %d seconds\n", seconds / 60, seconds % 60);
SDL_Log("Time left: %d minutes, %d seconds", seconds / 60, seconds % 60);
}
}
@@ -75,7 +75,7 @@ int main(int argc, char *argv[])
}
if (!SDL_Init(0)) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init() failed: %s\n", SDL_GetError());
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init() failed: %s", SDL_GetError());
return 1;
}