Añadida información de la pantalla antes de crear la ventana

This commit is contained in:
2024-09-10 08:12:37 +02:00
parent 824bc08077
commit f071b60212
3 changed files with 10 additions and 8 deletions

View File

@@ -207,6 +207,14 @@ bool Director::initSDL()
// Inicia el generador de numeros aleatorios
std::srand(static_cast<unsigned int>(SDL_GetTicks()));
// Muestra información de la pantalla
if (options->console)
{
SDL_DisplayMode DM;
SDL_GetCurrentDisplayMode(0, &DM);
std::cout << "\nDisplay info: " + std::to_string(DM.w) + "x" + std::to_string(DM.h) + " @ " + std::to_string(DM.refresh_rate) + "Hz" << std::endl;
}
// Establece el filtro de la textura
if (!SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, std::to_string(options->video.filter).c_str()))
{