Skip to content

Commit

Permalink
Merge pull request #1803 from nicolasnoble/update-imgui
Browse files Browse the repository at this point in the history
Updating imgui to fix compilation issue.
  • Loading branch information
nicolasnoble authored Nov 18, 2024
2 parents 7ef9141 + 7c03637 commit ef2aef9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/gui/gui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ void PCSX::GUI::endFrame() {
m_outputShaderEditor.configure(this);

if (m_fullWindowRender) {
ImTextureID texture = reinterpret_cast<ImTextureID*>(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 =
Expand Down Expand Up @@ -1086,7 +1086,7 @@ void PCSX::GUI::endFrame() {
m_setupScreenSize = true;
}
ImGuiHelpers::normalizeDimensions(textureSize, renderRatio);
ImTextureID texture = reinterpret_cast<ImTextureID*>(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 {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/widgets/memcard_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ImTextureID*>(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)
Expand Down
4 changes: 2 additions & 2 deletions src/gui/widgets/shader-editor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<lua_Number>(reinterpret_cast<uintptr_t>(textureID)));
L.push(static_cast<lua_Number>(textureID));
L.push(srcSize.x);
L.push(srcSize.y);
L.push(dstSize.x);
Expand Down Expand Up @@ -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<GLuint>(reinterpret_cast<uintptr_t>(cmd->TextureId));
GLuint textureID = static_cast<GLuint>(cmd->TextureId);

GLfloat projMtx[4][4];
if (m_imguiProjMtxLoc == -1) {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/widgets/vram-viewer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ImTextureID *>(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;
Expand Down
2 changes: 1 addition & 1 deletion third_party/ImFileDialog/ImFileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion third_party/imgui
Submodule imgui updated 76 files
+53 −4 .github/workflows/build.yml
+18 −16 backends/imgui_impl_allegro5.cpp
+1 −1 backends/imgui_impl_allegro5.h
+1 −1 backends/imgui_impl_android.cpp
+1 −1 backends/imgui_impl_android.h
+74 −73 backends/imgui_impl_dx10.cpp
+1 −1 backends/imgui_impl_dx10.h
+92 −81 backends/imgui_impl_dx11.cpp
+13 −1 backends/imgui_impl_dx11.h
+53 −48 backends/imgui_impl_dx12.cpp
+12 −6 backends/imgui_impl_dx12.h
+86 −78 backends/imgui_impl_dx9.cpp
+58 −14 backends/imgui_impl_glfw.cpp
+1 −1 backends/imgui_impl_glfw.h
+3 −2 backends/imgui_impl_glut.cpp
+3 −2 backends/imgui_impl_glut.h
+17 −18 backends/imgui_impl_metal.mm
+15 −13 backends/imgui_impl_opengl2.cpp
+23 −19 backends/imgui_impl_opengl3.cpp
+6 −0 backends/imgui_impl_opengl3_loader.h
+1 −1 backends/imgui_impl_osx.h
+12 −10 backends/imgui_impl_osx.mm
+27 −15 backends/imgui_impl_sdl2.cpp
+1 −1 backends/imgui_impl_sdl2.h
+59 −29 backends/imgui_impl_sdl3.cpp
+1 −2 backends/imgui_impl_sdl3.h
+19 −8 backends/imgui_impl_sdlrenderer2.cpp
+9 −0 backends/imgui_impl_sdlrenderer2.h
+21 −10 backends/imgui_impl_sdlrenderer3.cpp
+9 −0 backends/imgui_impl_sdlrenderer3.h
+41 −37 backends/imgui_impl_vulkan.cpp
+21 −13 backends/imgui_impl_vulkan.h
+76 −16 backends/imgui_impl_wgpu.cpp
+18 −1 backends/imgui_impl_wgpu.h
+143 −102 backends/imgui_impl_win32.cpp
+1 −1 backends/imgui_impl_win32.h
+1 −1 docs/BACKENDS.md
+820 −242 docs/CHANGELOG.txt
+28 −26 docs/FAQ.md
+4 −4 docs/README.md
+4 −7 docs/TODO.txt
+1 −1 examples/example_android_opengl3/main.cpp
+1 −1 examples/example_glfw_vulkan/CMakeLists.txt
+2 −2 examples/example_glfw_vulkan/build_win32.bat
+4 −3 examples/example_glfw_vulkan/build_win64.bat
+4 −4 examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj
+5 −1 examples/example_glfw_wgpu/CMakeLists.txt
+1 −1 examples/example_null/Makefile
+5 −1 examples/example_sdl2_vulkan/build_win32.bat
+14 −0 examples/example_sdl2_vulkan/build_win64.bat
+5 −5 examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj
+7 −1 examples/example_sdl3_opengl3/build_win32.bat
+14 −0 examples/example_sdl3_opengl3/build_win64.bat
+1 −1 examples/example_sdl3_opengl3/main.cpp
+1 −1 examples/example_sdl3_sdlrenderer3/main.cpp
+14 −0 examples/example_sdl3_vulkan/build_win32.bat
+14 −0 examples/example_sdl3_vulkan/build_win64.bat
+190 −0 examples/example_sdl3_vulkan/example_sdl3_vulkan.vcxproj
+64 −0 examples/example_sdl3_vulkan/example_sdl3_vulkan.vcxproj.filters
+607 −0 examples/example_sdl3_vulkan/main.cpp
+1 −2 examples/example_win32_directx12/build_win32.bat
+5 −5 examples/example_win32_directx12/example_win32_directx12.vcxproj
+0 −4 examples/example_win32_directx12/main.cpp
+10 −0 examples/imgui_examples.sln
+6 −4 imconfig.h
+926 −497 imgui.cpp
+152 −114 imgui.h
+86 −33 imgui_demo.cpp
+66 −32 imgui_draw.cpp
+194 −350 imgui_internal.h
+13 −10 imgui_tables.cpp
+486 −351 imgui_widgets.cpp
+63 −35 imstb_textedit.h
+22 −4 misc/freetype/README.md
+22 −7 misc/freetype/imgui_freetype.cpp
+7 −0 misc/freetype/imgui_freetype.h

0 comments on commit ef2aef9

Please sign in to comment.