1
0
mirror of https://github.com/godotengine/godot synced 2024-07-08 16:30:44 +00:00

Tweak warning messages related to V-Sync on OpenGL

- Make warnings print only once per session.
- Tweak the message to be less confusing, and mention that the issue
  most likely stems from a graphics driver limitation.
This commit is contained in:
Hugo Locurcio 2024-06-16 21:22:10 +02:00
parent 71699e08c9
commit 29348be0ca
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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.");
}
}