Added a 'refreshrate' field to the table returned by love.window.getMode. The value may be 0 if the refresh rate of the monitor can't be determined. It might also be 59 instead of 60 on 59.94hz monitors on some operating systems.

This commit is contained in:
Alex Szpakowski
2014-08-20 20:22:46 -03:00
parent 9e93d854b8
commit e1f7e4abd3
4 changed files with 16 additions and 4 deletions
+2
View File
@@ -51,6 +51,7 @@ WindowSettings::WindowSettings()
, display(0)
, highdpi(false)
, sRGB(false)
, refreshrate(0.0)
{
}
@@ -99,6 +100,7 @@ StringMap<Window::Setting, Window::SETTING_MAX_ENUM>::Entry Window::settingEntri
{"display", SETTING_DISPLAY},
{"highdpi", SETTING_HIGHDPI},
{"srgb", SETTING_SRGB},
{"refreshrate", SETTING_REFRESHRATE},
};
StringMap<Window::Setting, Window::SETTING_MAX_ENUM> Window::settings(Window::settingEntries, sizeof(Window::settingEntries));