Viewport: SDL: Inherit SDL_WINDOW_ALLOW_HIGHDPI flag from main viewport. (#2306)

This commit is contained in:
omar 2019-02-11 19:00:33 +01:00
parent 2cada3c143
commit 7f6a025c93

View File

@ -382,9 +382,9 @@ static void ImGui_ImplSDL2_CreateWindow(ImGuiViewport* viewport)
SDL_GL_MakeCurrent(main_viewport_data->Window, main_viewport_data->GLContext);
}
// We don't enable SDL_WINDOW_RESIZABLE because it enforce windows decorations
Uint32 sdl_flags = 0;
sdl_flags |= use_opengl ? SDL_WINDOW_OPENGL : SDL_WINDOW_VULKAN;
sdl_flags |= SDL_GetWindowFlags(g_Window) & SDL_WINDOW_ALLOW_HIGHDPI;
sdl_flags |= SDL_WINDOW_HIDDEN;
sdl_flags |= (viewport->Flags & ImGuiViewportFlags_NoDecoration) ? SDL_WINDOW_BORDERLESS : 0;
sdl_flags |= (viewport->Flags & ImGuiViewportFlags_NoDecoration) ? 0 : SDL_WINDOW_RESIZABLE;