Przeglądaj źródła

Merge pull request #71927 from Calinou/doc-vsync-runtime-change

Document changing V-Sync at runtime in the class reference
Clay John 2 lat temu
rodzic
commit
c06df6779a
2 zmienionych plików z 4 dodań i 3 usunięć
  1. 2 2
      doc/classes/DisplayServer.xml
  2. 2 1
      doc/classes/ProjectSettings.xml

+ 2 - 2
doc/classes/DisplayServer.xml

@@ -1434,9 +1434,9 @@
 			<param index="0" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode" />
 			<param index="1" name="window_id" type="int" default="0" />
 			<description>
-				Sets the V-Sync mode of the given window.
+				Sets the V-Sync mode of the given window. See also [member ProjectSettings.display/window/vsync/vsync_mode].
 				See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application.
-				Depending on the platform and used renderer, the engine will fall back to [constant VSYNC_ENABLED], if the desired mode is not supported.
+				Depending on the platform and used renderer, the engine will fall back to [constant VSYNC_ENABLED] if the desired mode is not supported.
 			</description>
 		</method>
 		<method name="window_set_window_buttons_offset">

+ 2 - 1
doc/classes/ProjectSettings.xml

@@ -662,7 +662,8 @@
 		<member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1">
 			Sets the V-Sync mode for the main game window.
 			See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application.
-			Depending on the platform and used renderer, the engine will fall back to [code]Enabled[/code], if the desired mode is not supported.
+			Depending on the platform and used renderer, the engine will fall back to [code]Enabled[/code] if the desired mode is not supported.
+			[b]Note:[/b] This property is only read when the project starts. To change the V-Sync mode at runtime, call [method DisplayServer.window_set_vsync_mode] instead.
 		</member>
 		<member name="dotnet/project/assembly_name" type="String" setter="" getter="" default="&quot;&quot;">
 			Name of the .NET assembly. This name is used as the name of the [code].csproj[/code] and [code].sln[/code] files. By default, it's set to the name of the project ([member application/config/name]) allowing to change it in the future without affecting the .NET assembly.