Cambiando printf por std::cout

This commit is contained in:
2022-12-05 10:07:27 +01:00
parent a32582f1ec
commit 5f263fa71d
7 changed files with 45 additions and 21 deletions

View File

@@ -108,7 +108,7 @@ bool Director::initSDL()
if (SDL_Init(SDL_INIT_EVERYTHING) < 0)
// if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER | SDL_INIT_AUDIO) < 0)
{
printf("SDL could not initialize!\nSDL Error: %s\n", SDL_GetError());
std::cout << "SDL could not initialize!\nSDL Error: " << SDL_GetError() << std::endl;
success = false;
}
else
@@ -119,7 +119,7 @@ bool Director::initSDL()
// Establece el filtro de la textura
if (!SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, std::to_string(options->filter).c_str()))
{
printf("Warning: Nearest texture filtering not enabled!\n");
std::cout << "Warning: Nearest texture filtering not enabled!\n";
}
// Crea la ventana
@@ -133,7 +133,7 @@ bool Director::initSDL()
window = SDL_CreateWindow(WINDOW_CAPTION, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, (options->gameWidth + incW) * options->windowSize, (options->gameHeight + incH) * options->windowSize, SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI);
if (window == nullptr)
{
printf("Window could not be created!\nSDL Error: %s\n", SDL_GetError());
std::cout << "Window could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
success = false;
}
else
@@ -150,7 +150,7 @@ bool Director::initSDL()
if (renderer == nullptr)
{
printf("Renderer could not be created!\nSDL Error: %s\n", SDL_GetError());
std::cout << "Renderer could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
success = false;
}
else
@@ -167,7 +167,7 @@ bool Director::initSDL()
}
}
printf("\n");
std::cout << std::endl;
return success;
}