Skip to content

Commit

Permalink
Merge pull request godotengine#93239 from Calinou/gl-vsync-tweak-warn…
Browse files Browse the repository at this point in the history
…ings

Tweak warning messages related to V-Sync on OpenGL
  • Loading branch information
akien-mga committed Jun 17, 2024
2 parents cf50779 + 29348be commit eb20a68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion platform/linuxbsd/x11/gl_manager_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ void GLManager_X11::set_use_vsync(bool p_use) {
GLXDrawable drawable = glXGetCurrentDrawable();
glXSwapIntervalEXT(disp.x11_display, drawable, val);
} else {
WARN_PRINT("Could not set V-Sync mode. V-Sync is not supported.");
WARN_PRINT_ONCE("Could not set V-Sync mode, as changing V-Sync mode is not supported by the graphics driver.");
return;
}
use_vsync = p_use;
Expand Down
4 changes: 2 additions & 2 deletions platform/windows/gl_manager_windows_native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,10 @@ void GLManagerNative_Windows::set_use_vsync(DisplayServer::WindowID p_window_id,
win.use_vsync = p_use;

if (!wglSwapIntervalEXT(p_use ? 1 : 0)) {
WARN_PRINT("Could not set V-Sync mode.");
WARN_PRINT_ONCE("Could not set V-Sync mode, as changing V-Sync mode is not supported by the graphics driver.");
}
} else {
WARN_PRINT("Could not set V-Sync mode. V-Sync is not supported.");
WARN_PRINT_ONCE("Could not set V-Sync mode, as changing V-Sync mode is not supported by the graphics driver.");
}
}

Expand Down

0 comments on commit eb20a68

Please sign in to comment.