mirror of
https://github.com/godotengine/godot
synced 2024-09-04 22:28:26 +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();
|
GLXDrawable drawable = glXGetCurrentDrawable();
|
||||||
glXSwapIntervalEXT(disp.x11_display, drawable, val);
|
glXSwapIntervalEXT(disp.x11_display, drawable, val);
|
||||||
} else {
|
} 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;
|
return;
|
||||||
}
|
}
|
||||||
use_vsync = p_use;
|
use_vsync = p_use;
|
||||||
|
|
|
@ -510,10 +510,10 @@ void GLManagerNative_Windows::set_use_vsync(DisplayServer::WindowID p_window_id,
|
||||||
win.use_vsync = p_use;
|
win.use_vsync = p_use;
|
||||||
|
|
||||||
if (!wglSwapIntervalEXT(p_use ? 1 : 0)) {
|
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 {
|
} 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 a new issue