| 268 | } |
| 269 | |
| 270 | void MainProgram::set_vsync_value(int vsyncValue) { |
| 271 | if(!SDL_GL_SetSwapInterval(vsyncValue)) { |
| 272 | Logger::get().log(Logger::LogType::INFO, "Vsync value " + std::to_string(vsyncValue) + " not available. Setting to 1"); |
| 273 | if(vsyncValue == -1) { |
| 274 | Logger::get().log(Logger::LogType::DESKTOP_USERINFO, "Adaptive VSync not available. Setting Vsync to On"); |
| 275 | vsyncValue = 1; |
| 276 | } |
| 277 | SDL_GL_SetSwapInterval(1); |
| 278 | } |
| 279 | conf.vsyncValue = vsyncValue; |
| 280 | } |
| 281 | |
| 282 | void MainProgram::update_scale_and_density() { |
| 283 | #ifdef __EMSCRIPTEN__ |
no test coverage detected