mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Merge pull request #13291 from iwubcode/imgui_1_91_7
Externals / VideoCommon: update imgui to 1.91.7 and implot to v0.16
This commit is contained in:
@ -5,12 +5,17 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/Image.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "VideoCommon/AbstractGfx.h"
|
||||
#include "VideoCommon/AbstractStagingTexture.h"
|
||||
|
||||
static_assert(std::is_same_v<AbstractTexture::imgui_texture_id, ImTextureID>,
|
||||
"The typedef should match ImTextureID in imgui");
|
||||
|
||||
AbstractTexture::AbstractTexture(const TextureConfig& c) : m_config(c)
|
||||
{
|
||||
}
|
||||
|
@ -16,6 +16,10 @@ public:
|
||||
explicit AbstractTexture(const TextureConfig& c);
|
||||
virtual ~AbstractTexture() = default;
|
||||
|
||||
// Support implicit conversion between AbstractTexture and ImTextureId
|
||||
using imgui_texture_id = unsigned long long;
|
||||
operator imgui_texture_id() const { return reinterpret_cast<imgui_texture_id>(this); }
|
||||
|
||||
virtual void CopyRectangleFromTexture(const AbstractTexture* src,
|
||||
const MathUtil::Rectangle<int>& src_rect, u32 src_layer,
|
||||
u32 src_level, const MathUtil::Rectangle<int>& dst_rect,
|
||||
|
@ -109,8 +109,8 @@ static float DrawMessage(int index, Message& msg, const ImVec2& position, int ti
|
||||
|
||||
if (msg.texture)
|
||||
{
|
||||
ImGui::Image(msg.texture.get(), ImVec2(static_cast<float>(msg.icon->width),
|
||||
static_cast<float>(msg.icon->height)));
|
||||
ImGui::Image(*msg.texture.get(), ImVec2(static_cast<float>(msg.icon->width),
|
||||
static_cast<float>(msg.icon->height)));
|
||||
ImGui::SameLine();
|
||||
}
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ bool OnScreenUI::Initialize(u32 width, u32 height, float scale)
|
||||
font_tex->Load(0, font_tex_width, font_tex_height, font_tex_width, font_tex_pixels,
|
||||
sizeof(u32) * font_tex_width * font_tex_height);
|
||||
|
||||
io.Fonts->TexID = font_tex.get();
|
||||
io.Fonts->TexID = *font_tex.get();
|
||||
|
||||
m_imgui_textures.push_back(std::move(font_tex));
|
||||
}
|
||||
@ -371,8 +371,8 @@ void OnScreenUI::DrawChallengesAndLeaderboards()
|
||||
{
|
||||
for (auto& [name, texture] : m_challenge_texture_map)
|
||||
{
|
||||
ImGui::Image(texture.get(), ImVec2(static_cast<float>(texture->GetWidth()) * scale,
|
||||
static_cast<float>(texture->GetHeight()) * scale));
|
||||
ImGui::Image(*texture.get(), ImVec2(static_cast<float>(texture->GetWidth()) * scale,
|
||||
static_cast<float>(texture->GetHeight()) * scale));
|
||||
ImGui::SameLine();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user