Control: tags 1041076 + patch Control: tags 1041076 + pending Dear maintainer,
I've prepared an NMU for dolphin-emu (versioned as 5.0-19368+dfsg-2.1) and uploaded it to DELAYED/2. Please feel free to tell me if I should delay it longer. Cheers -- Sebastian Ramacher
diff -Nru dolphin-emu-5.0-19368+dfsg/debian/changelog dolphin-emu-5.0-19368+dfsg/debian/changelog --- dolphin-emu-5.0-19368+dfsg/debian/changelog 2023-06-15 11:40:41.000000000 +0200 +++ dolphin-emu-5.0-19368+dfsg/debian/changelog 2023-08-01 22:59:04.000000000 +0200 @@ -1,3 +1,11 @@ +dolphin-emu (5.0-19368+dfsg-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * debian/patches: Apply upstream patch to fix FTBFS with imgui 1.89.6 + (Closes: #1041076) + + -- Sebastian Ramacher <sramac...@debian.org> Tue, 01 Aug 2023 22:59:04 +0200 + dolphin-emu (5.0-19368+dfsg-2) unstable; urgency=medium * Update DOLPHIN_WC_DESCRIBE and DOLPHIN_WC_REVISION. *facepalm* diff -Nru dolphin-emu-5.0-19368+dfsg/debian/patches/imgui_1.89.6.diff dolphin-emu-5.0-19368+dfsg/debian/patches/imgui_1.89.6.diff --- dolphin-emu-5.0-19368+dfsg/debian/patches/imgui_1.89.6.diff 1970-01-01 01:00:00.000000000 +0100 +++ dolphin-emu-5.0-19368+dfsg/debian/patches/imgui_1.89.6.diff 2023-08-01 22:58:32.000000000 +0200 @@ -0,0 +1,98 @@ +--- a/Externals/implot/implot/implot.cpp ++++ b/Externals/implot/implot/implot.cpp +@@ -122,6 +122,7 @@ + + */ + ++#define IMGUI_DEFINE_MATH_OPERATORS + #include "implot.h" + #include "implot_internal.h" + +--- a/Externals/implot/implot/implot_internal.h ++++ b/Externals/implot/implot/implot_internal.h +@@ -31,10 +31,6 @@ + + #pragma once + +-#ifndef IMGUI_DEFINE_MATH_OPERATORS +-#define IMGUI_DEFINE_MATH_OPERATORS +-#endif +- + #include <time.h> + #include "imgui_internal.h" + +--- a/Externals/implot/implot/implot_items.cpp ++++ b/Externals/implot/implot/implot_items.cpp +@@ -22,6 +22,7 @@ + + // ImPlot v0.14 + ++#define IMGUI_DEFINE_MATH_OPERATORS + #include "implot.h" + #include "implot_internal.h" + +--- a/Source/Core/VideoCommon/OnScreenUI.cpp ++++ b/Source/Core/VideoCommon/OnScreenUI.cpp +@@ -349,35 +349,37 @@ + } + void OnScreenUI::SetKeyMap(const DolphinKeyMap& key_map) + { +- // Right now this is a 1:1 mapping. But might not be true later + static constexpr DolphinKeyMap dolphin_to_imgui_map = { + ImGuiKey_Tab, ImGuiKey_LeftArrow, ImGuiKey_RightArrow, ImGuiKey_UpArrow, + ImGuiKey_DownArrow, ImGuiKey_PageUp, ImGuiKey_PageDown, ImGuiKey_Home, + ImGuiKey_End, ImGuiKey_Insert, ImGuiKey_Delete, ImGuiKey_Backspace, +- ImGuiKey_Space, ImGuiKey_Enter, ImGuiKey_Escape, ImGuiKey_KeyPadEnter, ++ ImGuiKey_Space, ImGuiKey_Enter, ImGuiKey_Escape, ImGuiKey_KeypadEnter, + ImGuiKey_A, ImGuiKey_C, ImGuiKey_V, ImGuiKey_X, + ImGuiKey_Y, ImGuiKey_Z, + }; +- static_assert(dolphin_to_imgui_map.size() == ImGuiKey_COUNT); // Fail if ImGui adds keys + + auto lock = GetImGuiLock(); + + if (!ImGui::GetCurrentContext()) + return; + ++ m_dolphin_to_imgui_map.clear(); + for (int dolphin_key = 0; dolphin_key <= static_cast<int>(DolphinKey::Z); dolphin_key++) + { +- int imgui_key = dolphin_to_imgui_map[DolphinKey(dolphin_key)]; ++ const int imgui_key = dolphin_to_imgui_map[DolphinKey(dolphin_key)]; + if (imgui_key >= 0) +- ImGui::GetIO().KeyMap[imgui_key] = (key_map[DolphinKey(dolphin_key)] & 0x1FF); ++ { ++ const int mapped_key = key_map[DolphinKey(dolphin_key)]; ++ m_dolphin_to_imgui_map[mapped_key & 0x1FF] = imgui_key; ++ } + } + } + + void OnScreenUI::SetKey(u32 key, bool is_down, const char* chars) + { + auto lock = GetImGuiLock(); +- if (key < std::size(ImGui::GetIO().KeysDown)) +- ImGui::GetIO().KeysDown[key] = is_down; ++ if (auto iter = m_dolphin_to_imgui_map.find(key); iter != m_dolphin_to_imgui_map.end()) ++ ImGui::GetIO().AddKeyEvent((ImGuiKey)iter->second, is_down); + + if (chars) + ImGui::GetIO().AddInputCharactersUTF8(chars); +--- a/Source/Core/VideoCommon/OnScreenUI.h ++++ b/Source/Core/VideoCommon/OnScreenUI.h +@@ -3,6 +3,7 @@ + + #pragma once + ++#include <map> + #include <memory> + #include <mutex> + #include <span> +@@ -65,6 +66,7 @@ + std::unique_ptr<NativeVertexFormat> m_imgui_vertex_format; + std::vector<std::unique_ptr<AbstractTexture>> m_imgui_textures; + std::unique_ptr<AbstractPipeline> m_imgui_pipeline; ++ std::map<u32, int> m_dolphin_to_imgui_map; + std::mutex m_imgui_mutex; + u64 m_imgui_last_frame_time = 0; + diff -Nru dolphin-emu-5.0-19368+dfsg/debian/patches/series dolphin-emu-5.0-19368+dfsg/debian/patches/series --- dolphin-emu-5.0-19368+dfsg/debian/patches/series 2023-06-14 14:26:33.000000000 +0200 +++ dolphin-emu-5.0-19368+dfsg/debian/patches/series 2023-08-01 22:58:26.000000000 +0200 @@ -5,3 +5,4 @@ gtest.patch implot.patch mgba_videosize.patch +imgui_1.89.6.diff