imgui: make sure our copy of imgui doesn't clash with others in the same process

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
+1-by: Mike Lothian <mike@fireburn.co.uk>
+1-by: Tapani Pälli <tapani.palli@intel.com>
+1-by: Eric Engestrom <eric.engestrom@intel.com>
+1-by: Yurii Kolesnykov <root@yurikoles.com>
+1-by: myfreeweb <greg@unrelenting.technology>
+1-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Lionel Landwerlin 2019-01-22 13:04:20 +00:00
parent 3950e7c11e
commit 89f03d1872
2 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,11 @@
#pragma once
// Have each embedded of ImGui define this symbol :
struct ImGuiContext;
extern thread_local ImGuiContext* __MesaImGui;
#define GImGui __MesaImGui
//---- Define assertion handler. Defaults to calling assert().
//#define IM_ASSERT(_EXPR) MyAssert(_EXPR)
//#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts

View File

@ -323,6 +323,8 @@ static struct Context {
struct window registers_window;
} context;
thread_local ImGuiContext* __MesaImGui;
static int
map_key(int k)
{