Files
Patrick Dawson 19f83efe72 Add export plugin
2024-06-19 00:23:32 +02:00

22 lines
494 B
C#

using Godot;
using ImGuiNET;
namespace CSharpGameProject;
public partial class Main : Node
{
public override void _Ready()
{
if (DisplayServer.WindowGetVsyncMode() == DisplayServer.VSyncMode.Disabled)
{
int refreshRate = (int)DisplayServer.ScreenGetRefreshRate();
Engine.MaxFps = refreshRate > 0 ? refreshRate : 60;
}
#if IMGUI
var io = ImGui.GetIO();
io.ConfigFlags |= ImGuiConfigFlags.ViewportsEnable;
#endif
}
}