Skip to content

Commit ef2aef9

Browse files
authored
Merge pull request #1803 from nicolasnoble/update-imgui
Updating imgui to fix compilation issue.
2 parents 7ef9141 + 7c03637 commit ef2aef9

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/gui/gui.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ void PCSX::GUI::endFrame() {
10521052
m_outputShaderEditor.configure(this);
10531053

10541054
if (m_fullWindowRender) {
1055-
ImTextureID texture = reinterpret_cast<ImTextureID*>(m_offscreenTextures[m_currentTexture]);
1055+
ImTextureID texture = m_offscreenTextures[m_currentTexture];
10561056
const auto basePos = ImGui::GetMainViewport()->Pos;
10571057
const auto displayFramebufferScale = ImGui::GetIO().DisplayFramebufferScale;
10581058
const auto logicalRenderSize =
@@ -1086,7 +1086,7 @@ void PCSX::GUI::endFrame() {
10861086
m_setupScreenSize = true;
10871087
}
10881088
ImGuiHelpers::normalizeDimensions(textureSize, renderRatio);
1089-
ImTextureID texture = reinterpret_cast<ImTextureID*>(m_offscreenTextures[m_currentTexture]);
1089+
ImTextureID texture = m_offscreenTextures[m_currentTexture];
10901090
if (g_system->getArgs().isShadersDisabled()) {
10911091
ImGui::Image(texture, textureSize, ImVec2(0, 0), ImVec2(1, 1));
10921092
} else {

src/gui/widgets/memcard_manager.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ void PCSX::Widgets::MemcardManager::drawIcon(const PCSX::SIO::McdBlock& block) {
352352
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 32, 32, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
353353
}
354354

355-
ImGui::Image(reinterpret_cast<ImTextureID*>(texture), ImVec2(m_iconSize, m_iconSize));
355+
ImGui::Image(texture, ImVec2(m_iconSize, m_iconSize));
356356
}
357357

358358
// Extract the pocketstation icon from the block indicated by blockNumber into the pixels array (In RGBA8888)

src/gui/widgets/shader-editor.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ void PCSX::Widgets::ShaderEditor::renderWithImgui(GUI *gui, ImTextureID textureI
711711
if (L.isfunction()) {
712712
L.copy(-2);
713713
L.setfenv();
714-
L.push(static_cast<lua_Number>(reinterpret_cast<uintptr_t>(textureID)));
714+
L.push(static_cast<lua_Number>(textureID));
715715
L.push(srcSize.x);
716716
L.push(srcSize.y);
717717
L.push(dstSize.x);
@@ -752,7 +752,7 @@ void PCSX::Widgets::ShaderEditor::renderWithImgui(GUI *gui, ImTextureID textureI
752752
}
753753

754754
void PCSX::Widgets::ShaderEditor::imguiCB(const ImDrawList *parentList, const ImDrawCmd *cmd) {
755-
GLuint textureID = static_cast<GLuint>(reinterpret_cast<uintptr_t>(cmd->TextureId));
755+
GLuint textureID = static_cast<GLuint>(cmd->TextureId);
756756

757757
GLfloat projMtx[4][4];
758758
if (m_imguiProjMtxLoc == -1) {

src/gui/widgets/vram-viewer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ void PCSX::Widgets::VRAMViewer::drawVRAM(GUI *gui, GLuint textureID) {
422422
ImVec2 texTL = ImVec2(0.0f, 0.0f) - m_cornerTL / dimensions;
423423
ImVec2 texBR = ImVec2(1.0f, 1.0f) - (m_cornerBR - m_resolution) / dimensions;
424424
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
425-
ImGui::ImageButton("vram", reinterpret_cast<ImTextureID *>(textureID), m_resolution, texTL, texBR);
425+
ImGui::ImageButton("vram", textureID, m_resolution, texTL, texBR);
426426
ImGui::PopStyleVar();
427427
if (m_clutDestination && m_selectingClut) {
428428
m_clutDestination->m_clut = m_mouseUV;

third_party/ImFileDialog/ImFileDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ namespace ifd {
11871187

11881188
bool isSelected = std::count(m_selections.begin(), m_selections.end(), entry.Path);
11891189

1190-
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)) {
1190+
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)) {
11911191
std::error_code ec;
11921192
bool isDir = std::filesystem::is_directory(entry.Path, ec);
11931193

third_party/imgui

Submodule imgui updated 76 files

0 commit comments

Comments
 (0)