added logging of available full screen modes

This commit is contained in:
thrust26 2019-12-15 10:28:14 +01:00
parent b769638a35
commit a1d7315e08
1 changed files with 18 additions and 0 deletions

View File

@ -99,6 +99,24 @@ void FrameBufferSDL2::queryHardware(vector<Common::Size>& fullscreenRes,
{ {
SDL_GetDesktopDisplayMode(i, &display); SDL_GetDesktopDisplayMode(i, &display);
fullscreenRes.emplace_back(display.w, display.h); fullscreenRes.emplace_back(display.w, display.h);
// evaluate fullscreen display modes (debug only for now)
int numModes = SDL_GetNumDisplayModes(i);
ostringstream s;
s << "Supported video modes for display " << i << ":";
Logger::debug(s.str());
for (int m = 0; m < numModes; m++)
{
SDL_DisplayMode mode;
SDL_GetDisplayMode(i, m, &mode);
s.str("");
s << " " << m << ": " << mode.w << "x" << mode.h << "@" << mode.refresh_rate << "Hz";
if (mode.w == display.w && mode.h == display.h && mode.refresh_rate == display.refresh_rate)
s << " (active)";
Logger::debug(s.str());
}
} }
// Now get the maximum windowed desktop resolution // Now get the maximum windowed desktop resolution