mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00: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()
|
ImGuiIO::ImGuiIO()
|
||||||
{
|
{
|
||||||
memset(this, 0, sizeof(*this));
|
memset(this, 0, sizeof(*this));
|
||||||
|
DisplaySize = ImVec2(-1.0f, -1.0f);
|
||||||
DeltaTime = 1.0f/60.0f;
|
DeltaTime = 1.0f/60.0f;
|
||||||
IniSavingRate = 5.0f;
|
IniSavingRate = 5.0f;
|
||||||
IniFilename = "imgui.ini";
|
IniFilename = "imgui.ini";
|
||||||
@ -1411,7 +1412,7 @@ void ImGui::NewFrame()
|
|||||||
|
|
||||||
// Check user inputs
|
// Check user inputs
|
||||||
IM_ASSERT(g.IO.DeltaTime > 0.0f);
|
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
|
IM_ASSERT(g.IO.RenderDrawListsFn != NULL); // Must be implemented
|
||||||
|
|
||||||
if (!g.Initialized)
|
if (!g.Initialized)
|
||||||
|
Loading…
Reference in New Issue
Block a user