From 5351a6a64a25d64bc61d09983b89144fde238b85 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 15 Apr 2024 21:58:13 +1000 Subject: [PATCH] FullscreenUI: Fix images in DX11/GL --- pcsx2/ImGui/FullscreenUI.cpp | 4 ++-- pcsx2/ImGui/ImGuiFullscreen.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pcsx2/ImGui/FullscreenUI.cpp b/pcsx2/ImGui/FullscreenUI.cpp index 4e0b9d5254..bb93ef494b 100644 --- a/pcsx2/ImGui/FullscreenUI.cpp +++ b/pcsx2/ImGui/FullscreenUI.cpp @@ -1166,7 +1166,7 @@ void FullscreenUI::DrawLandingTemplate(ImVec2* menu_pos, ImVec2* menu_size) { const ImVec2 logo_pos = LayoutScale(LAYOUT_MENU_BUTTON_X_PADDING, LAYOUT_MENU_BUTTON_Y_PADDING); const ImVec2 logo_size = LayoutScale(LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY, LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY); - dl->AddImage(GetCachedTexture("icons/AppIconLarge.png"), logo_pos, logo_pos + logo_size); + dl->AddImage(GetCachedTexture("icons/AppIconLarge.png")->GetNativeHandle(), logo_pos, logo_pos + logo_size); dl->AddText(heading_font, heading_font->FontSize, ImVec2(logo_pos.x + logo_size.x + LayoutScale(LAYOUT_MENU_BUTTON_X_PADDING), logo_pos.y), ImGui::GetColorU32(ImGuiCol_Text), "PCSX2"); @@ -1204,7 +1204,7 @@ void FullscreenUI::DrawLandingTemplate(ImVec2* menu_pos, ImVec2* menu_size) const ImVec2 badge_pos = ImVec2(name_pos.x - badge_size.x - LayoutScale(LAYOUT_MENU_BUTTON_X_PADDING), time_pos.y); - dl->AddImage(reinterpret_cast(GetCachedTextureAsync(badge_path)), badge_pos, + dl->AddImage(GetCachedTextureAsync(badge_path)->GetNativeHandle(), badge_pos, badge_pos + badge_size); } } diff --git a/pcsx2/ImGui/ImGuiFullscreen.cpp b/pcsx2/ImGui/ImGuiFullscreen.cpp index 3cd0a35708..2adbe9bcd1 100644 --- a/pcsx2/ImGui/ImGuiFullscreen.cpp +++ b/pcsx2/ImGui/ImGuiFullscreen.cpp @@ -1934,7 +1934,7 @@ bool ImGuiFullscreen::HorizontalMenuItem(GSTexture* icon, const char* title, con const ImVec2 icon_pos = bb.Min + ImVec2((avail_width - icon_size) * 0.5f, 0.0f); ImDrawList* dl = ImGui::GetWindowDrawList(); - dl->AddImage(reinterpret_cast(icon), icon_pos, icon_pos + ImVec2(icon_size, icon_size)); + dl->AddImage(icon->GetNativeHandle(), icon_pos, icon_pos + ImVec2(icon_size, icon_size)); ImFont* title_font = g_large_font; const ImVec2 title_size = title_font->CalcTextSizeA(title_font->FontSize, avail_width, 0.0f, title);