mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-17 00:54:06 +00:00
Remove newlines from log messages
This commit is contained in:
committed by
Sam Lantinga
parent
17625e20df
commit
718034f5fa
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
|
||||
} else if (!image_file) {
|
||||
image_file = argv[i];
|
||||
} else {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Usage: %s [--resizable] [shape.bmp]\n", argv[0]);
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Usage: %s [--resizable] [shape.bmp]", argv[0]);
|
||||
goto quit;
|
||||
}
|
||||
}
|
||||
@@ -56,18 +56,18 @@ int main(int argc, char *argv[])
|
||||
if (image_file) {
|
||||
shape = SDL_LoadBMP(image_file);
|
||||
if (!shape) {
|
||||
SDL_Log("Couldn't load %s: %s\n", image_file, SDL_GetError());
|
||||
SDL_Log("Couldn't load %s: %s", image_file, SDL_GetError());
|
||||
goto quit;
|
||||
}
|
||||
} else {
|
||||
SDL_IOStream *stream = SDL_IOFromConstMem(glass_bmp, sizeof(glass_bmp));
|
||||
if (!stream) {
|
||||
SDL_Log("Couldn't create iostream for glass.bmp: %s\n", SDL_GetError());
|
||||
SDL_Log("Couldn't create iostream for glass.bmp: %s", SDL_GetError());
|
||||
goto quit;
|
||||
}
|
||||
shape = SDL_LoadBMP_IO(stream, true);
|
||||
if (!shape) {
|
||||
SDL_Log("Couldn't load glass.bmp: %s\n", SDL_GetError());
|
||||
SDL_Log("Couldn't load glass.bmp: %s", SDL_GetError());
|
||||
goto quit;
|
||||
}
|
||||
}
|
||||
@@ -81,13 +81,13 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
window = SDL_CreateWindow("SDL Shape Test", shape->w, shape->h, flags);
|
||||
if (!window) {
|
||||
SDL_Log("Couldn't create transparent window: %s\n", SDL_GetError());
|
||||
SDL_Log("Couldn't create transparent window: %s", SDL_GetError());
|
||||
goto quit;
|
||||
}
|
||||
|
||||
renderer = SDL_CreateRenderer(window, NULL);
|
||||
if (!renderer) {
|
||||
SDL_Log("Couldn't create renderer: %s\n", SDL_GetError());
|
||||
SDL_Log("Couldn't create renderer: %s", SDL_GetError());
|
||||
goto quit;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
|
||||
if (!resizable) {
|
||||
/* Set the hit test callback so we can drag the window */
|
||||
if (!SDL_SetWindowHitTest(window, ShapeHitTest, shape)) {
|
||||
SDL_Log("Couldn't set hit test callback: %s\n", SDL_GetError());
|
||||
SDL_Log("Couldn't set hit test callback: %s", SDL_GetError());
|
||||
goto quit;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user