Skip to content

Commit

Permalink
update hello_imgui (rememberEnableIdling default=false (true is too s…
Browse files Browse the repository at this point in the history
…urprising))
  • Loading branch information
pthom committed Jan 13, 2024
1 parent b16c91a commit 6977d4f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions bindings/imgui_bundle/hello_imgui.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2084,17 +2084,17 @@ class FpsIdling:
# and will be set to True when it is idling.
is_idling: bool = False

# bool rememberEnableIdling = true; /* original C++ signature */
# bool rememberEnableIdling = false; /* original C++ signature */
# `rememberEnableIdling`: _bool, default=true_.
# If True, the last value of enableIdling is restored from the settings at startup.
remember_enable_idling: bool = True
# FpsIdling(float fpsIdle = 9.f, bool enableIdling = true, bool isIdling = false, bool rememberEnableIdling = true); /* original C++ signature */
remember_enable_idling: bool = False
# FpsIdling(float fpsIdle = 9.f, bool enableIdling = true, bool isIdling = false, bool rememberEnableIdling = false); /* original C++ signature */
def __init__(
self,
fps_idle: float = 9.0,
enable_idling: bool = True,
is_idling: bool = False,
remember_enable_idling: bool = True,
remember_enable_idling: bool = False,
) -> None:
"""Auto-generated default constructor with named params"""
pass
Expand Down
2 changes: 1 addition & 1 deletion external/hello_imgui/bindings/hello_imgui_amalgamation.h
Original file line number Diff line number Diff line change
Expand Up @@ -2623,7 +2623,7 @@ struct FpsIdling

// `rememberEnableIdling`: _bool, default=true_.
// If true, the last value of enableIdling is restored from the settings at startup.
bool rememberEnableIdling = true;
bool rememberEnableIdling = false;
};
// @@md

Expand Down
4 changes: 2 additions & 2 deletions external/hello_imgui/bindings/pybind_hello_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ void py_init_module_hello_imgui(py::module& m)
py::class_<HelloImGui::FpsIdling>
(m, "FpsIdling", " @@md#FpsIdling\n\n FpsIdling is a struct that contains Fps Idling parameters")
.def(py::init<>([](
float fpsIdle = 9.f, bool enableIdling = true, bool isIdling = false, bool rememberEnableIdling = true)
float fpsIdle = 9.f, bool enableIdling = true, bool isIdling = false, bool rememberEnableIdling = false)
{
auto r = std::make_unique<FpsIdling>();
r->fpsIdle = fpsIdle;
Expand All @@ -826,7 +826,7 @@ void py_init_module_hello_imgui(py::module& m)
r->rememberEnableIdling = rememberEnableIdling;
return r;
})
, py::arg("fps_idle") = 9.f, py::arg("enable_idling") = true, py::arg("is_idling") = false, py::arg("remember_enable_idling") = true
, py::arg("fps_idle") = 9.f, py::arg("enable_idling") = true, py::arg("is_idling") = false, py::arg("remember_enable_idling") = false
)
.def_readwrite("fps_idle", &FpsIdling::fpsIdle, " `fpsIdle`: _float, default=9_.\n ImGui applications can consume a lot of CPU, since they update the screen\n very frequently. In order to reduce the CPU usage, the FPS is reduced when\n no user interaction is detected.\n This is ok most of the time but if you are displaying animated widgets\n (for example a live video), you may want to ask for a faster refresh:\n either increase fpsIdle, or set it to 0 for maximum refresh speed\n (you can change this value during the execution depending on your application\n refresh needs)")
.def_readwrite("enable_idling", &FpsIdling::enableIdling, " `enableIdling`: _bool, default=true_.\n Set this to False to disable idling\n (this can be changed dynamically during execution)")
Expand Down
2 changes: 1 addition & 1 deletion external/hello_imgui/hello_imgui

0 comments on commit 6977d4f

Please sign in to comment.