From 443cc6da8d84196953ea6b56da9370e7b9e28833 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Tue, 10 Sep 2024 11:35:28 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20"Display=20modes=20list"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/director.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/director.cpp b/source/director.cpp index 0b3db4d..d34a54c 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -211,6 +211,14 @@ bool Director::initSDL() // Muestra información de la pantalla if (options->console) { + std::cout << "\n Display modes list:" << std::endl; + for (int i = 0; i < SDL_GetNumDisplayModes(0); ++i) + { + SDL_DisplayMode DM; + SDL_GetDisplayMode(0,i,&DM); + std::cout << "Display info: " + std::to_string(DM.w) + "x" + std::to_string(DM.h) + " @ " + std::to_string(DM.refresh_rate) + "Hz" << std::endl; + } + 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;