mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 13:49:01 +08:00
Support zero-sized display, now sets default as -1,-1 and assert if display size is negative.
This commit is contained in:
parent
a3af51fd4e
commit
ac29859f70
@ -371,6 +371,7 @@ ImGuiStyle::ImGuiStyle()
|
||||
ImGuiIO::ImGuiIO()
|
||||
{
|
||||
memset(this, 0, sizeof(*this));
|
||||
DisplaySize = ImVec2(-1.0f, -1.0f);
|
||||
DeltaTime = 1.0f/60.0f;
|
||||
IniSavingRate = 5.0f;
|
||||
IniFilename = "imgui.ini";
|
||||
@ -1411,7 +1412,7 @@ void ImGui::NewFrame()
|
||||
|
||||
// Check user inputs
|
||||
IM_ASSERT(g.IO.DeltaTime > 0.0f);
|
||||
IM_ASSERT(g.IO.DisplaySize.x > 0.0f && g.IO.DisplaySize.y > 0.0f);
|
||||
IM_ASSERT(g.IO.DisplaySize.x >= 0.0f && g.IO.DisplaySize.y >= 0.0f);
|
||||
IM_ASSERT(g.IO.RenderDrawListsFn != NULL); // Must be implemented
|
||||
|
||||
if (!g.Initialized)
|
||||
|
Loading…
Reference in New Issue
Block a user