From 6ae9f8e083a1c63786683f5b03492b610c584903 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 8 Jun 2023 01:00:47 -0500 Subject: [PATCH] fix build --- CMakeLists.txt | 4 ++-- extern/igfd/ImGuiFileDialog.cpp | 7 ++++--- src/gui/gui.cpp | 1 - src/gui/gui.h | 2 +- src/gui/plot_nolerp.cpp | 4 ++-- src/gui/render/renderSDL.cpp | 16 ++++++++-------- src/gui/settings.cpp | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e99a8dde..253946a81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -602,7 +602,7 @@ extern/imgui_patched/imgui.cpp extern/imgui_patched/imgui_draw.cpp extern/imgui_patched/imgui_tables.cpp extern/imgui_patched/imgui_widgets.cpp -extern/imgui_patched/backends/imgui_impl_sdl.cpp +extern/imgui_patched/backends/imgui_impl_sdl2.cpp extern/imgui_patched/misc/cpp/imgui_stdlib.cpp extern/igfd/ImGuiFileDialog.cpp @@ -701,7 +701,7 @@ endif() if (WITH_RENDER_SDL) list(APPEND GUI_SOURCES src/gui/render/renderSDL.cpp) - list(APPEND GUI_SOURCES extern/imgui_patched/backends/imgui_impl_sdlrenderer.cpp) + list(APPEND GUI_SOURCES extern/imgui_patched/backends/imgui_impl_sdlrenderer2.cpp) list(APPEND DEPENDENCIES_DEFINES HAVE_RENDER_SDL) message(STATUS "UI render backend: SDL_Renderer") endif() diff --git a/extern/igfd/ImGuiFileDialog.cpp b/extern/igfd/ImGuiFileDialog.cpp index 372287d0f..c590cfdd4 100644 --- a/extern/igfd/ImGuiFileDialog.cpp +++ b/extern/igfd/ImGuiFileDialog.cpp @@ -25,6 +25,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#ifndef IMGUI_DEFINE_MATH_OPERATORS + #define IMGUI_DEFINE_MATH_OPERATORS +#endif // IMGUI_DEFINE_MATH_OPERATORS + #include "ImGuiFileDialog.h" #include "../../src/ta-log.h" @@ -71,9 +75,6 @@ SOFTWARE. #endif // defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) #include "imgui.h" -#ifndef IMGUI_DEFINE_MATH_OPERATORS - #define IMGUI_DEFINE_MATH_OPERATORS -#endif // IMGUI_DEFINE_MATH_OPERATORS #include "imgui_internal.h" #include diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 4ea2eccf2..4e2758b95 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -29,7 +29,6 @@ #include "../fileutils.h" #include "imgui.h" #include "imgui_internal.h" -#include "imgui_impl_sdl.h" #include "ImGuiFileDialog.h" #include "IconsFontAwesome4.h" #include "misc/cpp/imgui_stdlib.h" diff --git a/src/gui/gui.h b/src/gui/gui.h index 6fed038a3..e714d6452 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -23,7 +23,7 @@ #include "../engine/engine.h" #include "../engine/waveSynth.h" #include "imgui.h" -#include "imgui_impl_sdl.h" +#include "imgui_impl_sdl2.h" #include #include #include diff --git a/src/gui/plot_nolerp.cpp b/src/gui/plot_nolerp.cpp index 2fd7994bc..e6c3989ef 100644 --- a/src/gui/plot_nolerp.cpp +++ b/src/gui/plot_nolerp.cpp @@ -19,11 +19,11 @@ // portions based on imgui_widgets.cpp -#include "plot_nolerp.h" -#include "imgui.h" #ifndef IMGUI_DEFINE_MATH_OPERATORS #define IMGUI_DEFINE_MATH_OPERATORS #endif +#include "plot_nolerp.h" +#include "imgui.h" #include "imgui_internal.h" struct FurnacePlotArrayGetterData diff --git a/src/gui/render/renderSDL.cpp b/src/gui/render/renderSDL.cpp index 0eb6271ae..a58f1673d 100644 --- a/src/gui/render/renderSDL.cpp +++ b/src/gui/render/renderSDL.cpp @@ -18,7 +18,7 @@ */ #include "renderSDL.h" -#include "backends/imgui_impl_sdlrenderer.h" +#include "backends/imgui_impl_sdlrenderer2.h" ImTextureID FurnaceGUIRenderSDL::getTextureID(void* which) { return which; @@ -86,19 +86,19 @@ void FurnaceGUIRenderSDL::clear(ImVec4 color) { } bool FurnaceGUIRenderSDL::newFrame() { - return ImGui_ImplSDLRenderer_NewFrame(); + return ImGui_ImplSDLRenderer2_NewFrame(); } void FurnaceGUIRenderSDL::createFontsTexture() { - ImGui_ImplSDLRenderer_CreateFontsTexture(); + ImGui_ImplSDLRenderer2_CreateFontsTexture(); } void FurnaceGUIRenderSDL::destroyFontsTexture() { - ImGui_ImplSDLRenderer_DestroyFontsTexture(); + ImGui_ImplSDLRenderer2_DestroyFontsTexture(); } void FurnaceGUIRenderSDL::renderGUI() { - ImGui_ImplSDLRenderer_RenderDrawData(ImGui::GetDrawData()); + ImGui_ImplSDLRenderer2_RenderDrawData(ImGui::GetDrawData()); } void FurnaceGUIRenderSDL::wipe(float alpha) { @@ -132,11 +132,11 @@ void FurnaceGUIRenderSDL::initGUI(SDL_Window* win) { ImGui::CreateContext(); ImGui_ImplSDL2_InitForSDLRenderer(win,sdlRend); - ImGui_ImplSDLRenderer_Init(sdlRend); + ImGui_ImplSDLRenderer2_Init(sdlRend); } void FurnaceGUIRenderSDL::quitGUI() { - ImGui_ImplSDLRenderer_Shutdown(); + ImGui_ImplSDLRenderer2_Shutdown(); } bool FurnaceGUIRenderSDL::quit() { @@ -144,4 +144,4 @@ bool FurnaceGUIRenderSDL::quit() { SDL_DestroyRenderer(sdlRend); sdlRend=NULL; return true; -} \ No newline at end of file +} diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index e66926b19..9f6459d1c 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -3827,7 +3827,7 @@ void FurnaceGUI::applyUISettings(bool updateFonts) { } mainFont->FallbackChar='?'; - mainFont->DotChar='.'; + mainFont->EllipsisChar='.'; } // TODO: allow changing these colors.