mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +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:
parent
71699e08c9
commit
29348be0ca
@ -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;
|
||||
|
@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user