mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-24 08:15:50 +00:00
SDL_CreateWindowAndRenderer() takes the window title as the first parameter
Fixes https://github.com/libsdl-org/SDL/issues/9626
This commit is contained in:
@@ -69,7 +69,7 @@ int SDL_AppInit(void **appstate, int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (SDL_CreateWindowAndRenderer(320, 240, 0, &window, &renderer) < 0) {
|
||||
if (SDL_CreateWindowAndRenderer("testaudiocapture", 320, 240, 0, &window, &renderer) < 0) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create SDL window and renderer: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ int main(int argc, char *argv[]) {
|
||||
SDL_Log("SDL_Init failed (%s)", SDL_GetError());
|
||||
return 1;
|
||||
}
|
||||
if (SDL_CreateWindowAndRenderer(640, 480, 0, &w, &r) < 0) {
|
||||
if (SDL_CreateWindowAndRenderer("testdialog", 640, 480, 0, &w, &r) < 0) {
|
||||
SDL_Log("Failed to create window and/or renderer: %s\n", SDL_GetError());
|
||||
SDL_Quit();
|
||||
return 1;
|
||||
|
||||
@@ -122,15 +122,11 @@ int main(int argc, char *argv[])
|
||||
goto quit;
|
||||
}
|
||||
|
||||
if (SDL_CreateWindowAndRenderer(WINDOW_WIDTH, WINDOW_HEIGHT, 0, &window, &renderer) < 0) {
|
||||
if (SDL_CreateWindowAndRenderer("testspriteminimal", WINDOW_WIDTH, WINDOW_HEIGHT, 0, &window, &renderer) < 0) {
|
||||
return_code = 2;
|
||||
goto quit;
|
||||
}
|
||||
|
||||
if (SDL_SetWindowTitle(window, argv[0]) < 0) {
|
||||
SDL_Log("SDL_SetWindowTitle: %s", SDL_GetError());
|
||||
}
|
||||
|
||||
sprite = CreateTexture(renderer, icon_bmp, icon_bmp_len, &sprite_w, &sprite_h);
|
||||
|
||||
if (!sprite) {
|
||||
|
||||
Reference in New Issue
Block a user