update Dear ImGui to 1.91.4
This commit is contained in:
parent
623fce4f01
commit
2a7eac93f8
41 changed files with 1145 additions and 791 deletions
|
|
@ -175,8 +175,8 @@ static ImGui_ImplSDL2_Data* ImGui_ImplSDL2_GetBackendData()
|
|||
|
||||
// Forward Declarations
|
||||
static void ImGui_ImplSDL2_UpdateMonitors();
|
||||
static void ImGui_ImplSDL2_InitPlatformInterface(SDL_Window* window, void* sdl_gl_context);
|
||||
static void ImGui_ImplSDL2_ShutdownPlatformInterface();
|
||||
static void ImGui_ImplSDL2_InitMultiViewportSupport(SDL_Window* window, void* sdl_gl_context);
|
||||
static void ImGui_ImplSDL2_ShutdownMultiViewportSupport();
|
||||
|
||||
// Functions
|
||||
static const char* ImGui_ImplSDL2_GetClipboardText(ImGuiContext*)
|
||||
|
|
@ -598,9 +598,9 @@ static bool ImGui_ImplSDL2_Init(SDL_Window* window, SDL_Renderer* renderer, void
|
|||
#endif
|
||||
|
||||
// We need SDL_CaptureMouse(), SDL_GetGlobalMouseState() from SDL 2.0.4+ to support multiple viewports.
|
||||
// We left the call to ImGui_ImplSDL2_InitPlatformInterface() outside of #ifdef to avoid unused-function warnings.
|
||||
if ((io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) && (io.BackendFlags & ImGuiBackendFlags_PlatformHasViewports))
|
||||
ImGui_ImplSDL2_InitPlatformInterface(window, sdl_gl_context);
|
||||
// We left the call to ImGui_ImplSDL2_InitMultiViewportSupport() outside of #ifdef to avoid unused-function warnings.
|
||||
if (io.BackendFlags & ImGuiBackendFlags_PlatformHasViewports)
|
||||
ImGui_ImplSDL2_InitMultiViewportSupport(window, sdl_gl_context);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -653,7 +653,7 @@ void ImGui_ImplSDL2_Shutdown()
|
|||
IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?");
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
ImGui_ImplSDL2_ShutdownPlatformInterface();
|
||||
ImGui_ImplSDL2_ShutdownMultiViewportSupport();
|
||||
|
||||
if (bd->ClipboardTextData)
|
||||
SDL_free(bd->ClipboardTextData);
|
||||
|
|
@ -686,7 +686,7 @@ static void ImGui_ImplSDL2_UpdateMouseData()
|
|||
|
||||
if (is_app_focused)
|
||||
{
|
||||
// (Optional) Set OS mouse position from Dear ImGui if requested (rarely used, only when ImGuiConfigFlags_NavEnableSetMousePos is enabled by user)
|
||||
// (Optional) Set OS mouse position from Dear ImGui if requested (rarely used, only when io.ConfigNavMoveSetMousePos is enabled by user)
|
||||
if (io.WantSetMousePos)
|
||||
{
|
||||
#if SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE
|
||||
|
|
@ -1177,7 +1177,7 @@ static int ImGui_ImplSDL2_CreateVkSurface(ImGuiViewport* viewport, ImU64 vk_inst
|
|||
}
|
||||
#endif // SDL_HAS_VULKAN
|
||||
|
||||
static void ImGui_ImplSDL2_InitPlatformInterface(SDL_Window* window, void* sdl_gl_context)
|
||||
static void ImGui_ImplSDL2_InitMultiViewportSupport(SDL_Window* window, void* sdl_gl_context)
|
||||
{
|
||||
// Register platform interface (will be coupled with a renderer interface)
|
||||
ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO();
|
||||
|
|
@ -1213,7 +1213,7 @@ static void ImGui_ImplSDL2_InitPlatformInterface(SDL_Window* window, void* sdl_g
|
|||
main_viewport->PlatformHandle = (void*)(intptr_t)vd->WindowID;
|
||||
}
|
||||
|
||||
static void ImGui_ImplSDL2_ShutdownPlatformInterface()
|
||||
static void ImGui_ImplSDL2_ShutdownMultiViewportSupport()
|
||||
{
|
||||
ImGui::DestroyPlatformWindows();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue