imxc 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/init.js +6 -1
  2. package/package.json +1 -1
package/dist/init.js CHANGED
@@ -100,8 +100,13 @@ int main() {
100
100
  app.state.onIncrement = [&]() { app.state.count++; };
101
101
 
102
102
  while (glfwWindowShouldClose(window) == 0) {
103
- glfwPollEvents();
103
+ if (app.runtime.needs_frame()) {
104
+ glfwPollEvents();
105
+ } else {
106
+ glfwWaitEventsTimeout(0.1);
107
+ }
104
108
  render_frame(app);
109
+ app.runtime.frame_rendered(ImGui::IsAnyItemActive());
105
110
  }
106
111
 
107
112
  ImGui_ImplOpenGL3_Shutdown();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imxc",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Compiler for IMX — compiles React-like .tsx to native Dear ImGui C++",
5
5
  "type": "module",
6
6
  "bin": {