mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-27 01:34:29 +00:00
Remove newlines from log messages
This commit is contained in:
committed by
Sam Lantinga
parent
17625e20df
commit
718034f5fa
@@ -311,7 +311,7 @@ static void loop(void)
|
||||
/* Print out some timing information */
|
||||
const Uint64 then = next_fps_check - fps_check_delay;
|
||||
const double fps = ((double)frames * 1000) / (now - then);
|
||||
SDL_Log("%2.2f frames per second\n", fps);
|
||||
SDL_Log("%2.2f frames per second", fps);
|
||||
next_fps_check = now + fps_check_delay;
|
||||
frames = 0;
|
||||
}
|
||||
@@ -347,15 +347,15 @@ int main(int argc, char **argv)
|
||||
consumed = 2;
|
||||
fps = SDL_atoi(argv[i + 1]);
|
||||
if (fps == 0) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --fps option requires an argument [from 1 to 1000], default is 12.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --fps option requires an argument [from 1 to 1000], default is 12.");
|
||||
quit(10);
|
||||
}
|
||||
if ((fps < 0) || (fps > 1000)) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --fps option must be in range from 1 to 1000, default is 12.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --fps option must be in range from 1 to 1000, default is 12.");
|
||||
quit(10);
|
||||
}
|
||||
} else {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --fps option requires an argument [from 1 to 1000], default is 12.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --fps option requires an argument [from 1 to 1000], default is 12.");
|
||||
quit(10);
|
||||
}
|
||||
} else if (SDL_strcmp(argv[i], "--nodelay") == 0) {
|
||||
@@ -369,15 +369,15 @@ int main(int argc, char **argv)
|
||||
if (argv[i + 1]) {
|
||||
scale = SDL_atoi(argv[i + 1]);
|
||||
if (scale == 0) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --scale option requires an argument [from 1 to 50], default is 5.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --scale option requires an argument [from 1 to 50], default is 5.");
|
||||
quit(10);
|
||||
}
|
||||
if ((scale < 0) || (scale > 50)) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --scale option must be in range from 1 to 50, default is 5.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --scale option must be in range from 1 to 50, default is 5.");
|
||||
quit(10);
|
||||
}
|
||||
} else {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --fps option requires an argument [from 1 to 1000], default is 12.\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --fps option requires an argument [from 1 to 1000], default is 12.");
|
||||
quit(10);
|
||||
}
|
||||
} else if (SDL_strcmp(argv[i], "--yuvformat") == 0) {
|
||||
@@ -400,11 +400,11 @@ int main(int argc, char **argv)
|
||||
} else if (SDL_strcmp(fmt, "NV21") == 0) {
|
||||
yuv_format = SDL_PIXELFORMAT_NV21;
|
||||
} else {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --yuvformat option requires one of the: YV12 (default), IYUV, YUY2, UYVY, YVYU, NV12, NV21)\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --yuvformat option requires one of the: YV12 (default), IYUV, YUY2, UYVY, YVYU, NV12, NV21)");
|
||||
quit(10);
|
||||
}
|
||||
} else {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --yuvformat option requires one of the: YV12 (default), IYUV, YUY2, UYVY, YVYU, NV12, NV21)\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "The --yuvformat option requires one of the: YV12 (default), IYUV, YUY2, UYVY, YVYU, NV12, NV21)");
|
||||
quit(10);
|
||||
}
|
||||
}
|
||||
@@ -435,20 +435,20 @@ int main(int argc, char **argv)
|
||||
|
||||
RawMooseData = (Uint8 *)SDL_malloc(MOOSEFRAME_SIZE * MOOSEFRAMES_COUNT);
|
||||
if (!RawMooseData) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't allocate memory for movie !\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't allocate memory for movie !");
|
||||
quit(1);
|
||||
}
|
||||
|
||||
/* load the trojan moose images */
|
||||
filename = GetResourceFilename(NULL, "moose.dat");
|
||||
if (!filename) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory");
|
||||
quit(2);
|
||||
}
|
||||
handle = SDL_IOFromFile(filename, "rb");
|
||||
SDL_free(filename);
|
||||
if (!handle) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't find the file moose.dat !\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't find the file moose.dat !");
|
||||
quit(2);
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ int main(int argc, char **argv)
|
||||
window_h = MOOSEPIC_H * scale;
|
||||
|
||||
if (state->num_windows != 1) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Only one window allowed\n");
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Only one window allowed");
|
||||
quit(1);
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ int main(int argc, char **argv)
|
||||
if (streaming) {
|
||||
MooseTexture = SDL_CreateTexture(renderer, yuv_format, SDL_TEXTUREACCESS_STREAMING, MOOSEPIC_W, MOOSEPIC_H);
|
||||
if (!MooseTexture) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create texture: %s\n", SDL_GetError());
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create texture: %s", SDL_GetError());
|
||||
quit(5);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user