/**
* uses the filtering relying on resolution with the size to fetch only the screen mode matching with the
* current resolution
*/
if (_settings.isFullScreen()) {
final MonitorDevice monitor = _newtWindow.getMainMonitor();
List<MonitorMode> monitorModes = monitor.getSupportedModes();
// the resolution is provided by the user
final Dimension dimension = new Dimension(_settings.getWidth(), _settings.getHeight());
monitorModes = MonitorModeUtil.filterByResolution(monitorModes, dimension);
monitorModes = MonitorModeUtil.getHighestAvailableBpp(monitorModes);
if (_settings.getFrequency() > 0) {
monitorModes = MonitorModeUtil.filterByRate(monitorModes, _settings.getFrequency());
} else {
monitorModes = MonitorModeUtil.getHighestAvailableRate(monitorModes);
}
monitor.setCurrentMode(monitorModes.get(0));
}
}