mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-11-04 06:00:23 +00:00
[OpenGL] Restore ImGui's context to previously saved one, duh
This commit is contained in:
parent
6eb2c9bc09
commit
5afbe10005
@ -116,6 +116,7 @@ void imgui_create(void *ctx)
|
||||
init_gpu_stats(vendorID, params);
|
||||
// Setup Dear ImGui context
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGuiContext *saved_ctx = ImGui::GetCurrentContext();
|
||||
state.imgui_ctx = ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
|
||||
@ -156,8 +157,8 @@ void imgui_create(void *ctx)
|
||||
}
|
||||
sw_stats.font1 = state.font1;
|
||||
|
||||
// Reset global context to null, might clash with apps that use Dear ImGui
|
||||
ImGui::SetCurrentContext(nullptr);
|
||||
// Restore global context or ours might clash with apps that use Dear ImGui
|
||||
ImGui::SetCurrentContext(saved_ctx);
|
||||
}
|
||||
|
||||
void imgui_shutdown()
|
||||
|
Loading…
Reference in New Issue
Block a user