Is it possible to get the monitor's refresh rate? Also, would it be advisable to check the desired framerate with the refresh rate to use vsync if they are the same, but use setFramerateLimit() if not?
As in:
void initWin()
{
unsigned short vsyncRate = /* get refresh rate */ 60;
if ((vsyncRate - this->fps < 5) || (this->fps - vsyncRate < 5)) {
this->win->setVerticalSyncEnabled(true);
} else {
this->win->setVerticalSyncEnabled(false);
this->win->setFramerateLimit(this->fps);
}
}