mirror of
https://github.com/ocornut/imgui.git
synced 2025-09-24 20:28:30 +00:00
Backends: SDL: Fixed building backend under non-OSX Apple targets (e.g. iPhone). (#5665)
This commit is contained in:
@@ -408,13 +408,14 @@ static bool ImGui_ImplSDL2_Init(SDL_Window* window, SDL_Renderer* renderer, void
|
|||||||
// Our mouse update function expect PlatformHandle to be filled for the main viewport
|
// Our mouse update function expect PlatformHandle to be filled for the main viewport
|
||||||
ImGuiViewport* main_viewport = ImGui::GetMainViewport();
|
ImGuiViewport* main_viewport = ImGui::GetMainViewport();
|
||||||
main_viewport->PlatformHandle = (void*)window;
|
main_viewport->PlatformHandle = (void*)window;
|
||||||
|
main_viewport->PlatformHandleRaw = NULL;
|
||||||
SDL_SysWMinfo info;
|
SDL_SysWMinfo info;
|
||||||
SDL_VERSION(&info.version);
|
SDL_VERSION(&info.version);
|
||||||
if (SDL_GetWindowWMInfo(window, &info))
|
if (SDL_GetWindowWMInfo(window, &info))
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
main_viewport->PlatformHandleRaw = (void*)info.info.win.window;
|
main_viewport->PlatformHandleRaw = (void*)info.info.win.window;
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_COCOA)
|
||||||
main_viewport->PlatformHandleRaw = (void*)info.info.cocoa.window;
|
main_viewport->PlatformHandleRaw = (void*)info.info.cocoa.window;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -754,13 +755,14 @@ static void ImGui_ImplSDL2_CreateWindow(ImGuiViewport* viewport)
|
|||||||
SDL_GL_MakeCurrent(vd->Window, backup_context);
|
SDL_GL_MakeCurrent(vd->Window, backup_context);
|
||||||
|
|
||||||
viewport->PlatformHandle = (void*)vd->Window;
|
viewport->PlatformHandle = (void*)vd->Window;
|
||||||
|
viewport->PlatformHandleRaw = NULL;
|
||||||
SDL_SysWMinfo info;
|
SDL_SysWMinfo info;
|
||||||
SDL_VERSION(&info.version);
|
SDL_VERSION(&info.version);
|
||||||
if (SDL_GetWindowWMInfo(vd->Window, &info))
|
if (SDL_GetWindowWMInfo(vd->Window, &info))
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
viewport->PlatformHandleRaw = info.info.win.window;
|
viewport->PlatformHandleRaw = info.info.win.window;
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_COCOA)
|
||||||
viewport->PlatformHandleRaw = (void*)info.info.cocoa.window;
|
viewport->PlatformHandleRaw = (void*)info.info.cocoa.window;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -192,6 +192,7 @@ Docking+Viewports Branch:
|
|||||||
- Docking: Fixed amending into an existing tab bar from rendering invisible items. (#5515)
|
- Docking: Fixed amending into an existing tab bar from rendering invisible items. (#5515)
|
||||||
- Docking+Viewports: Fixed undocking window node causing parent viewports to become unresponsive
|
- Docking+Viewports: Fixed undocking window node causing parent viewports to become unresponsive
|
||||||
in certain situation (e.g. hidden tab bar). (#5503) [@rokups]
|
in certain situation (e.g. hidden tab bar). (#5503) [@rokups]
|
||||||
|
- Backends: SDL: Fixed building backend under non-OSX Apple targets (e.g. iPhone). (#5665)
|
||||||
- Backends: GLFW: Fixed leftover static variable preventing from changing or
|
- Backends: GLFW: Fixed leftover static variable preventing from changing or
|
||||||
reinitializing backend while application is running. (#4616, #5434) [@rtoumazet]
|
reinitializing backend while application is running. (#4616, #5434) [@rtoumazet]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user