MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / set_vsync_value

Method set_vsync_value

src/MainProgram.cpp:270–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270void 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
282void MainProgram::update_scale_and_density() {
283#ifdef __EMSCRIPTEN__

Callers 3

initialize_sdlFunction · 0.80
settings_viewMethod · 0.80

Calls 3

logMethod · 0.80
getFunction · 0.50
to_stringFunction · 0.50

Tested by

no test coverage detected