Do not cache the return value of ImGui.GetStyle.

internals
Eric Mellino 7 years ago
parent b06e8ab082
commit 2e0f0b4f5e
  1. 11
      src/ImGui.NET/ImGui.cs

@ -22,16 +22,9 @@ namespace ImGuiNET
ImGuiNative.igShutdown(); ImGuiNative.igShutdown();
} }
private static unsafe readonly IO s_io = new IO(ImGuiNative.igGetIO()); public static unsafe IO GetIO() => new IO(ImGuiNative.igGetIO());
public static unsafe IO GetIO() => s_io; public static unsafe Style GetStyle() => new Style(ImGuiNative.igGetStyle());
private static unsafe readonly Style s_style = new Style(ImGuiNative.igGetStyle());
public static unsafe Style GetStyle()
{
return s_style;
}
public static void PushID(string id) public static void PushID(string id)
{ {

Loading…
Cancel
Save