Bladeren bron

Merge pull request #93239 from Calinou/gl-vsync-tweak-warnings

Tweak warning messages related to V-Sync on OpenGL
Rémi Verschelde 1 jaar geleden
bovenliggende
commit
eb20a68b32
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 1 1
      platform/linuxbsd/x11/gl_manager_x11.cpp
  2. 2 2
      platform/windows/gl_manager_windows_native.cpp

+ 1 - 1
platform/linuxbsd/x11/gl_manager_x11.cpp

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

+ 2 - 2
platform/windows/gl_manager_windows_native.cpp

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