diff --git a/src/gui/gui.cc b/src/gui/gui.cc index 2123099a1..571ad71bc 100644 --- a/src/gui/gui.cc +++ b/src/gui/gui.cc @@ -1052,7 +1052,7 @@ void PCSX::GUI::endFrame() { m_outputShaderEditor.configure(this); if (m_fullWindowRender) { - ImTextureID texture = reinterpret_cast(m_offscreenTextures[m_currentTexture]); + ImTextureID texture = m_offscreenTextures[m_currentTexture]; const auto basePos = ImGui::GetMainViewport()->Pos; const auto displayFramebufferScale = ImGui::GetIO().DisplayFramebufferScale; const auto logicalRenderSize = @@ -1086,7 +1086,7 @@ void PCSX::GUI::endFrame() { m_setupScreenSize = true; } ImGuiHelpers::normalizeDimensions(textureSize, renderRatio); - ImTextureID texture = reinterpret_cast(m_offscreenTextures[m_currentTexture]); + ImTextureID texture = m_offscreenTextures[m_currentTexture]; if (g_system->getArgs().isShadersDisabled()) { ImGui::Image(texture, textureSize, ImVec2(0, 0), ImVec2(1, 1)); } else { diff --git a/src/gui/widgets/memcard_manager.cc b/src/gui/widgets/memcard_manager.cc index 9db4264a3..1cac21a9c 100644 --- a/src/gui/widgets/memcard_manager.cc +++ b/src/gui/widgets/memcard_manager.cc @@ -352,7 +352,7 @@ void PCSX::Widgets::MemcardManager::drawIcon(const PCSX::SIO::McdBlock& block) { glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 32, 32, GL_RGBA, GL_UNSIGNED_BYTE, pixels); } - ImGui::Image(reinterpret_cast(texture), ImVec2(m_iconSize, m_iconSize)); + ImGui::Image(texture, ImVec2(m_iconSize, m_iconSize)); } // Extract the pocketstation icon from the block indicated by blockNumber into the pixels array (In RGBA8888) diff --git a/src/gui/widgets/shader-editor.cc b/src/gui/widgets/shader-editor.cc index 349822711..9ef9e2fe1 100644 --- a/src/gui/widgets/shader-editor.cc +++ b/src/gui/widgets/shader-editor.cc @@ -711,7 +711,7 @@ void PCSX::Widgets::ShaderEditor::renderWithImgui(GUI *gui, ImTextureID textureI if (L.isfunction()) { L.copy(-2); L.setfenv(); - L.push(static_cast(reinterpret_cast(textureID))); + L.push(static_cast(textureID)); L.push(srcSize.x); L.push(srcSize.y); L.push(dstSize.x); @@ -752,7 +752,7 @@ void PCSX::Widgets::ShaderEditor::renderWithImgui(GUI *gui, ImTextureID textureI } void PCSX::Widgets::ShaderEditor::imguiCB(const ImDrawList *parentList, const ImDrawCmd *cmd) { - GLuint textureID = static_cast(reinterpret_cast(cmd->TextureId)); + GLuint textureID = static_cast(cmd->TextureId); GLfloat projMtx[4][4]; if (m_imguiProjMtxLoc == -1) { diff --git a/src/gui/widgets/vram-viewer.cc b/src/gui/widgets/vram-viewer.cc index f14503a57..e3611f14d 100644 --- a/src/gui/widgets/vram-viewer.cc +++ b/src/gui/widgets/vram-viewer.cc @@ -422,7 +422,7 @@ void PCSX::Widgets::VRAMViewer::drawVRAM(GUI *gui, GLuint textureID) { ImVec2 texTL = ImVec2(0.0f, 0.0f) - m_cornerTL / dimensions; ImVec2 texBR = ImVec2(1.0f, 1.0f) - (m_cornerBR - m_resolution) / dimensions; ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f)); - ImGui::ImageButton("vram", reinterpret_cast(textureID), m_resolution, texTL, texBR); + ImGui::ImageButton("vram", textureID, m_resolution, texTL, texBR); ImGui::PopStyleVar(); if (m_clutDestination && m_selectingClut) { m_clutDestination->m_clut = m_mouseUV; diff --git a/third_party/ImFileDialog/ImFileDialog.cpp b/third_party/ImFileDialog/ImFileDialog.cpp index e6143bfa1..5d0255969 100644 --- a/third_party/ImFileDialog/ImFileDialog.cpp +++ b/third_party/ImFileDialog/ImFileDialog.cpp @@ -1187,7 +1187,7 @@ namespace ifd { bool isSelected = std::count(m_selections.begin(), m_selections.end(), entry.Path); - if (FileIcon(filename.c_str(), isSelected, entry.HasIconPreview ? entry.IconPreview : (ImTextureID)m_getIcon(entry.Path), ImVec2(32 + 16 * m_zoom, 32 + 16 * m_zoom), entry.HasIconPreview, entry.IconPreviewWidth, entry.IconPreviewHeight)) { + if (FileIcon(filename.c_str(), isSelected, entry.HasIconPreview ? (ImTextureID)entry.IconPreview : (ImTextureID)m_getIcon(entry.Path), ImVec2(32 + 16 * m_zoom, 32 + 16 * m_zoom), entry.HasIconPreview, entry.IconPreviewWidth, entry.IconPreviewHeight)) { std::error_code ec; bool isDir = std::filesystem::is_directory(entry.Path, ec); diff --git a/third_party/imgui b/third_party/imgui index f63c95a07..368123ab0 160000 --- a/third_party/imgui +++ b/third_party/imgui @@ -1 +1 @@ -Subproject commit f63c95a076a401721ceaf21f30d4f12e8c40cb2c +Subproject commit 368123ab06b2b573d585e52f84cd782c5c006697