修复imgui cpu占用过高, 升级imgui

This commit is contained in:
Nanako 2024-07-04 20:21:03 +08:00
parent 79e68e6ea9
commit 79b37f1431
3 changed files with 5 additions and 1 deletions

2
imgui

@ -1 +1 @@
Subproject commit 10a5a857f5b5cd6eae7f86461b939ec05e9235b2
Subproject commit 527b2c45af2f8964f95826bd16ab7c7ed372ae41

View File

@ -135,6 +135,7 @@ void run_imgui() {
[commandBuffer presentDrawable:drawable];
[commandBuffer commit];
std::this_thread::yield();
}
}
shutdown_imgui();

View File

@ -3,6 +3,8 @@
#include "imgui_impl_win32.h"
#include <d3d11.h>
#include <tchar.h>
#include <thread>
#include "imgui_main.h"
// Data
@ -141,6 +143,7 @@ void run_imgui() {
tick_imgui(io.DeltaTime);
draw_imgui(io.DeltaTime);
render_imgui();
std::this_thread::yield();
}
shutdown_imgui();
}