Fixing Windows build and adding ImPlot.

This commit is contained in:
Nicolas Pixel Noble
2026-08-03 11:11:19 -07:00
parent 703ad59f6e
commit 56e0ffdf8a
14 changed files with 266 additions and 1 deletions
+3
View File
@@ -103,3 +103,6 @@
[submodule "third_party/xmake-psx"]
path = third_party/xmake-psx
url = https://codeberg.org/malucart/xmake-psx.git
[submodule "third_party/implot"]
path = third_party/implot
url = https://github.com/epezent/implot.git
+1
View File
@@ -37,6 +37,7 @@ find a link to the vendored version itself.
- [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) ([vendored](https://github.com/grumpycoders/pcsx-redux/tree/main/third_party/imgui_lua_bindings))
- [imgui_md](https://github.com/mekhontsev/imgui_md)
- [imgui_memory_editor](https://github.com/ocornut/imgui_memory_editor) ([vendored](https://github.com/grumpycoders/pcsx-redux/tree/main/third_party/imgui_memory_editor))
- [ImPlot](https://github.com/epezent/implot)
- [json](https://github.com/nlohmann/json) ([vendored](https://github.com/grumpycoders/pcsx-redux/blob/main/third_party/json.hpp))
- [libcester](https://github.com/exoticlibraries/libcester)
- [libuv](https://github.com/libuv/libuv)
+1
View File
@@ -132,6 +132,7 @@ SRCS += third_party/imgui/misc/freetype/imgui_freetype.cpp
SRCS += third_party/imgui_lua_bindings/imgui_lua_bindings.cpp
SRCS += third_party/imgui_md/imgui_md.cpp
SRCS += third_party/imgui_memory_editor/imgui_memory_editor.cpp
SRCS += $(wildcard third_party/implot/*.cpp)
SRCS_pkg_libllhttp += $(wildcard third_party/llhttp/*.c)
SRCS += $(wildcard third_party/lpeg/*.c)
SRCS += third_party/lua-protobuf/pb.c
+5
View File
@@ -76,6 +76,7 @@ extern "C" {
#include "imgui_impl_opengl3.h"
#include "imgui_internal.h"
#include "imgui_stdlib.h"
#include "implot/implot.h"
#include "json.hpp"
#include "lua/extra.h"
#include "lua/glffi.h"
@@ -628,6 +629,7 @@ void PCSX::GUI::init(std::function<void()> applyArguments) {
// Setup ImGui binding
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImPlot::CreateContext();
auto& io = ImGui::GetIO();
{
io.IniFilename = nullptr;
@@ -868,6 +870,7 @@ void PCSX::GUI::init(std::function<void()> applyArguments) {
void PCSX::GUI::close() {
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplGlfw_Shutdown();
ImPlot::DestroyContext();
ImGui::DestroyContext();
glfwDestroyWindow(m_window);
glfwTerminate();
@@ -1528,6 +1531,7 @@ in Configuration->Emulation, restart PCSX-Redux, then try again.)"));
ImGui::Separator();
if (ImGui::BeginMenu(_("Help"))) {
ImGui::MenuItem(_("Show ImGui Demo"), nullptr, &m_showDemo);
ImGui::MenuItem(_("Show ImPlot Demo"), nullptr, &m_showImPlotDemo);
ImGui::Separator();
ImGui::MenuItem(_("Show UvFile information"), nullptr, &m_showHandles);
ImGui::Separator();
@@ -1613,6 +1617,7 @@ in Configuration->Emulation, restart PCSX-Redux, then try again.)"));
}
if (m_showDemo) ImGui::ShowDemoWindow();
if (m_showImPlotDemo) ImPlot::ShowDemoWindow();
ImGui::SetNextWindowPos(ImVec2(10, 20), ImGuiCond_FirstUseEver);
ImGui::SetNextWindowSize(ImVec2(1024, 512), ImGuiCond_FirstUseEver);
+1
View File
@@ -336,6 +336,7 @@ class GUI final : public UI {
int &m_idleSwapInterval = {settings.get<IdleSwapInterval>().value};
bool m_showThemes = false;
bool m_showDemo = false;
bool m_showImPlotDemo = false;
bool m_showHandles = false;
bool m_showAbout = false;
bool m_showInterruptsScaler = false;
Vendored Submodule
+1
Submodule third_party/implot added at d65a2bef53
+10
View File
@@ -114,26 +114,36 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\src\spu\adpcm.cc" />
<ClCompile Include="..\..\src\spu\adsr.cc" />
<ClCompile Include="..\..\src\spu\cfg.cc" />
<ClCompile Include="..\..\src\spu\debug.cc" />
<ClCompile Include="..\..\src\spu\dma.cc" />
<ClCompile Include="..\..\src\spu\freeze.cc" />
<ClCompile Include="..\..\src\spu\interpolation.cc" />
<ClCompile Include="..\..\src\spu\miniaudio.cc" />
<ClCompile Include="..\..\src\spu\noise.cc" />
<ClCompile Include="..\..\src\spu\registers.cc" />
<ClCompile Include="..\..\src\spu\reverb.cc" />
<ClCompile Include="..\..\src\spu\spu.cc" />
<ClCompile Include="..\..\src\spu\volume.cc" />
<ClCompile Include="..\..\src\spu\xa.cc" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\spu\adpcm.h" />
<ClInclude Include="..\..\src\spu\adsr.h" />
<ClInclude Include="..\..\src\spu\gauss.h" />
<ClInclude Include="..\..\src\spu\interface.h" />
<ClInclude Include="..\..\src\spu\externals.h" />
<ClInclude Include="..\..\src\spu\interpolation.h" />
<ClInclude Include="..\..\src\spu\miniaudio.h" />
<ClInclude Include="..\..\src\spu\noise.h" />
<ClInclude Include="..\..\src\spu\registers.h" />
<ClInclude Include="..\..\src\spu\reverb.h" />
<ClInclude Include="..\..\src\spu\rounding-probe.h" />
<ClInclude Include="..\..\src\spu\settings.h" />
<ClInclude Include="..\..\src\spu\types.h" />
<ClInclude Include="..\..\src\spu\volume.h" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
+30
View File
@@ -45,6 +45,18 @@
<ClCompile Include="..\..\src\spu\miniaudio.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\spu\adpcm.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\spu\interpolation.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\spu\noise.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\spu\volume.cc">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\spu\adsr.h">
@@ -71,6 +83,24 @@
<ClInclude Include="..\..\src\spu\settings.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\spu\adpcm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\spu\interpolation.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\spu\noise.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\spu\reverb.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\spu\rounding-probe.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\spu\volume.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
+157
View File
@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseWithClangCL|x64">
<Configuration>ReleaseWithClangCL</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseWithTracy|x64">
<Configuration>ReleaseWithTracy</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>18.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{c068ed1f-1341-42b1-a429-5d5f377fd63d}</ProjectGuid>
<RootNamespace>implot</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithTracy|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithClangCL|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\common.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\common.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithTracy|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\common.props" />
<Import Project="..\tracy.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithClangCL|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\common.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Manifest>
<EnableSegmentHeap>true</EnableSegmentHeap>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Manifest>
<EnableSegmentHeap>true</EnableSegmentHeap>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithTracy|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Manifest>
<EnableSegmentHeap>true</EnableSegmentHeap>
</Manifest>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithClangCL|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Manifest>
<EnableSegmentHeap>true</EnableSegmentHeap>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\third_party\implot\implot.cpp" />
<ClCompile Include="..\..\third_party\implot\implot_demo.cpp" />
<ClCompile Include="..\..\third_party\implot\implot_items.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\third_party\implot\implot.h" />
<ClInclude Include="..\..\third_party\implot\implot_internal.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+36
View File
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\third_party\implot\implot.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\implot\implot_demo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\implot\implot_items.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\third_party\implot\implot.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\implot\implot_internal.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
+3
View File
@@ -240,6 +240,9 @@
<ProjectReference Include="..\imgui_md\imgui_md.vcxproj">
<Project>{9ba68b05-13a3-4d61-82a3-f6bc4f87c48e}</Project>
</ProjectReference>
<ProjectReference Include="..\implot\implot.vcxproj">
<Project>{c068ed1f-1341-42b1-a429-5d5f377fd63d}</Project>
</ProjectReference>
<ProjectReference Include="..\libcurl\libcurl.vcxproj">
<Project>{25c13988-a8a8-4bfa-962f-0833020e4ee4}</Project>
</ProjectReference>
+14 -1
View File
@@ -333,6 +333,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "midi2psm", "midi2psm\midi2p
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exe2exe", "exe2exe\exe2exe.vcxproj", "{6A476694-C1F8-4BA6-AA33-07D70FB197F4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "implot", "implot\implot.vcxproj", "{C068ED1F-1341-42B1-A429-5D5F377FD63D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@@ -782,6 +784,16 @@ Global
{6A476694-C1F8-4BA6-AA33-07D70FB197F4}.ReleaseWithClangCL|x64.Build.0 = ReleaseWithClangCL|x64
{6A476694-C1F8-4BA6-AA33-07D70FB197F4}.ReleaseWithTracy|x64.ActiveCfg = Release|x64
{6A476694-C1F8-4BA6-AA33-07D70FB197F4}.ReleaseWithTracy|x64.Build.0 = Release|x64
{C068ED1F-1341-42B1-A429-5D5F377FD63D}.Debug|x64.ActiveCfg = Debug|x64
{C068ED1F-1341-42B1-A429-5D5F377FD63D}.Debug|x64.Build.0 = Debug|x64
{C068ED1F-1341-42B1-A429-5D5F377FD63D}.Release|x64.ActiveCfg = Release|x64
{C068ED1F-1341-42B1-A429-5D5F377FD63D}.Release|x64.Build.0 = Release|x64
{C068ED1F-1341-42B1-A429-5D5F377FD63D}.ReleaseCLI|x64.ActiveCfg = ReleaseWithClangCL|x64
{C068ED1F-1341-42B1-A429-5D5F377FD63D}.ReleaseCLI|x64.Build.0 = ReleaseWithClangCL|x64
{C068ED1F-1341-42B1-A429-5D5F377FD63D}.ReleaseWithClangCL|x64.ActiveCfg = ReleaseWithClangCL|x64
{C068ED1F-1341-42B1-A429-5D5F377FD63D}.ReleaseWithClangCL|x64.Build.0 = ReleaseWithClangCL|x64
{C068ED1F-1341-42B1-A429-5D5F377FD63D}.ReleaseWithTracy|x64.ActiveCfg = Release|x64
{C068ED1F-1341-42B1-A429-5D5F377FD63D}.ReleaseWithTracy|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -839,9 +851,10 @@ Global
{FC0BCB98-8E1A-4304-BFF0-B22970853019} = {C6DD47BC-0C38-4AE6-B517-9675F3AC8A50}
{E1D23582-C66F-40D3-A163-B1B4470B3F15} = {C6DD47BC-0C38-4AE6-B517-9675F3AC8A50}
{6A476694-C1F8-4BA6-AA33-07D70FB197F4} = {C6DD47BC-0C38-4AE6-B517-9675F3AC8A50}
{C068ED1F-1341-42B1-A429-5D5F377FD63D} = {64A05F50-3203-42CC-B632-09D6EE6EA856}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {284E91C1-764E-441A-854D-CFD3623A6501}
SolutionGuid = {AC54A867-F976-4B3D-A6EF-F57EB764DCD4}
SolutionGuid = {284E91C1-764E-441A-854D-CFD3623A6501}
EndGlobalSection
EndGlobal
@@ -191,6 +191,9 @@
<ProjectReference Include="..\..\imgui_md\imgui_md.vcxproj">
<Project>{9ba68b05-13a3-4d61-82a3-f6bc4f87c48e}</Project>
</ProjectReference>
<ProjectReference Include="..\..\implot\implot.vcxproj">
<Project>{c068ed1f-1341-42b1-a429-5d5f377fd63d}</Project>
</ProjectReference>
<ProjectReference Include="..\..\libcurl\libcurl.vcxproj">
<Project>{25c13988-a8a8-4bfa-962f-0833020e4ee4}</Project>
</ProjectReference>
+1
View File
@@ -54,6 +54,7 @@ target("pcsx-redux", function()
"third_party/imgui_lua_bindings/imgui_lua_bindings.cpp",
"third_party/imgui_md/imgui_md.cpp",
"third_party/imgui_memory_editor/imgui_memory_editor.cpp",
"third_party/implot/*.cpp",
"third_party/llhttp/*.c",
"third_party/lpeg/*.c",
"third_party/lua-protobuf/pb.c",