diff --git a/.gitignore b/.gitignore index 1e81053850..ca9949082c 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,7 @@ CMakeCache.txt # cotire rpcs3/cotire/* rpcs3/rpcs3_*_cotire.cmake + +# Qt +moc_*.cpp +qrc_resources.cpp diff --git a/.gitmodules b/.gitmodules index 662e973d88..971072721d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,3 @@ -[submodule "wxWidgets"] - path = wxWidgets - url = https://github.com/wxWidgets/wxWidgets - ignore = dirty [submodule "rpcs3-ffmpeg"] path = 3rdparty/ffmpeg url = https://github.com/hrydgard/ppsspp-ffmpeg @@ -41,7 +37,10 @@ [submodule "rsx-debugger"] path = rsx-debugger url = https://github.com/RPCS3/rsx-debugger.git +[submodule "3rdparty/zlib"] + path = 3rdparty/zlib + url = https://github.com/madler/zlib [submodule "3rdparty/hidapi"] path = 3rdparty/hidapi url = https://github.com/RPCS3/hidapi - branch = master + branch = master \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 596affa381..b5d8ce2532 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,11 @@ before_install: export CXX="g++-5" CC="gcc-5" CXXFLAGS="-Wno-format-security"; export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'; fi; + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then + sudo add-apt-repository ppa:beineri/opt-qt59-trusty -y; + sudo apt-get update; + sudo apt-get install qt59base -y; + fi; # Add coverall for C++ so coverall.io could be triggered. Even it should be --coverage and gcov. # Install updated libglew-dev since the version provided by trusty is outdated - if [ "$TRAVIS_OS_NAME" = "linux" ]; then @@ -52,6 +57,7 @@ before_install: before_script: - git submodule update --init rsx_program_decompiler asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Utilities/yaml-cpp 3rdparty/cereal 3rdparty/hidapi + - source /opt/qt59/bin/qt59-env.sh - mkdir build - cd build - cmake .. @@ -83,7 +89,8 @@ addons: - libstdc++-5-dev - lib32stdc++6 - zlib1g-dev - - libwxgtk3.0-dev + # We need to install qt 5.8 manually because the version trusty provides is too old. + #- qtbase5-dev - libudev-dev coverity_scan: project: diff --git a/3rdparty/libpng b/3rdparty/libpng index ea77a6fd49..1dcba4d6eb 160000 --- a/3rdparty/libpng +++ b/3rdparty/libpng @@ -1 +1 @@ -Subproject commit ea77a6fd4983e6c2ab4ef1dee7c819188c2f4f3e +Subproject commit 1dcba4d6eb1bad9500be877cbd1b0442fa92cfa6 diff --git a/3rdparty/zlib b/3rdparty/zlib new file mode 160000 index 0000000000..cacf7f1d4e --- /dev/null +++ b/3rdparty/zlib @@ -0,0 +1 @@ +Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f diff --git a/CMakeLists.txt b/CMakeLists.txt index 7de109091b..6ab36da2fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.12) # uncomment next line if you want to build with GDB stub # add_definitions(-DWITH_GDB_DEBUGGER) - +set(CMAKE_CXX_STANDARD 14) set(ASMJIT_STATIC TRUE) if (NOT CMAKE_BUILD_TYPE) diff --git a/README.md b/README.md index 1f4dc0e440..ad71a8d876 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,11 @@ __Windows__ * [Visual C++ Redistributable Packages for Visual Studio 2015](http://www.microsoft.com/en-us/download/details.aspx?id=48145) * [Cmake 3.1.0+](http://www.cmake.org/download/) (required; add to PATH) * [Python 3.3+](https://www.python.org/downloads/) (required; add to PATH) +* [QT 5.8+] (https://www.qt.io/download-open-source/) (required; add QTDIR `\5.8\msvc2015_64\` environment variable if you do not want to use the Visual Studio Qt Plugin) +* [Visual Studio Qt Plugin] (https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools2015) (optional; see above) __Linux__ +* Qt 5.8+. You can use the same link from earlier (https://www.qt.io/download-open-source/) * GCC 5.1+ or Clang 3.5.0+ ([not GCC 6.1](https://github.com/RPCS3/rpcs3/issues/1691)) * Debian & Ubuntu: `sudo apt-get install cmake build-essential libasound2-dev libopenal-dev libwxgtk3.0-dev libglew-dev zlib1g-dev libedit-dev libvulkan-dev libudev-dev git` * Arch: `sudo pacman -S glew openal wxgtk cmake llvm` @@ -40,10 +43,16 @@ Mac OSX is not supported at this moment because it doesn't meet system requireme ### Building - __Windows__:
-1) To initialize the repository don't forget to execute `git submodule update --init` to pull the submodules.
-2) Open the *.SLN* file.
-3) Build the projects in *__BUILD_BEFORE* folder: right-click on every project > *Build*.
-4) Press *BUILD* > *Build Solution* or *Rebuild Solution*.
+To initialize the repository don't forget to execute `git submodule update --init` to pull the submodules.
+**_Configuring Qt_**
+*If you're using Visual Studio 2017 without Qt plugin support (or simply dont want to use it):*
+1) Add `QTDIR` environment variable and set it to `\5.8\msvc2015_64\` *OR*
open the SLN, wait for projects to load, in explorer open `rpcs3qt/rpcs3qt.vcxproj.user` and set `QtInstallFolder/5.8/msvc2015_64` +*If you wish to use the Visual Studio plugin for Qt:*
+1) Go to the Qt5 menu and edit Qt5 options. Add the path to your Qt installation with compiler e.g. `C:\Qt\5.8\msvc2015_64`.
+2) While selecting the rpcs3qt project, go to Qt5->Project Setting and select the version you added.
+**_Building the projects_**
+1) Build the projects in *__BUILD_BEFORE* folder: right-click on every project > *Build*.
+2) Press *BUILD* > *Build Solution* or *Rebuild Solution*.
- __Linux & Mac OSX__:
1) `git clone https://github.com/RPCS3/rpcs3.git`
diff --git a/appveyor.yml b/appveyor.yml index 491444f1a0..87b22c4bf0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,8 +12,7 @@ configuration: before_build: - ps: $env:Date="$(git show -s --date=short --format='%ad')" - - git submodule update --init 3rdparty/ffmpeg 3rdparty/pugixml asmjit 3rdparty/GSL 3rdparty/libpng Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers Utilities/yaml-cpp rsx_program_decompiler 3rdparty/cereal 3rdparty/hidapi - - 7z x wxWidgets.7z -aos -oC:\rpcs3\wxWidgets > null + - git submodule update --init 3rdparty/ffmpeg 3rdparty/pugixml asmjit 3rdparty/GSL 3rdparty/libpng Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers Utilities/yaml-cpp rsx_program_decompiler 3rdparty/cereal 3rdparty/zlib 3rdparty/hidapi - 7z x zlib.7z -aos -oC:\rpcs3\ > null - 7z x vulkan.7z -aos -oC:\rpcs3\Vulkan > null - if %configuration%==Release (cmake -G "Visual Studio 14 Win64" -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON) @@ -23,13 +22,12 @@ build_script: - cmake --build . --config Release -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" install: - - if not exist wxWidgets.7z appveyor DownloadFile "https://dl.dropboxusercontent.com/s/c1by0uulee6g8th/wxWidgets.7z?dl=0" -FileName wxWidgets.7z - if not exist llvmlibs.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRY2k3Q2Yya05lcm8" -FileName llvmlibs.7z - if not exist vulkan.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRa21fbDQteTN1dGs" -FileName vulkan.7z - - if not exist zlib.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B6v_qtb9hkicQ2hHa2dRbF83cE0" -FileName zlib.7z - - set WXWIN=C:\rpcs3\wxWidgets + - if not exist zlib.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B-HVE3xvheVFX05lRFdnZlh5aUU" -FileName zlib.7z + - set QTDIR=C:\Qt\5.8\msvc2015_64 - set OPENALDIR=C:\rpcs3\3rdparty\OpenAL - - set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;C:\wxWidgets;%PATH% + - set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%QTDIR%;%PATH% - set COMMIT_SHA=%APPVEYOR_REPO_COMMIT:~0,8% artifacts: @@ -38,7 +36,6 @@ artifacts: type: zip cache: - - wxWidgets.7z -> appveyor.yml - llvmlibs.7z -> appveyor.yml - vulkan.7z -> appveyor.yml - zlib.7z -> appveyor.yml \ No newline at end of file diff --git a/bin/Qt5Core.dll b/bin/Qt5Core.dll new file mode 100644 index 0000000000..22ba20bc83 Binary files /dev/null and b/bin/Qt5Core.dll differ diff --git a/bin/Qt5Gui.dll b/bin/Qt5Gui.dll new file mode 100644 index 0000000000..2706f855a4 Binary files /dev/null and b/bin/Qt5Gui.dll differ diff --git a/bin/Qt5Widgets.dll b/bin/Qt5Widgets.dll new file mode 100644 index 0000000000..af33648474 Binary files /dev/null and b/bin/Qt5Widgets.dll differ diff --git a/bin/Qt5WinExtras.dll b/bin/Qt5WinExtras.dll new file mode 100644 index 0000000000..ba6d30528c Binary files /dev/null and b/bin/Qt5WinExtras.dll differ diff --git a/bin/imageformats/qicns.dll b/bin/imageformats/qicns.dll new file mode 100644 index 0000000000..9896eb5814 Binary files /dev/null and b/bin/imageformats/qicns.dll differ diff --git a/bin/imageformats/qico.dll b/bin/imageformats/qico.dll new file mode 100644 index 0000000000..d8c9982f5b Binary files /dev/null and b/bin/imageformats/qico.dll differ diff --git a/bin/platforms/qwindows.dll b/bin/platforms/qwindows.dll new file mode 100644 index 0000000000..62afc772d7 Binary files /dev/null and b/bin/platforms/qwindows.dll differ diff --git a/rpcs3-tests/rpcs3-tests.vcxproj b/rpcs3-tests/rpcs3-tests.vcxproj index 8adb984884..2528730793 100644 --- a/rpcs3-tests/rpcs3-tests.vcxproj +++ b/rpcs3-tests/rpcs3-tests.vcxproj @@ -100,72 +100,6 @@ {78cb2f39-b809-4a06-8329-8c0a19119d3d} - - {24c45343-fd20-5c92-81c1-35a2ae841e79} - - - {a16d3832-0f42-57ce-8f48-50e06649ade8} - - - {3fcc50c2-81e9-5db2-b8d8-2129427568b1} - - - {6744dad8-9c70-574a-bff2-9f8dddb24a75} - - - {da8b15ef-6750-5928-bc0e-c748213cf9b2} - - - {33cc42f9-7756-5587-863c-8d4461b7c5dd} - - - {8bd8f8d9-4275-5b42-a8f4-f1db2970a550} - - - {69f2ede4-7d21-5738-9bc0-f66f61c9ae00} - - - {97fdab45-9c58-5bc5-a2f4-ee42739ebc63} - - - {e21129e0-7c08-5936-9d8c-0d60b5319ba7} - - - {87b42a9c-3f5c-53d7-9017-2b1cae39457d} - - - {7fb0902d-8579-5dce-b883-daf66a885005} - - - {23e1c437-a951-5943-8639-a17f3cf2e606} - - - {a1a8355b-0988-528e-9cc2-b971d6266669} - - - {6053cc38-cdee-584c-8bc8-4b000d800fc7} - - - {8acc122a-ca6a-5aa6-9c97-9cdd2e533db0} - - - {56a4b526-bb81-5d01-aaa9-16d23bbb169d} - - - {74827ebd-93dc-5110-ba95-3f2ab029b6b0} - - - {75596ce6-5ae7-55c9-b890-c07b0a657a83} - - - {8b867186-a0b5-5479-b824-e176edd27c40} - - - {3e6dca27-5fa3-53ec-bbd6-2d42294b7ae6} - - - {09f2f96a-1cc6-5e43-af1d-956ec2a4888d} - diff --git a/rpcs3.sln b/rpcs3.sln index 01bde912aa..37582f9bf3 100644 --- a/rpcs3.sln +++ b/rpcs3.sln @@ -1,163 +1,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}" - ProjectSection(ProjectDependencies) = postProject - {AC40FF01-426E-4838-A317-66354CEFAE88} = {AC40FF01-426E-4838-A317-66354CEFAE88} - {56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {56A4B526-BB81-5D01-AAA9-16D23BBB169D} - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} - {C4A10229-4712-4BD2-B63E-50D93C67A038} = {C4A10229-4712-4BD2-B63E-50D93C67A038} - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} = {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} - {7FB0902D-8579-5DCE-B883-DAF66A885005} = {7FB0902D-8579-5DCE-B883-DAF66A885005} - {A16D3832-0F42-57CE-8F48-50E06649ADE8} = {A16D3832-0F42-57CE-8F48-50E06649ADE8} - {23E1C437-A951-5943-8639-A17F3CF2E606} = {23E1C437-A951-5943-8639-A17F3CF2E606} - {6053CC38-CDEE-584C-8BC8-4B000D800FC7} = {6053CC38-CDEE-584C-8BC8-4B000D800FC7} - {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63} = {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63} - {A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669} - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} = {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} - {D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E} - {97E17077-A21F-45EF-9C3A-73A0BC092D7E} = {97E17077-A21F-45EF-9C3A-73A0BC092D7E} - {7D73447B-3D2D-4DFE-BF62-57E644C1D09F} = {7D73447B-3D2D-4DFE-BF62-57E644C1D09F} - {8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40} - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {87B42A9C-3F5C-53D7-9017-2B1CAE39457D} - {8BC303AB-25BE-4276-8E57-73F171B2D672} = {8BC303AB-25BE-4276-8E57-73F171B2D672} - {74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {74827EBD-93DC-5110-BA95-3F2AB029B6B0} - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550} = {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550} - {E21129E0-7C08-5936-9D8C-0D60B5319BA7} = {E21129E0-7C08-5936-9D8C-0D60B5319BA7} - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00} = {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00} - {75596CE6-5AE7-55C9-B890-C07B0A657A83} = {75596CE6-5AE7-55C9-B890-C07B0A657A83} - {DA8B15EF-6750-5928-BC0E-C748213CF9B2} = {DA8B15EF-6750-5928-BC0E-C748213CF9B2} - {33CC42F9-7756-5587-863C-8D4461B7C5DD} = {33CC42F9-7756-5587-863C-8D4461B7C5DD} - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wxWidgets", "wxWidgets", "{5812E712-6213-4372-B095-9EB9BAA1F2DF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv", "wxWidgets\build\msw\wx_adv.vcxproj", "{24C45343-FD20-5C92-81C1-35A2AE841E79}" - ProjectSection(ProjectDependencies) = postProject - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aui", "wxWidgets\build\msw\wx_aui.vcxproj", "{A16D3832-0F42-57CE-8F48-50E06649ADE8}" - ProjectSection(ProjectDependencies) = postProject - {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} - {33CC42F9-7756-5587-863C-8D4461B7C5DD} = {33CC42F9-7756-5587-863C-8D4461B7C5DD} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "wxWidgets\build\msw\wx_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}" - ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - {56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {56A4B526-BB81-5D01-AAA9-16D23BBB169D} - {A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669} - {8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "wxWidgets\build\msw\wx_core.vcxproj", "{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}" - ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propgrid", "wxWidgets\build\msw\wx_propgrid.vcxproj", "{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}" - ProjectSection(ProjectDependencies) = postProject - {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gl", "wxWidgets\build\msw\wx_gl.vcxproj", "{DA8B15EF-6750-5928-BC0E-C748213CF9B2}" - ProjectSection(ProjectDependencies) = postProject - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "html", "wxWidgets\build\msw\wx_html.vcxproj", "{33CC42F9-7756-5587-863C-8D4461B7C5DD}" - ProjectSection(ProjectDependencies) = postProject - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media", "wxWidgets\build\msw\wx_media.vcxproj", "{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}" - ProjectSection(ProjectDependencies) = postProject - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "net", "wxWidgets\build\msw\wx_net.vcxproj", "{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}" - ProjectSection(ProjectDependencies) = postProject - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wxWidgets\build\msw\wx_qa.vcxproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}" - ProjectSection(ProjectDependencies) = postProject - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "richtext", "wxWidgets\build\msw\wx_richtext.vcxproj", "{7FB0902D-8579-5DCE-B883-DAF66A885005}" - ProjectSection(ProjectDependencies) = postProject - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} - {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxexpat", "wxWidgets\build\msw\wx_wxexpat.vcxproj", "{A1A8355B-0988-528E-9CC2-B971D6266669}" - ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "wxWidgets\build\msw\wx_wxjpeg.vcxproj", "{6053CC38-CDEE-584C-8BC8-4B000D800FC7}" - ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "wxWidgets\build\msw\wx_wxpng.vcxproj", "{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}" - ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxregex", "wxWidgets\build\msw\wx_wxregex.vcxproj", "{56A4B526-BB81-5D01-AAA9-16D23BBB169D}" - ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxtiff", "wxWidgets\build\msw\wx_wxtiff.vcxproj", "{75596CE6-5AE7-55C9-B890-C07B0A657A83}" - ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "wxWidgets\build\msw\wx_wxzlib.vcxproj", "{8B867186-A0B5-5479-B824-E176EDD27C40}" - ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "wxWidgets\build\msw\wx_xml.vcxproj", "{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}" - ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wxWidgets\build\msw\wx_xrc.vcxproj", "{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}" - ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} - {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wxWidgets\build\msw\wx_ribbon.vcxproj", "{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}" - ProjectSection(ProjectDependencies) = postProject - {24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79} - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stc", "wxWidgets\build\msw\wx_stc.vcxproj", "{23E1C437-A951-5943-8639-A17F3CF2E606}" - ProjectSection(ProjectDependencies) = postProject - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "wxWidgets\build\msw\wx_wxscintilla.vcxproj", "{74827EBD-93DC-5110-BA95-3F2AB029B6B0}" - ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asmjit", "asmjitsrc\asmjit.vcxproj", "{AC40FF01-426E-4838-A317-66354CEFAE88}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "asmjit", "asmjit", "{E2A982F2-4B1A-48B1-8D77-A17A589C58D7}" @@ -166,19 +10,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "emucore", "rpcs3\emucore.vc EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm_build", "llvm_build\llvm_build.vcxproj", "{8BC303AB-25BE-4276-8E57-73F171B2D672}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_custom_build", "wxWidgets\build\msw\wx_custom_build.vcxproj", "{01F4CE10-2CFB-41A8-B41F-E54337868A1D}" - ProjectSection(ProjectDependencies) = postProject - {00D36322-6188-4A66-B514-3B3F183E998D} = {00D36322-6188-4A66-B514-3B3F183E998D} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "copy_setup_h", "rpcs3\copy_setup_h.vcxproj", "{00D36322-6188-4A66-B514-3B3F183E998D}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "D3D12GSRender", "rpcs3\D3D12GSRender.vcxproj", "{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3-tests", "rpcs3-tests\rpcs3-tests.vcxproj", "{AB222E8A-00CA-4ACF-A87E-5251C16C0587}" ProjectSection(ProjectDependencies) = postProject - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D} - {00D36322-6188-4A66-B514-3B3F183E998D} = {00D36322-6188-4A66-B514-3B3F183E998D} {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} = {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} {8BC303AB-25BE-4276-8E57-73F171B2D672} = {8BC303AB-25BE-4276-8E57-73F171B2D672} EndProjectSection @@ -216,15 +51,32 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VKGSRender", "rpcs3\VKGSRen {8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {8F85B6CC-250F-4ACA-A617-E820A74E3E3C} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wxWidgets\build\msw\wx_webview.vcxproj", "{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "yaml-cpp", "yaml-cpp", "{DDF904CA-2771-441A-8629-5DF2EB922A79}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "__BUILD_BEFORE", "__BUILD_BEFORE", "{B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml-cpp", "Utilities\yaml-cpp.vcxproj", "{FDC361C5-7734-493B-8CFB-037308B35122}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "hidapi", "hidapi", "{3FDE34DE-0D62-47DE-8570-65F93D2E1B83}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3qt", "rpcs3\rpcs3qt.vcxproj", "{D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69}" + ProjectSection(ProjectDependencies) = postProject + {AC40FF01-426E-4838-A317-66354CEFAE88} = {AC40FF01-426E-4838-A317-66354CEFAE88} + {A107C21C-418A-4697-BB10-20C3AA60E2E4} = {A107C21C-418A-4697-BB10-20C3AA60E2E4} + {C4A10229-4712-4BD2-B63E-50D93C67A038} = {C4A10229-4712-4BD2-B63E-50D93C67A038} + {78CB2F39-B809-4A06-8329-8C0A19119D3D} = {78CB2F39-B809-4A06-8329-8C0A19119D3D} + {3384223A-6D97-4799-9862-359F85312892} = {3384223A-6D97-4799-9862-359F85312892} + {30A05C4D-F5FD-421C-A864-17A64BDEAA75} = {30A05C4D-F5FD-421C-A864-17A64BDEAA75} + {60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF} + {3EE5F075-B546-42C4-B6A8-E3CCEF38B78D} = {3EE5F075-B546-42C4-B6A8-E3CCEF38B78D} + {D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E} + {97E17077-A21F-45EF-9C3A-73A0BC092D7E} = {97E17077-A21F-45EF-9C3A-73A0BC092D7E} + {7D73447B-3D2D-4DFE-BF62-57E644C1D09F} = {7D73447B-3D2D-4DFE-BF62-57E644C1D09F} + {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} = {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} + {58B40697-B15E-429E-B325-D52C28AEBCBF} = {58B40697-B15E-429E-B325-D52C28AEBCBF} + {FDC361C5-7734-493B-8CFB-037308B35122} = {FDC361C5-7734-493B-8CFB-037308B35122} + {8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {8F85B6CC-250F-4ACA-A617-E820A74E3E3C} + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "hidapi", "hidapi", "{FA1E6C16-CA63-45F8-8D52-E21DF396BE36}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hidapi", "3rdparty\hidapi\windows\hidapi.vcxproj", "{A107C21C-418A-4697-BB10-20C3AA60E2E4}" EndProject @@ -237,236 +89,6 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64 - {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64 - {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64 - {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.Build.0 = Debug - MemLeak|x64 - {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.ActiveCfg = Debug|x64 - {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.Build.0 = Debug|x64 - {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release - LLVM|x64.ActiveCfg = Release - LLVM|x64 - {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release - LLVM|x64.Build.0 = Release - LLVM|x64 - {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.ActiveCfg = Release|x64 - {70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.Build.0 = Release|x64 - {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - LLVM|x64.Build.0 = Debug|x64 - {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.ActiveCfg = Debug|x64 - {24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.Build.0 = Debug|x64 - {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release - LLVM|x64.ActiveCfg = Release|x64 - {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release - LLVM|x64.Build.0 = Release|x64 - {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.ActiveCfg = Release|x64 - {24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.Build.0 = Release|x64 - {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - LLVM|x64.Build.0 = Debug|x64 - {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.ActiveCfg = Debug|x64 - {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.Build.0 = Debug|x64 - {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release - LLVM|x64.ActiveCfg = Release|x64 - {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release - LLVM|x64.Build.0 = Release|x64 - {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.ActiveCfg = Release|x64 - {A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.Build.0 = Release|x64 - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - LLVM|x64.Build.0 = Debug|x64 - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.ActiveCfg = Debug|x64 - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.Build.0 = Debug|x64 - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release - LLVM|x64.ActiveCfg = Release|x64 - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release - LLVM|x64.Build.0 = Release|x64 - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.ActiveCfg = Release|x64 - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.Build.0 = Release|x64 - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - LLVM|x64.Build.0 = Debug|x64 - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.ActiveCfg = Debug|x64 - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.Build.0 = Debug|x64 - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release - LLVM|x64.ActiveCfg = Release|x64 - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release - LLVM|x64.Build.0 = Release|x64 - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.ActiveCfg = Release|x64 - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.Build.0 = Release|x64 - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - LLVM|x64.Build.0 = Debug|x64 - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.ActiveCfg = Debug|x64 - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.Build.0 = Debug|x64 - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release - LLVM|x64.ActiveCfg = Release|x64 - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release - LLVM|x64.Build.0 = Release|x64 - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.ActiveCfg = Release|x64 - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.Build.0 = Release|x64 - {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - LLVM|x64.Build.0 = Debug|x64 - {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.ActiveCfg = Debug|x64 - {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.Build.0 = Debug|x64 - {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release - LLVM|x64.ActiveCfg = Release|x64 - {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release - LLVM|x64.Build.0 = Release|x64 - {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.ActiveCfg = Release|x64 - {DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.Build.0 = Release|x64 - {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - LLVM|x64.Build.0 = Debug|x64 - {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.ActiveCfg = Debug|x64 - {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.Build.0 = Debug|x64 - {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release - LLVM|x64.ActiveCfg = Release|x64 - {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release - LLVM|x64.Build.0 = Release|x64 - {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.ActiveCfg = Release|x64 - {33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.Build.0 = Release|x64 - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - LLVM|x64.Build.0 = Debug|x64 - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.ActiveCfg = Debug|x64 - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.Build.0 = Debug|x64 - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release - LLVM|x64.ActiveCfg = Release|x64 - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release - LLVM|x64.Build.0 = Release|x64 - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.ActiveCfg = Release|x64 - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.Build.0 = Release|x64 - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - LLVM|x64.Build.0 = Debug|x64 - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.ActiveCfg = Debug|x64 - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.Build.0 = Debug|x64 - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release - LLVM|x64.ActiveCfg = Release|x64 - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release - LLVM|x64.Build.0 = Release|x64 - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.ActiveCfg = Release|x64 - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.Build.0 = Release|x64 - {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - LLVM|x64.Build.0 = Debug|x64 - {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.ActiveCfg = Debug|x64 - {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.Build.0 = Debug|x64 - {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release - LLVM|x64.ActiveCfg = Release|x64 - {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release - LLVM|x64.Build.0 = Release|x64 - {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.ActiveCfg = Release|x64 - {E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.Build.0 = Release|x64 - {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - LLVM|x64.Build.0 = Debug|x64 - {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.ActiveCfg = Debug|x64 - {7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.Build.0 = Debug|x64 - {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release - LLVM|x64.ActiveCfg = Release|x64 - {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release - LLVM|x64.Build.0 = Release|x64 - {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.ActiveCfg = Release|x64 - {7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.Build.0 = Release|x64 - {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - LLVM|x64.Build.0 = Debug|x64 - {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.ActiveCfg = Debug|x64 - {A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.Build.0 = Debug|x64 - {A1A8355B-0988-528E-9CC2-B971D6266669}.Release - LLVM|x64.ActiveCfg = Release|x64 - {A1A8355B-0988-528E-9CC2-B971D6266669}.Release - LLVM|x64.Build.0 = Release|x64 - {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.ActiveCfg = Release|x64 - {A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.Build.0 = Release|x64 - {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - LLVM|x64.Build.0 = Debug|x64 - {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.ActiveCfg = Debug|x64 - {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.Build.0 = Debug|x64 - {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release - LLVM|x64.ActiveCfg = Release|x64 - {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release - LLVM|x64.Build.0 = Release|x64 - {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.ActiveCfg = Release|x64 - {6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.Build.0 = Release|x64 - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - LLVM|x64.Build.0 = Debug|x64 - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.ActiveCfg = Debug|x64 - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.Build.0 = Debug|x64 - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release - LLVM|x64.ActiveCfg = Release|x64 - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release - LLVM|x64.Build.0 = Release|x64 - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.ActiveCfg = Release|x64 - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.Build.0 = Release|x64 - {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - LLVM|x64.Build.0 = Debug|x64 - {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.ActiveCfg = Debug|x64 - {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.Build.0 = Debug|x64 - {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release - LLVM|x64.ActiveCfg = Release|x64 - {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release - LLVM|x64.Build.0 = Release|x64 - {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.ActiveCfg = Release|x64 - {56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.Build.0 = Release|x64 - {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - LLVM|x64.Build.0 = Debug|x64 - {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.ActiveCfg = Debug|x64 - {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.Build.0 = Debug|x64 - {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release - LLVM|x64.ActiveCfg = Release|x64 - {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release - LLVM|x64.Build.0 = Release|x64 - {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.ActiveCfg = Release|x64 - {75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.Build.0 = Release|x64 - {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - LLVM|x64.Build.0 = Debug|x64 - {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.ActiveCfg = Debug|x64 - {8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.Build.0 = Debug|x64 - {8B867186-A0B5-5479-B824-E176EDD27C40}.Release - LLVM|x64.ActiveCfg = Release|x64 - {8B867186-A0B5-5479-B824-E176EDD27C40}.Release - LLVM|x64.Build.0 = Release|x64 - {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.ActiveCfg = Release|x64 - {8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.Build.0 = Release|x64 - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - LLVM|x64.Build.0 = Debug|x64 - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.ActiveCfg = Debug|x64 - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.Build.0 = Debug|x64 - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release - LLVM|x64.ActiveCfg = Release|x64 - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release - LLVM|x64.Build.0 = Release|x64 - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.ActiveCfg = Release|x64 - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.Build.0 = Release|x64 - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - LLVM|x64.Build.0 = Debug|x64 - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.ActiveCfg = Debug|x64 - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.Build.0 = Debug|x64 - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release - LLVM|x64.ActiveCfg = Release|x64 - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release - LLVM|x64.Build.0 = Release|x64 - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.ActiveCfg = Release|x64 - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.Build.0 = Release|x64 - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - LLVM|x64.Build.0 = Debug|x64 - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.ActiveCfg = Debug|x64 - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.Build.0 = Debug|x64 - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release - LLVM|x64.ActiveCfg = Release|x64 - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release - LLVM|x64.Build.0 = Release|x64 - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.ActiveCfg = Release|x64 - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.Build.0 = Release|x64 - {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - LLVM|x64.Build.0 = Debug|x64 - {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.ActiveCfg = Debug|x64 - {23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.Build.0 = Debug|x64 - {23E1C437-A951-5943-8639-A17F3CF2E606}.Release - LLVM|x64.ActiveCfg = Release|x64 - {23E1C437-A951-5943-8639-A17F3CF2E606}.Release - LLVM|x64.Build.0 = Release|x64 - {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.ActiveCfg = Release|x64 - {23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.Build.0 = Release|x64 - {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - LLVM|x64.Build.0 = Debug|x64 - {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.ActiveCfg = Debug|x64 - {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.Build.0 = Debug|x64 - {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release - LLVM|x64.ActiveCfg = Release|x64 - {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release - LLVM|x64.Build.0 = Release|x64 - {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.ActiveCfg = Release|x64 - {74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.Build.0 = Release|x64 {AC40FF01-426E-4838-A317-66354CEFAE88}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64 {AC40FF01-426E-4838-A317-66354CEFAE88}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64 {AC40FF01-426E-4838-A317-66354CEFAE88}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64 @@ -492,26 +114,6 @@ Global {8BC303AB-25BE-4276-8E57-73F171B2D672}.Debug|x64.ActiveCfg = Debug|x64 {8BC303AB-25BE-4276-8E57-73F171B2D672}.Release - LLVM|x64.ActiveCfg = Release|x64 {8BC303AB-25BE-4276-8E57-73F171B2D672}.Release|x64.ActiveCfg = Release|x64 - {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - LLVM|x64.Build.0 = Debug|x64 - {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug|x64.ActiveCfg = Debug|x64 - {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug|x64.Build.0 = Debug|x64 - {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release - LLVM|x64.ActiveCfg = Release|x64 - {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release - LLVM|x64.Build.0 = Release|x64 - {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release|x64.ActiveCfg = Release|x64 - {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release|x64.Build.0 = Release|x64 - {00D36322-6188-4A66-B514-3B3F183E998D}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {00D36322-6188-4A66-B514-3B3F183E998D}.Debug - LLVM|x64.Build.0 = Debug|x64 - {00D36322-6188-4A66-B514-3B3F183E998D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {00D36322-6188-4A66-B514-3B3F183E998D}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {00D36322-6188-4A66-B514-3B3F183E998D}.Debug|x64.ActiveCfg = Debug|x64 - {00D36322-6188-4A66-B514-3B3F183E998D}.Debug|x64.Build.0 = Debug|x64 - {00D36322-6188-4A66-B514-3B3F183E998D}.Release - LLVM|x64.ActiveCfg = Release|x64 - {00D36322-6188-4A66-B514-3B3F183E998D}.Release - LLVM|x64.Build.0 = Release|x64 - {00D36322-6188-4A66-B514-3B3F183E998D}.Release|x64.ActiveCfg = Release|x64 - {00D36322-6188-4A66-B514-3B3F183E998D}.Release|x64.Build.0 = Release|x64 {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64 {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64 {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64 @@ -587,16 +189,16 @@ Global {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release - LLVM|x64.Build.0 = Release Library|x64 {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.ActiveCfg = Release Library|x64 {D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.Build.0 = Release Library|x64 - {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.ActiveCfg = Debug Library|x64 - {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.Build.0 = Debug Library|x64 - {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.ActiveCfg = Debug Library|x64 - {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.Build.0 = Debug Library|x64 - {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.ActiveCfg = Debug Library|x64 - {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.Build.0 = Debug Library|x64 - {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.ActiveCfg = Release Library|x64 - {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.Build.0 = Release Library|x64 - {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.ActiveCfg = Release Library|x64 - {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.Build.0 = Release Library|x64 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.ActiveCfg = Debug|x64 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.Build.0 = Debug|x64 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.Build.0 = Debug|x64 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.ActiveCfg = Debug|x64 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.Build.0 = Debug|x64 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.ActiveCfg = Release|x64 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.Build.0 = Release|x64 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.ActiveCfg = Release|x64 + {60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.Build.0 = Release|x64 {58B40697-B15E-429E-B325-D52C28AEBCBF}.Debug - LLVM|x64.ActiveCfg = Debug|x64 {58B40697-B15E-429E-B325-D52C28AEBCBF}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 {58B40697-B15E-429E-B325-D52C28AEBCBF}.Debug|x64.ActiveCfg = Debug|x64 @@ -617,16 +219,6 @@ Global {3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Release - LLVM|x64.Build.0 = Release - LLVM|x64 {3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Release|x64.ActiveCfg = Release|x64 {3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Release|x64.Build.0 = Release|x64 - {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - LLVM|x64.ActiveCfg = Debug|x64 - {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - LLVM|x64.Build.0 = Debug|x64 - {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 - {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - MemLeak|x64.Build.0 = Debug|x64 - {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.ActiveCfg = Debug|x64 - {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.Build.0 = Debug|x64 - {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release - LLVM|x64.ActiveCfg = Release|x64 - {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release - LLVM|x64.Build.0 = Release|x64 - {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.ActiveCfg = Release|x64 - {A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.Build.0 = Release|x64 {FDC361C5-7734-493B-8CFB-037308B35122}.Debug - LLVM|x64.ActiveCfg = Debug|x64 {FDC361C5-7734-493B-8CFB-037308B35122}.Debug - LLVM|x64.Build.0 = Debug|x64 {FDC361C5-7734-493B-8CFB-037308B35122}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 @@ -637,6 +229,16 @@ Global {FDC361C5-7734-493B-8CFB-037308B35122}.Release - LLVM|x64.Build.0 = Release|x64 {FDC361C5-7734-493B-8CFB-037308B35122}.Release|x64.ActiveCfg = Release|x64 {FDC361C5-7734-493B-8CFB-037308B35122}.Release|x64.Build.0 = Release|x64 + {D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64 + {D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64 + {D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 + {D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69}.Debug - MemLeak|x64.Build.0 = Debug|x64 + {D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69}.Debug|x64.ActiveCfg = Debug|x64 + {D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69}.Debug|x64.Build.0 = Debug|x64 + {D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69}.Release - LLVM|x64.ActiveCfg = Release - LLVM|x64 + {D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69}.Release - LLVM|x64.Build.0 = Release - LLVM|x64 + {D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69}.Release|x64.ActiveCfg = Release|x64 + {D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69}.Release|x64.Build.0 = Release|x64 {A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug - LLVM|x64.ActiveCfg = Debug|x64 {A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug - LLVM|x64.Build.0 = Debug|x64 {A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug - MemLeak|x64.ActiveCfg = Debug|x64 @@ -652,33 +254,9 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {24C45343-FD20-5C92-81C1-35A2AE841E79} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {A16D3832-0F42-57CE-8F48-50E06649ADE8} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {DA8B15EF-6750-5928-BC0E-C748213CF9B2} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {33CC42F9-7756-5587-863C-8D4461B7C5DD} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {E21129E0-7C08-5936-9D8C-0D60B5319BA7} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {7FB0902D-8579-5DCE-B883-DAF66A885005} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {A1A8355B-0988-528E-9CC2-B971D6266669} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {6053CC38-CDEE-584C-8BC8-4B000D800FC7} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {75596CE6-5AE7-55C9-B890-C07B0A657A83} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {8B867186-A0B5-5479-B824-E176EDD27C40} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {23E1C437-A951-5943-8639-A17F3CF2E606} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} {AC40FF01-426E-4838-A317-66354CEFAE88} = {E2A982F2-4B1A-48B1-8D77-A17A589C58D7} {C4A10229-4712-4BD2-B63E-50D93C67A038} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2} {8BC303AB-25BE-4276-8E57-73F171B2D672} = {B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668} - {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} - {00D36322-6188-4A66-B514-3B3F183E998D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2} {3384223A-6D97-4799-9862-359F85312892} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2} {7D73447B-3D2D-4DFE-BF62-57E644C1D09F} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2} @@ -689,8 +267,7 @@ Global {58B40697-B15E-429E-B325-D52C28AEBCBF} = {B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668} {8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668} {3EE5F075-B546-42C4-B6A8-E3CCEF38B78D} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2} - {A8E8442A-078A-5FC5-B495-8D71BA77EE6E} = {5812E712-6213-4372-B095-9EB9BAA1F2DF} {FDC361C5-7734-493B-8CFB-037308B35122} = {DDF904CA-2771-441A-8629-5DF2EB922A79} - {A107C21C-418A-4697-BB10-20C3AA60E2E4} = {3FDE34DE-0D62-47DE-8570-65F93D2E1B83} + {A107C21C-418A-4697-BB10-20C3AA60E2E4} = {FA1E6C16-CA63-45F8-8D52-E21DF396BE36} EndGlobalSection EndGlobal diff --git a/rpcs3/BasicKeyboardHandler.cpp b/rpcs3/BasicKeyboardHandler.cpp deleted file mode 100644 index b0947155f4..0000000000 --- a/rpcs3/BasicKeyboardHandler.cpp +++ /dev/null @@ -1,170 +0,0 @@ -#include "stdafx.h" -#include "stdafx_gui.h" -#include "rpcs3.h" -#include "BasicKeyboardHandler.h" - -void BasicKeyboardHandler::Init(const u32 max_connect) -{ - for (u32 i = 0; i(m_keyboards.size(), max_connect); - m_info.info = 0; // Ownership of keyboard data: 0=Application, 1=System - m_info.status[0] = CELL_KB_STATUS_CONNECTED; // (TODO: Support for more keyboards) -} - -BasicKeyboardHandler::BasicKeyboardHandler() -{ - wxGetApp().Bind(wxEVT_KEY_DOWN, &BasicKeyboardHandler::KeyDown, this); - wxGetApp().Bind(wxEVT_KEY_UP, &BasicKeyboardHandler::KeyUp, this); -} - -void BasicKeyboardHandler::KeyDown(wxKeyEvent& event) -{ - Key(event.GetKeyCode(), 1); - event.Skip(); -} - -void BasicKeyboardHandler::KeyUp(wxKeyEvent& event) -{ - Key(event.GetKeyCode(), 0); - event.Skip(); -} - -void BasicKeyboardHandler::LoadSettings() -{ - // Meta Keys - m_keyboards[0].m_buttons.emplace_back(WXK_CONTROL, CELL_KB_MKEY_L_CTRL); - m_keyboards[0].m_buttons.emplace_back(WXK_SHIFT, CELL_KB_MKEY_L_SHIFT); - m_keyboards[0].m_buttons.emplace_back(WXK_ALT, CELL_KB_MKEY_L_ALT); - m_keyboards[0].m_buttons.emplace_back(WXK_WINDOWS_LEFT, CELL_KB_MKEY_L_WIN); - m_keyboards[0].m_buttons.emplace_back(WXK_COMMAND, CELL_KB_MKEY_L_WIN); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_CTRL); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_SHIFT); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_ALT); - m_keyboards[0].m_buttons.emplace_back(WXK_WINDOWS_RIGHT, CELL_KB_MKEY_R_WIN); - - // CELL_KB_RAWDAT - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_NO_EVENT); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_ROLLOVER); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_POSTFAIL); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_UNDEF); - m_keyboards[0].m_buttons.emplace_back(WXK_ESCAPE, CELL_KEYC_ESCAPE); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_106_KANJI); - m_keyboards[0].m_buttons.emplace_back(WXK_CAPITAL, CELL_KEYC_CAPS_LOCK); - m_keyboards[0].m_buttons.emplace_back(WXK_F1, CELL_KEYC_F1); - m_keyboards[0].m_buttons.emplace_back(WXK_F2, CELL_KEYC_F2); - m_keyboards[0].m_buttons.emplace_back(WXK_F3, CELL_KEYC_F3); - m_keyboards[0].m_buttons.emplace_back(WXK_F4, CELL_KEYC_F4); - m_keyboards[0].m_buttons.emplace_back(WXK_F5, CELL_KEYC_F5); - m_keyboards[0].m_buttons.emplace_back(WXK_F6, CELL_KEYC_F6); - m_keyboards[0].m_buttons.emplace_back(WXK_F7, CELL_KEYC_F7); - m_keyboards[0].m_buttons.emplace_back(WXK_F8, CELL_KEYC_F8); - m_keyboards[0].m_buttons.emplace_back(WXK_F9, CELL_KEYC_F9); - m_keyboards[0].m_buttons.emplace_back(WXK_F10, CELL_KEYC_F10); - m_keyboards[0].m_buttons.emplace_back(WXK_F11, CELL_KEYC_F11); - m_keyboards[0].m_buttons.emplace_back(WXK_F12, CELL_KEYC_F12); - m_keyboards[0].m_buttons.emplace_back(WXK_PRINT, CELL_KEYC_PRINTSCREEN); - m_keyboards[0].m_buttons.emplace_back(WXK_SCROLL, CELL_KEYC_SCROLL_LOCK); - m_keyboards[0].m_buttons.emplace_back(WXK_PAUSE, CELL_KEYC_PAUSE); - m_keyboards[0].m_buttons.emplace_back(WXK_INSERT, CELL_KEYC_INSERT); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_HOME); - m_keyboards[0].m_buttons.emplace_back(WXK_PAGEUP, CELL_KEYC_PAGE_UP); - m_keyboards[0].m_buttons.emplace_back(WXK_DELETE, CELL_KEYC_DELETE); - m_keyboards[0].m_buttons.emplace_back(WXK_END, CELL_KEYC_END); - m_keyboards[0].m_buttons.emplace_back(WXK_PAGEDOWN, CELL_KEYC_PAGE_DOWN); - m_keyboards[0].m_buttons.emplace_back(WXK_RIGHT, CELL_KEYC_RIGHT_ARROW); - m_keyboards[0].m_buttons.emplace_back(WXK_LEFT, CELL_KEYC_LEFT_ARROW); - m_keyboards[0].m_buttons.emplace_back(WXK_DOWN, CELL_KEYC_DOWN_ARROW); - m_keyboards[0].m_buttons.emplace_back(WXK_UP, CELL_KEYC_UP_ARROW); - //m_keyboards[0].m_buttons.emplace_back(WXK_NUMLOCK, CELL_KEYC_NUM_LOCK); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_APPLICATION); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_KANA); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_HENKAN); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_MUHENKAN); - - // CELL_KB_KEYPAD - m_keyboards[0].m_buttons.emplace_back(WXK_NUMLOCK, CELL_KEYC_KPAD_NUMLOCK); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_DIVIDE, CELL_KEYC_KPAD_SLASH); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_MULTIPLY, CELL_KEYC_KPAD_ASTERISK); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_SUBTRACT, CELL_KEYC_KPAD_MINUS); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_ADD, CELL_KEYC_KPAD_PLUS); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_ENTER, CELL_KEYC_KPAD_ENTER); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD1, CELL_KEYC_KPAD_1); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD2, CELL_KEYC_KPAD_2); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD3, CELL_KEYC_KPAD_3); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD4, CELL_KEYC_KPAD_4); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD5, CELL_KEYC_KPAD_5); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD6, CELL_KEYC_KPAD_6); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD7, CELL_KEYC_KPAD_7); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD8, CELL_KEYC_KPAD_8); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD9, CELL_KEYC_KPAD_9); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD0, CELL_KEYC_KPAD_0); - m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_DELETE, CELL_KEYC_KPAD_PERIOD); - - // ASCII Printable characters - m_keyboards[0].m_buttons.emplace_back('A', CELL_KEYC_A); - m_keyboards[0].m_buttons.emplace_back('B', CELL_KEYC_B); - m_keyboards[0].m_buttons.emplace_back('C', CELL_KEYC_C); - m_keyboards[0].m_buttons.emplace_back('D', CELL_KEYC_D); - m_keyboards[0].m_buttons.emplace_back('E', CELL_KEYC_E); - m_keyboards[0].m_buttons.emplace_back('F', CELL_KEYC_F); - m_keyboards[0].m_buttons.emplace_back('G', CELL_KEYC_G); - m_keyboards[0].m_buttons.emplace_back('H', CELL_KEYC_H); - m_keyboards[0].m_buttons.emplace_back('I', CELL_KEYC_I); - m_keyboards[0].m_buttons.emplace_back('J', CELL_KEYC_J); - m_keyboards[0].m_buttons.emplace_back('K', CELL_KEYC_K); - m_keyboards[0].m_buttons.emplace_back('L', CELL_KEYC_L); - m_keyboards[0].m_buttons.emplace_back('M', CELL_KEYC_M); - m_keyboards[0].m_buttons.emplace_back('N', CELL_KEYC_N); - m_keyboards[0].m_buttons.emplace_back('O', CELL_KEYC_O); - m_keyboards[0].m_buttons.emplace_back('P', CELL_KEYC_P); - m_keyboards[0].m_buttons.emplace_back('Q', CELL_KEYC_Q); - m_keyboards[0].m_buttons.emplace_back('R', CELL_KEYC_R); - m_keyboards[0].m_buttons.emplace_back('S', CELL_KEYC_S); - m_keyboards[0].m_buttons.emplace_back('T', CELL_KEYC_T); - m_keyboards[0].m_buttons.emplace_back('U', CELL_KEYC_U); - m_keyboards[0].m_buttons.emplace_back('V', CELL_KEYC_V); - m_keyboards[0].m_buttons.emplace_back('W', CELL_KEYC_W); - m_keyboards[0].m_buttons.emplace_back('X', CELL_KEYC_X); - m_keyboards[0].m_buttons.emplace_back('Y', CELL_KEYC_Y); - m_keyboards[0].m_buttons.emplace_back('Z', CELL_KEYC_Z); - - m_keyboards[0].m_buttons.emplace_back('1', CELL_KEYC_1); - m_keyboards[0].m_buttons.emplace_back('2', CELL_KEYC_2); - m_keyboards[0].m_buttons.emplace_back('3', CELL_KEYC_3); - m_keyboards[0].m_buttons.emplace_back('4', CELL_KEYC_4); - m_keyboards[0].m_buttons.emplace_back('5', CELL_KEYC_5); - m_keyboards[0].m_buttons.emplace_back('6', CELL_KEYC_6); - m_keyboards[0].m_buttons.emplace_back('7', CELL_KEYC_7); - m_keyboards[0].m_buttons.emplace_back('8', CELL_KEYC_8); - m_keyboards[0].m_buttons.emplace_back('9', CELL_KEYC_9); - m_keyboards[0].m_buttons.emplace_back('0', CELL_KEYC_0); - - m_keyboards[0].m_buttons.emplace_back(WXK_RETURN, CELL_KEYC_ENTER); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_ESC); - m_keyboards[0].m_buttons.emplace_back(WXK_TAB, CELL_KEYC_TAB); - m_keyboards[0].m_buttons.emplace_back(WXK_SPACE, CELL_KEYC_SPACE); - m_keyboards[0].m_buttons.emplace_back(WXK_SUBTRACT, CELL_KEYC_MINUS); - m_keyboards[0].m_buttons.emplace_back('=', CELL_KEYC_EQUAL_101); - m_keyboards[0].m_buttons.emplace_back('^', CELL_KEYC_ACCENT_CIRCONFLEX_106); - //m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_LEFT_BRACKET_101); - m_keyboards[0].m_buttons.emplace_back('@', CELL_KEYC_ATMARK_106); - //m_keyboards[0].m_buttons.emplace_back(')', CELL_KEYC_RIGHT_BRACKET_101); - m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_LEFT_BRACKET_106); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_BACKSLASH_101); - m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_RIGHT_BRACKET_106); - m_keyboards[0].m_buttons.emplace_back(';', CELL_KEYC_SEMICOLON); - m_keyboards[0].m_buttons.emplace_back('"', CELL_KEYC_QUOTATION_101); - m_keyboards[0].m_buttons.emplace_back(':', CELL_KEYC_COLON_106); - m_keyboards[0].m_buttons.emplace_back(',', CELL_KEYC_COMMA); - m_keyboards[0].m_buttons.emplace_back('.', CELL_KEYC_PERIOD); - m_keyboards[0].m_buttons.emplace_back('/', CELL_KEYC_SLASH); - m_keyboards[0].m_buttons.emplace_back('\\', CELL_KEYC_BACKSLASH_106); - //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_YEN_106); -} diff --git a/rpcs3/BasicKeyboardHandler.h b/rpcs3/BasicKeyboardHandler.h deleted file mode 100644 index 2c83265d23..0000000000 --- a/rpcs3/BasicKeyboardHandler.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include "Emu/Io/KeyboardHandler.h" - -class BasicKeyboardHandler final : public KeyboardHandlerBase, public wxWindow -{ -public: - virtual void Init(const u32 max_connect) override; - - BasicKeyboardHandler(); - - void KeyDown(wxKeyEvent& event); - void KeyUp(wxKeyEvent& event); - void LoadSettings(); -}; diff --git a/rpcs3/BasicMouseHandler.cpp b/rpcs3/BasicMouseHandler.cpp deleted file mode 100644 index 3a6b55ca1f..0000000000 --- a/rpcs3/BasicMouseHandler.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "stdafx.h" -#include "stdafx_gui.h" -#include "rpcs3.h" -#include "BasicMouseHandler.h" - -void BasicMouseHandler::Init(const u32 max_connect) -{ - m_mice.emplace_back(Mouse()); - memset(&m_info, 0, sizeof(MouseInfo)); - m_info.max_connect = max_connect; - m_info.now_connect = std::min(m_mice.size(), (size_t)max_connect); - m_info.info = 0; // Ownership of mouse data: 0=Application, 1=System - m_info.status[0] = CELL_MOUSE_STATUS_CONNECTED; // (TODO: Support for more mice) - for (u32 i = 1; i -// TODO: Still reliant on wxWidgets for zlib functions. Alternative solutions? #include inline u8 Read8(const fs::file& f) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 02f307187b..333cb5739a 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -43,21 +43,6 @@ extern std::shared_ptr ppu_load_prx(const ppu_prx_object&, const fs::file g_tty; -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](keyboard_handler value) - { - switch (value) - { - case keyboard_handler::null: return "Null"; - case keyboard_handler::basic: return "Basic"; - } - - return unknown; - }); -} - template <> void fmt_class_string::format(std::string& out, u64 arg) { @@ -116,26 +101,6 @@ void fmt_class_string::format(std::string& out, u64 arg) }); } -template <> -void fmt_class_string::format(std::string& out, u64 arg) -{ - format_enum(out, arg, [](audio_renderer value) - { - switch (value) - { - case audio_renderer::null: return "Null"; -#ifdef _WIN32 - case audio_renderer::xaudio: return "XAudio2"; -#elif __linux__ - case audio_renderer::alsa: return "ALSA"; -#endif - case audio_renderer::openal: return "OpenAL"; - } - - return unknown; - }); -} - template <> void fmt_class_string::format(std::string& out, u64 arg) { @@ -173,12 +138,40 @@ void fmt_class_string::format(std::string& out, u64 arg) }); } -namespace rpcs3 + +template <> +void fmt_class_string::format(std::string& out, u64 arg) { - event& on_run() { static event on_run; return on_run; } - event& on_stop() { static event on_stop; return on_stop; } - event& on_pause() { static event on_pause; return on_pause; } - event& on_resume() { static event on_resume; return on_resume; } + format_enum(out, arg, [](keyboard_handler value) + { + switch (value) + { + case keyboard_handler::null: return "Null"; + case keyboard_handler::basic: return "Basic"; + } + + return unknown; + }); +} + +template <> +void fmt_class_string::format(std::string& out, u64 arg) +{ + format_enum(out, arg, [](audio_renderer value) + { + switch (value) + { + case audio_renderer::null: return "Null"; +#ifdef _WIN32 + case audio_renderer::xaudio: return "XAudio2"; +#elif __linux__ + case audio_renderer::alsa: return "ALSA"; +#endif + case audio_renderer::openal: return "OpenAL"; + } + + return unknown; + }); } void Emulator::Init() @@ -425,6 +418,8 @@ void Emulator::Load() // PS3 executable g_system = system_type::ps3; m_state = system_state::ready; + GetCallbacks().on_ready(); + vm::ps3::init(); if (m_elf_path.empty()) @@ -442,6 +437,7 @@ void Emulator::Load() // PPU PRX (experimental) g_system = system_type::ps3; m_state = system_state::ready; + GetCallbacks().on_ready(); vm::ps3::init(); ppu_load_prx(ppu_prx, ""); } @@ -450,6 +446,7 @@ void Emulator::Load() // SPU executable (experimental) g_system = system_type::ps3; m_state = system_state::ready; + GetCallbacks().on_ready(); vm::ps3::init(); spu_load_exec(spu_exec); } @@ -458,6 +455,7 @@ void Emulator::Load() // ARMv7 executable g_system = system_type::psv; m_state = system_state::ready; + GetCallbacks().on_ready(); vm::psv::init(); if (m_elf_path.empty()) @@ -486,6 +484,7 @@ void Emulator::Load() else if (IsPaused()) { m_state = system_state::ready; + GetCallbacks().on_ready(); } } catch (const std::exception& e) @@ -511,7 +510,8 @@ void Emulator::Run() return; } - rpcs3::on_run()(); + + GetCallbacks().on_run(); m_pause_start_time = 0; m_pause_amend_time = 0; @@ -538,7 +538,7 @@ bool Emulator::Pause() return m_state.compare_and_swap_test(system_state::ready, system_state::paused); } - rpcs3::on_pause()(); + GetCallbacks().on_pause(); // Update pause start time if (m_pause_start_time.exchange(start)) @@ -602,7 +602,7 @@ void Emulator::Resume() on_select(0, *mfc); } - rpcs3::on_resume()(); + GetCallbacks().on_resume(); } void Emulator::Stop() @@ -614,7 +614,7 @@ void Emulator::Stop() LOG_NOTICE(GENERAL, "Stopping emulator..."); - rpcs3::on_stop()(); + GetCallbacks().on_stop(); #ifdef WITH_GDB_DEBUGGER //fxm for some reason doesn't call on_stop diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index d2e0dc6f2f..612443449a 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -146,6 +146,11 @@ struct EmuCallbacks { std::function)> call_after; std::function process_events; + std::function on_run; + std::function on_pause; + std::function on_resume; + std::function on_stop; + std::function on_ready; std::function exit; std::function()> get_kb_handler; std::function()> get_mouse_handler; @@ -370,8 +375,10 @@ struct cfg_root : cfg::node { node_misc(cfg::node* _this) : cfg::node(_this, "Miscellaneous") {} - cfg::_bool autostart{this, "Always start after boot", true}; + cfg::_bool autostart{this, "Automatically start games after boot", true}; cfg::_bool autoexit{this, "Exit RPCS3 when process finishes"}; + cfg::_bool start_fullscreen{ this, "Start games in fullscreen mode" }; + cfg::_bool show_fps_in_title{ this, "Show FPS counter in window title", true}; cfg::_int<1, 65535> gdb_server_port{this, "Port", 2345}; } misc{this}; diff --git a/rpcs3/Icons/pause.png b/rpcs3/Icons/pause.png new file mode 100644 index 0000000000..768ae5560f Binary files /dev/null and b/rpcs3/Icons/pause.png differ diff --git a/rpcs3/Icons/play.png b/rpcs3/Icons/play.png new file mode 100644 index 0000000000..2c1aa19bba Binary files /dev/null and b/rpcs3/Icons/play.png differ diff --git a/rpcs3/Icons/restart.png b/rpcs3/Icons/restart.png new file mode 100644 index 0000000000..680df62259 Binary files /dev/null and b/rpcs3/Icons/restart.png differ diff --git a/rpcs3/Icons/stop.png b/rpcs3/Icons/stop.png new file mode 100644 index 0000000000..5b2833eab6 Binary files /dev/null and b/rpcs3/Icons/stop.png differ diff --git a/rpcs3/KeyboardPadHandler.h b/rpcs3/KeyboardPadHandler.h deleted file mode 100644 index 46af99852b..0000000000 --- a/rpcs3/KeyboardPadHandler.h +++ /dev/null @@ -1,61 +0,0 @@ -#pragma once - -#include "Utilities/Config.h" -#include "Emu/Io/PadHandler.h" - -struct KeyboardPadConfig final : cfg::node -{ - const std::string cfg_name = fs::get_config_dir() + "/config_kbpad.yml"; - - cfg::int32 left_stick_left{this, "Left Analog Stick Left", static_cast('A')}; - cfg::int32 left_stick_down{this, "Left Analog Stick Down", static_cast('S')}; - cfg::int32 left_stick_right{this, "Left Analog Stick Right", static_cast('D')}; - cfg::int32 left_stick_up{this, "Left Analog Stick Up", static_cast('W')}; - cfg::int32 right_stick_left{this, "Right Analog Stick Left", 313}; - cfg::int32 right_stick_down{this, "Right Analog Stick Down", 367}; - cfg::int32 right_stick_right{this, "Right Analog Stick Right", 312}; - cfg::int32 right_stick_up{this, "Right Analog Stick Up", 366}; - cfg::int32 start{this, "Start", 13}; - cfg::int32 select{this, "Select", 32}; - cfg::int32 square{this, "Square", static_cast('Z')}; - cfg::int32 cross{this, "Cross", static_cast('X')}; - cfg::int32 circle{this, "Circle", static_cast('C')}; - cfg::int32 triangle{this, "Triangle", static_cast('V')}; - cfg::int32 left{this, "Left", 314}; - cfg::int32 down{this, "Down", 317}; - cfg::int32 right{this, "Right", 316}; - cfg::int32 up{this, "Up", 315}; - cfg::int32 r1{this, "R1", static_cast('E')}; - cfg::int32 r2{this, "R2", static_cast('T')}; - cfg::int32 r3{this, "R3", static_cast('G')}; - cfg::int32 l1{this, "L1", static_cast('Q')}; - cfg::int32 l2{this, "L2", static_cast('R')}; - cfg::int32 l3{this, "L3", static_cast('F')}; - - bool load() - { - if (fs::file cfg_file{ cfg_name, fs::read }) - { - return from_string(cfg_file.to_string()); - } - - return false; - } - - void save() - { - fs::file(cfg_name, fs::rewrite).write(to_string()); - } -}; - -class KeyboardPadHandler final : public PadHandlerBase, public wxWindow -{ -public: - virtual void Init(const u32 max_connect) override; - - KeyboardPadHandler(); - - void KeyDown(wxKeyEvent& event); - void KeyUp(wxKeyEvent& event); - void LoadSettings(); -}; diff --git a/rpcs3/basic_keyboard_handler.cpp b/rpcs3/basic_keyboard_handler.cpp new file mode 100644 index 0000000000..53ba5e79c3 --- /dev/null +++ b/rpcs3/basic_keyboard_handler.cpp @@ -0,0 +1,183 @@ +#include "basic_keyboard_handler.h" + +#include + +void basic_keyboard_handler::Init(const u32 max_connect) +{ + for (u32 i = 0; i(m_keyboards.size(), max_connect); + m_info.info = 0; // Ownership of keyboard data: 0=Application, 1=System + m_info.status[0] = CELL_KB_STATUS_CONNECTED; // (TODO: Support for more keyboards) +} + +basic_keyboard_handler::basic_keyboard_handler(QObject* target, QObject* parent) : QObject(parent), m_target(target) +{ + // Adds event filter to the target to filter keyevents. + target->installEventFilter(this); +} + +bool basic_keyboard_handler::eventFilter(QObject* target, QEvent* ev) +{ + // Commenting target since I don't know how to target game window yet. + //if (target == m_target) + { + if (ev->type() == QEvent::KeyPress) + { + keyPressEvent(static_cast(ev)); + } + else if (ev->type() == QEvent::KeyRelease) + { + keyReleaseEvent(static_cast(ev)); + } + } + return false; +} + +void basic_keyboard_handler::keyPressEvent(QKeyEvent* keyEvent) +{ + Key(keyEvent->key(), 1); +} + +void basic_keyboard_handler::keyReleaseEvent(QKeyEvent* keyEvent) +{ + Key(keyEvent->key(), 0); +} + +void basic_keyboard_handler::LoadSettings() +{ + // Meta Keys + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Control, CELL_KB_MKEY_L_CTRL); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Shift, CELL_KB_MKEY_L_SHIFT); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Alt, CELL_KB_MKEY_L_ALT); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Super_L, CELL_KB_MKEY_L_WIN); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_CTRL); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_SHIFT); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_ALT); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Super_R, CELL_KB_MKEY_R_WIN); + + // CELL_KB_RAWDAT + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_NO_EVENT); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_ROLLOVER); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_POSTFAIL); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_UNDEF); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Escape, CELL_KEYC_ESCAPE); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_106_KANJI); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_CapsLock, CELL_KEYC_CAPS_LOCK); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F1, CELL_KEYC_F1); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F2, CELL_KEYC_F2); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F3, CELL_KEYC_F3); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F4, CELL_KEYC_F4); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F5, CELL_KEYC_F5); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F6, CELL_KEYC_F6); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F7, CELL_KEYC_F7); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F8, CELL_KEYC_F8); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F9, CELL_KEYC_F9); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F10, CELL_KEYC_F10); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F11, CELL_KEYC_F11); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_F12, CELL_KEYC_F12); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Print, CELL_KEYC_PRINTSCREEN); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_ScrollLock, CELL_KEYC_SCROLL_LOCK); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Pause, CELL_KEYC_PAUSE); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Insert, CELL_KEYC_INSERT); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_HOME); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_PageUp, CELL_KEYC_PAGE_UP); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Delete, CELL_KEYC_DELETE); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_End, CELL_KEYC_END); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_PageDown, CELL_KEYC_PAGE_DOWN); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Right, CELL_KEYC_RIGHT_ARROW); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Left, CELL_KEYC_LEFT_ARROW); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Down, CELL_KEYC_DOWN_ARROW); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Up, CELL_KEYC_UP_ARROW); + //m_keyboards[0].m_buttons.emplace_back(WXK_NUMLOCK, CELL_KEYC_NUM_LOCK); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_APPLICATION); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_KANA); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_HENKAN); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_MUHENKAN); + + // CELL_KB_KEYPAD + m_keyboards[0].m_buttons.emplace_back(Qt::Key_NumLock, CELL_KEYC_KPAD_NUMLOCK); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_division, CELL_KEYC_KPAD_SLASH); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_multiply, CELL_KEYC_KPAD_ASTERISK); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Minus, CELL_KEYC_KPAD_MINUS); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Plus, CELL_KEYC_KPAD_PLUS); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Enter, CELL_KEYC_KPAD_ENTER); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_1, CELL_KEYC_KPAD_1); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_2, CELL_KEYC_KPAD_2); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_3, CELL_KEYC_KPAD_3); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_4, CELL_KEYC_KPAD_4); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_5, CELL_KEYC_KPAD_5); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_6, CELL_KEYC_KPAD_6); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_7, CELL_KEYC_KPAD_7); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_8, CELL_KEYC_KPAD_8); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_9, CELL_KEYC_KPAD_9); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_0, CELL_KEYC_KPAD_0); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Delete, CELL_KEYC_KPAD_PERIOD); + + // ASCII Printable characters + m_keyboards[0].m_buttons.emplace_back('A', CELL_KEYC_A); + m_keyboards[0].m_buttons.emplace_back('B', CELL_KEYC_B); + m_keyboards[0].m_buttons.emplace_back('C', CELL_KEYC_C); + m_keyboards[0].m_buttons.emplace_back('D', CELL_KEYC_D); + m_keyboards[0].m_buttons.emplace_back('E', CELL_KEYC_E); + m_keyboards[0].m_buttons.emplace_back('F', CELL_KEYC_F); + m_keyboards[0].m_buttons.emplace_back('G', CELL_KEYC_G); + m_keyboards[0].m_buttons.emplace_back('H', CELL_KEYC_H); + m_keyboards[0].m_buttons.emplace_back('I', CELL_KEYC_I); + m_keyboards[0].m_buttons.emplace_back('J', CELL_KEYC_J); + m_keyboards[0].m_buttons.emplace_back('K', CELL_KEYC_K); + m_keyboards[0].m_buttons.emplace_back('L', CELL_KEYC_L); + m_keyboards[0].m_buttons.emplace_back('M', CELL_KEYC_M); + m_keyboards[0].m_buttons.emplace_back('N', CELL_KEYC_N); + m_keyboards[0].m_buttons.emplace_back('O', CELL_KEYC_O); + m_keyboards[0].m_buttons.emplace_back('P', CELL_KEYC_P); + m_keyboards[0].m_buttons.emplace_back('Q', CELL_KEYC_Q); + m_keyboards[0].m_buttons.emplace_back('R', CELL_KEYC_R); + m_keyboards[0].m_buttons.emplace_back('S', CELL_KEYC_S); + m_keyboards[0].m_buttons.emplace_back('T', CELL_KEYC_T); + m_keyboards[0].m_buttons.emplace_back('U', CELL_KEYC_U); + m_keyboards[0].m_buttons.emplace_back('V', CELL_KEYC_V); + m_keyboards[0].m_buttons.emplace_back('W', CELL_KEYC_W); + m_keyboards[0].m_buttons.emplace_back('X', CELL_KEYC_X); + m_keyboards[0].m_buttons.emplace_back('Y', CELL_KEYC_Y); + m_keyboards[0].m_buttons.emplace_back('Z', CELL_KEYC_Z); + + m_keyboards[0].m_buttons.emplace_back('1', CELL_KEYC_1); + m_keyboards[0].m_buttons.emplace_back('2', CELL_KEYC_2); + m_keyboards[0].m_buttons.emplace_back('3', CELL_KEYC_3); + m_keyboards[0].m_buttons.emplace_back('4', CELL_KEYC_4); + m_keyboards[0].m_buttons.emplace_back('5', CELL_KEYC_5); + m_keyboards[0].m_buttons.emplace_back('6', CELL_KEYC_6); + m_keyboards[0].m_buttons.emplace_back('7', CELL_KEYC_7); + m_keyboards[0].m_buttons.emplace_back('8', CELL_KEYC_8); + m_keyboards[0].m_buttons.emplace_back('9', CELL_KEYC_9); + m_keyboards[0].m_buttons.emplace_back('0', CELL_KEYC_0); + + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Return, CELL_KEYC_ENTER); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_ESC); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Tab, CELL_KEYC_TAB); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Space, CELL_KEYC_SPACE); + m_keyboards[0].m_buttons.emplace_back(Qt::Key_Minus, CELL_KEYC_MINUS); + m_keyboards[0].m_buttons.emplace_back('=', CELL_KEYC_EQUAL_101); + m_keyboards[0].m_buttons.emplace_back('^', CELL_KEYC_ACCENT_CIRCONFLEX_106); + //m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_LEFT_BRACKET_101); + m_keyboards[0].m_buttons.emplace_back('@', CELL_KEYC_ATMARK_106); + //m_keyboards[0].m_buttons.emplace_back(')', CELL_KEYC_RIGHT_BRACKET_101); + m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_LEFT_BRACKET_106); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_BACKSLASH_101); + m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_RIGHT_BRACKET_106); + m_keyboards[0].m_buttons.emplace_back(';', CELL_KEYC_SEMICOLON); + m_keyboards[0].m_buttons.emplace_back('"', CELL_KEYC_QUOTATION_101); + m_keyboards[0].m_buttons.emplace_back(':', CELL_KEYC_COLON_106); + m_keyboards[0].m_buttons.emplace_back(',', CELL_KEYC_COMMA); + m_keyboards[0].m_buttons.emplace_back('.', CELL_KEYC_PERIOD); + m_keyboards[0].m_buttons.emplace_back('/', CELL_KEYC_SLASH); + m_keyboards[0].m_buttons.emplace_back('\\', CELL_KEYC_BACKSLASH_106); + //m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_YEN_106); +} diff --git a/rpcs3/basic_keyboard_handler.h b/rpcs3/basic_keyboard_handler.h new file mode 100644 index 0000000000..6ce0fa8e77 --- /dev/null +++ b/rpcs3/basic_keyboard_handler.h @@ -0,0 +1,26 @@ +#ifndef BASIC_KEYBOARD_HANDLER_H +#define BASIC_KEYBOARD_HANDLER_H + +#include "stdafx.h" +#include "Emu/Io/KeyboardHandler.h" + +#include +#include + +class basic_keyboard_handler final : public QObject, public KeyboardHandlerBase +{ + Q_OBJECT +public: + virtual void Init(const u32 max_connect) override; + + explicit basic_keyboard_handler(QObject* target = nullptr, QObject* parent = nullptr); + + bool eventFilter(QObject* obj, QEvent* ev); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void LoadSettings(); +private: + QObject* m_target; +}; + +#endif diff --git a/rpcs3/basic_mouse_handler.cpp b/rpcs3/basic_mouse_handler.cpp new file mode 100644 index 0000000000..ee33db3a61 --- /dev/null +++ b/rpcs3/basic_mouse_handler.cpp @@ -0,0 +1,68 @@ +#include "basic_mouse_handler.h" + +void basic_mouse_handler::Init(const u32 max_connect) +{ + m_mice.emplace_back(Mouse()); + memset(&m_info, 0, sizeof(MouseInfo)); + m_info.max_connect = max_connect; + m_info.now_connect = std::min(m_mice.size(), (size_t)max_connect); + m_info.info = 0; // Ownership of mouse data: 0=Application, 1=System + m_info.status[0] = CELL_MOUSE_STATUS_CONNECTED; // (TODO: Support for more mice) + for (u32 i = 1; iinstallEventFilter(this); +} + +bool basic_mouse_handler::eventFilter(QObject* obj, QEvent* ev) +{ + // Commenting target since I don't know how to target game window yet. + //if (m_target == obj) + { + switch (ev->type()) + { + case QEvent::MouseButtonPress: + MouseButtonDown(static_cast(ev)); + break; + case QEvent::MouseButtonRelease: + MouseButtonUp(static_cast(ev)); + break; + case QEvent::MouseMove: + MouseMove(static_cast(ev)); + break; + case QEvent::Wheel: + MouseScroll(static_cast(ev)); + break; + } + } + return false; +} + +void basic_mouse_handler::MouseButtonDown(QMouseEvent* event) +{ + if (event->button() == Qt::LeftButton) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_1, 1); + else if (event->button() == Qt::RightButton) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_2, 1); + else if (event->button() == Qt::MiddleButton) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_3, 1); +} + +void basic_mouse_handler::MouseButtonUp(QMouseEvent* event) +{ + if (event->button() == Qt::LeftButton) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_1, 0); + else if (event->button() == Qt::RightButton) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_2, 0); + else if (event->button() == Qt::MiddleButton) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_3, 0); +} + +void basic_mouse_handler::MouseScroll(QWheelEvent* event) +{ + // Woo lads, Qt handles multidimensional scrolls. Just gonna grab the x for now. Not sure if this works. TODO: Test + MouseHandlerBase::Scroll(event->angleDelta().x()); +} + +void basic_mouse_handler::MouseMove(QMouseEvent* event) +{ + MouseHandlerBase::Move(event->x(), event->y()); +} diff --git a/rpcs3/basic_mouse_handler.h b/rpcs3/basic_mouse_handler.h new file mode 100644 index 0000000000..dd4166e994 --- /dev/null +++ b/rpcs3/basic_mouse_handler.h @@ -0,0 +1,28 @@ +#ifndef BASIC_MOUSE_HANDLER_H +#define BASIC_MOUSE_HANDLER_H + +#include "stdafx.h" +#include "Emu/Io/MouseHandler.h" + +#include +#include + +class basic_mouse_handler final : public QObject, public MouseHandlerBase +{ + Q_OBJECT +public: + virtual void Init(const u32 max_connect) override; + + basic_mouse_handler(QObject* target, QObject* parent); + + void MouseButtonDown(QMouseEvent* event); + void MouseButtonUp(QMouseEvent* event); + void MouseScroll(QWheelEvent* event); + void MouseMove(QMouseEvent* event); + + bool eventFilter(QObject* obj, QEvent* ev); +private: + QObject* m_target; +}; + +#endif diff --git a/rpcs3/cmake_modules/cotire.cmake b/rpcs3/cmake_modules/cotire.cmake index 69e9a67acb..6cf0cb66a5 100644 --- a/rpcs3/cmake_modules/cotire.cmake +++ b/rpcs3/cmake_modules/cotire.cmake @@ -3,7 +3,7 @@ # See the cotire manual for usage hints. # #============================================================================= -# Copyright 2012-2015 Sascha Kratky +# Copyright 2012-2016 Sascha Kratky # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation @@ -42,7 +42,20 @@ if (NOT CMAKE_SCRIPT_MODE_FILE) cmake_policy(POP) endif() +set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}") +set (COTIRE_CMAKE_MODULE_VERSION "1.7.9") + # activate select policies +if (POLICY CMP0025) + # Compiler id for Apple Clang is now AppleClang + cmake_policy(SET CMP0025 NEW) +endif() + +if (POLICY CMP0026) + # disallow use of the LOCATION target property + cmake_policy(SET CMP0026 NEW) +endif() + if (POLICY CMP0038) # targets may not link directly to themselves cmake_policy(SET CMP0038 NEW) @@ -93,9 +106,6 @@ if (POLICY CMP0054) cmake_policy(SET CMP0054 NEW) endif() -set (COTIRE_CMAKE_MODULE_FILE "${CMAKE_CURRENT_LIST_FILE}") -set (COTIRE_CMAKE_MODULE_VERSION "1.7.3") - include(CMakeParseArguments) include(ProcessorCount) @@ -321,7 +331,7 @@ function (cotire_get_target_usage_requirements _target _targetRequirementsVar) list (FIND _targetRequirements ${_library} _index) if (_index LESS 0) list (APPEND _targetRequirements ${_library}) - # process transitive libraries + # BFS traversal of transitive libraries get_target_property(_libraries ${_library} INTERFACE_LINK_LIBRARIES) if (_libraries) list (APPEND _librariesToProcess ${_libraries}) @@ -379,6 +389,24 @@ function (cotire_filter_compile_flags _language _flagFilter _matchedOptionsVar _ set (${_unmatchedOptionsVar} ${_unmatchedOptions} PARENT_SCOPE) endfunction() +function (cotire_is_target_supported _target _isSupportedVar) + if (NOT TARGET "${_target}") + set (${_isSupportedVar} FALSE PARENT_SCOPE) + return() + endif() + get_target_property(_imported ${_target} IMPORTED) + if (_imported) + set (${_isSupportedVar} FALSE PARENT_SCOPE) + return() + endif() + get_target_property(_targetType ${_target} TYPE) + if (NOT _targetType MATCHES "EXECUTABLE|(STATIC|SHARED|MODULE|OBJECT)_LIBRARY") + set (${_isSupportedVar} FALSE PARENT_SCOPE) + return() + endif() + set (${_isSupportedVar} TRUE PARENT_SCOPE) +endfunction() + function (cotire_get_target_compile_flags _config _language _target _flagsVar) string (TOUPPER "${_config}" _upperConfig) # collect options from CMake language variables @@ -422,22 +450,21 @@ function (cotire_get_target_compile_flags _config _language _target _flagsVar) endforeach() endif() # handle language standard properties - if (_target) - get_target_property(_targetLanguageStandard ${_target} ${_language}_STANDARD) - get_target_property(_targetLanguageExtensions ${_target} ${_language}_EXTENSIONS) - get_target_property(_targetLanguageStandardRequired ${_target} ${_language}_STANDARD_REQUIRED) - if (_targetLanguageExtensions) - if (CMAKE_${_language}${_targetLanguageExtensions}_EXTENSION_COMPILE_OPTION) - list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageExtensions}_EXTENSION_COMPILE_OPTION}") - endif() - elseif (_targetLanguageStandard) - if (_targetLanguageStandardRequired) - if (CMAKE_${_language}${_targetLanguageStandard}_STANDARD_COMPILE_OPTION) - list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageStandard}_STANDARD_COMPILE_OPTION}") + if (CMAKE_${_language}_STANDARD_DEFAULT) + # used compiler supports language standard levels + if (_target) + get_target_property(_targetLanguageStandard ${_target} ${_language}_STANDARD) + if (_targetLanguageStandard) + set (_type "EXTENSION") + get_property(_isSet TARGET ${_target} PROPERTY ${_language}_EXTENSIONS SET) + if (_isSet) + get_target_property(_targetUseLanguageExtensions ${_target} ${_language}_EXTENSIONS) + if (NOT _targetUseLanguageExtensions) + set (_type "STANDARD") + endif() endif() - else() - if (CMAKE_${_language}${_targetLanguageStandard}_EXTENSION_COMPILE_OPTION) - list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageStandard}_EXTENSION_COMPILE_OPTION}") + if (CMAKE_${_language}${_targetLanguageStandard}_${_type}_COMPILE_OPTION) + list (APPEND _compileFlags "${CMAKE_${_language}${_targetLanguageStandard}_${_type}_COMPILE_OPTION}") endif() endif() endif() @@ -454,6 +481,17 @@ function (cotire_get_target_compile_flags _config _language _target _flagsVar) endif() endif() endif() + # handle visibility target properties + if (_target) + get_target_property(_targetVisibility ${_target} ${_language}_VISIBILITY_PRESET) + if (_targetVisibility AND CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY) + list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY}${_targetVisibility}") + endif() + get_target_property(_targetVisibilityInlines ${_target} VISIBILITY_INLINES_HIDDEN) + if (_targetVisibilityInlines AND CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN) + list (APPEND _compileFlags "${CMAKE_${_language}_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN}") + endif() + endif() # platform specific flags if (APPLE) get_target_property(_architectures ${_target} OSX_ARCHITECTURES_${_upperConfig}) @@ -494,12 +532,31 @@ function (cotire_get_target_include_directories _config _language _target _inclu list (APPEND _includeDirs "${CMAKE_CURRENT_BINARY_DIR}") list (APPEND _includeDirs "${CMAKE_CURRENT_SOURCE_DIR}") endif() - # parse additional include directories from target compile flags set (_targetFlags "") cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) - cotire_filter_compile_flags("${_language}" "I" _dirs _ignore ${_targetFlags}) - if (_dirs) - list (APPEND _includeDirs ${_dirs}) + # parse additional include directories from target compile flags + if (CMAKE_INCLUDE_FLAG_${_language}) + string (STRIP "${CMAKE_INCLUDE_FLAG_${_language}}" _includeFlag) + string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") + if (_includeFlag) + set (_dirs "") + cotire_filter_compile_flags("${_language}" "${_includeFlag}" _dirs _ignore ${_targetFlags}) + if (_dirs) + list (APPEND _includeDirs ${_dirs}) + endif() + endif() + endif() + # parse additional system include directories from target compile flags + if (CMAKE_INCLUDE_SYSTEM_FLAG_${_language}) + string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" _includeFlag) + string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") + if (_includeFlag) + set (_dirs "") + cotire_filter_compile_flags("${_language}" "${_includeFlag}" _dirs _ignore ${_targetFlags}) + if (_dirs) + list (APPEND _systemIncludeDirs ${_dirs}) + endif() + endif() endif() # target include directories get_directory_property(_dirs DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" INCLUDE_DIRECTORIES) @@ -518,6 +575,21 @@ function (cotire_get_target_include_directories _config _language _target _inclu set (_linkedTargets "") cotire_get_target_usage_requirements(${_target} _linkedTargets) foreach (_linkedTarget ${_linkedTargets}) + get_target_property(_linkedTargetType ${_linkedTarget} TYPE) + if (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE AND NOT CMAKE_VERSION VERSION_LESS "3.4.0" AND + _linkedTargetType MATCHES "(STATIC|SHARED|MODULE|OBJECT)_LIBRARY") + # CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE refers to CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR + # at the time, when the target was created. These correspond to the target properties BINARY_DIR and SOURCE_DIR + # which are only available with CMake 3.4 or later. + get_target_property(_targetDirs ${_linkedTarget} BINARY_DIR) + if (_targetDirs) + list (APPEND _dirs ${_targetDirs}) + endif() + get_target_property(_targetDirs ${_linkedTarget} SOURCE_DIR) + if (_targetDirs) + list (APPEND _dirs ${_targetDirs}) + endif() + endif() get_target_property(_targetDirs ${_linkedTarget} INTERFACE_INCLUDE_DIRECTORIES) if (_targetDirs) list (APPEND _dirs ${_targetDirs}) @@ -555,6 +627,25 @@ function (cotire_get_target_include_directories _config _language _target _inclu if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES) list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES}) endif() + if (WIN32) + # convert Windows paths in include directories to CMake paths + if (_includeDirs) + set (_paths "") + foreach (_dir ${_includeDirs}) + file (TO_CMAKE_PATH "${_dir}" _path) + list (APPEND _paths "${_path}") + endforeach() + set (_includeDirs ${_paths}) + endif() + if (_systemIncludeDirs) + set (_paths "") + foreach (_dir ${_systemIncludeDirs}) + file (TO_CMAKE_PATH "${_dir}" _path) + list (APPEND _paths "${_path}") + endforeach() + set (_systemIncludeDirs ${_paths}) + endif() + endif() if (COTIRE_DEBUG AND _includeDirs) message (STATUS "Target ${_target} include dirs: ${_includeDirs}") endif() @@ -638,8 +729,23 @@ function (cotire_get_target_compiler_flags _config _language _target _compilerFl # parse target compile flags omitting compile definitions and include directives set (_targetFlags "") cotire_get_target_compile_flags("${_config}" "${_language}" "${_target}" _targetFlags) + set (_flagFilter "D") + if (CMAKE_INCLUDE_FLAG_${_language}) + string (STRIP "${CMAKE_INCLUDE_FLAG_${_language}}" _includeFlag) + string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") + if (_includeFlag) + set (_flagFilter "${_flagFilter}|${_includeFlag}") + endif() + endif() + if (CMAKE_INCLUDE_SYSTEM_FLAG_${_language}) + string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" _includeFlag) + string (REGEX REPLACE "^[-/]+" "" _includeFlag "${_includeFlag}") + if (_includeFlag) + set (_flagFilter "${_flagFilter}|${_includeFlag}") + endif() + endif() set (_compilerFlags "") - cotire_filter_compile_flags("${_language}" "[ID]" _ignore _compilerFlags ${_targetFlags}) + cotire_filter_compile_flags("${_language}" "${_flagFilter}" _ignore _compilerFlags ${_targetFlags}) if (COTIRE_DEBUG AND _compilerFlags) message (STATUS "Target ${_target} compiler flags: ${_compilerFlags}") endif() @@ -760,7 +866,10 @@ macro (cotire_set_cmd_to_prologue _cmdVar) endif() endmacro() -function (cotire_init_compile_cmd _cmdVar _language _compilerExe _compilerArg1) +function (cotire_init_compile_cmd _cmdVar _language _compilerLauncher _compilerExe _compilerArg1) + if (NOT _compilerLauncher) + set (_compilerLauncher ${CMAKE_${_language}_COMPILER_LAUNCHER}) + endif() if (NOT _compilerExe) set (_compilerExe "${CMAKE_${_language}_COMPILER}") endif() @@ -768,7 +877,12 @@ function (cotire_init_compile_cmd _cmdVar _language _compilerExe _compilerArg1) set (_compilerArg1 ${CMAKE_${_language}_COMPILER_ARG1}) endif() string (STRIP "${_compilerArg1}" _compilerArg1) - set (${_cmdVar} "${_compilerExe}" ${_compilerArg1} PARENT_SCOPE) + if ("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") + # compiler launcher is only supported for Makefile and Ninja + set (${_cmdVar} ${_compilerLauncher} "${_compilerExe}" ${_compilerArg1} PARENT_SCOPE) + else() + set (${_cmdVar} "${_compilerExe}" ${_compilerArg1} PARENT_SCOPE) + endif() endfunction() macro (cotire_add_definitions_to_cmd _cmdVar _language) @@ -781,39 +895,66 @@ macro (cotire_add_definitions_to_cmd _cmdVar _language) endforeach() endmacro() -macro (cotire_add_includes_to_cmd _cmdVar _language _includeSystemFlag _includesVar _systemIncludesVar) - foreach (_include ${${_includesVar}}) - if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") - file (TO_NATIVE_PATH "${_include}" _include) - list (APPEND ${_cmdVar} "/I${_include}") - else() - list (FIND ${_systemIncludesVar} ${_include} _index) - if(_index GREATER -1 AND NOT "${_includeSystemFlag}" STREQUAL "") - list (APPEND ${_cmdVar} "${_includeSystemFlag}${_include}") +function (cotire_add_includes_to_cmd _cmdVar _language _includesVar _systemIncludesVar) + set (_includeDirs ${${_includesVar}} ${${_systemIncludesVar}}) + if (_includeDirs) + list (REMOVE_DUPLICATES _includeDirs) + foreach (_include ${_includeDirs}) + if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel") + file (TO_NATIVE_PATH "${_include}" _include) + list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}") else() - list (APPEND ${_cmdVar} "-I${_include}") - endif() - endif() - endforeach() -endmacro() - -macro (cotire_add_frameworks_to_cmd _cmdVar _language) - if (APPLE) - set (_frameWorkDirs "") - foreach (_include ${ARGN}) - if (IS_ABSOLUTE "${_include}" AND _include MATCHES "\\.framework$") - get_filename_component(_frameWorkDir "${_include}" PATH) - list (APPEND _frameWorkDirs "${_frameWorkDir}") + set (_index -1) + if ("${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" MATCHES ".+") + list (FIND ${_systemIncludesVar} "${_include}" _index) + endif() + if (_index GREATER -1) + list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${_include}") + else() + list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}") + endif() endif() endforeach() - if (_frameWorkDirs) - list (REMOVE_DUPLICATES _frameWorkDirs) - foreach (_frameWorkDir ${_frameWorkDirs}) - list (APPEND ${_cmdVar} "-F${_frameWorkDir}") + endif() + set (${_cmdVar} ${${_cmdVar}} PARENT_SCOPE) +endfunction() + +function (cotire_add_frameworks_to_cmd _cmdVar _language _includesVar _systemIncludesVar) + if (APPLE) + set (_frameworkDirs "") + foreach (_include ${${_includesVar}}) + if (IS_ABSOLUTE "${_include}" AND _include MATCHES "\\.framework$") + get_filename_component(_frameworkDir "${_include}" DIRECTORY) + list (APPEND _frameworkDirs "${_frameworkDir}") + endif() + endforeach() + set (_systemFrameworkDirs "") + foreach (_include ${${_systemIncludesVar}}) + if (IS_ABSOLUTE "${_include}" AND _include MATCHES "\\.framework$") + get_filename_component(_frameworkDir "${_include}" DIRECTORY) + list (APPEND _systemFrameworkDirs "${_frameworkDir}") + endif() + endforeach() + if (_systemFrameworkDirs) + list (APPEND _frameworkDirs ${_systemFrameworkDirs}) + endif() + if (_frameworkDirs) + list (REMOVE_DUPLICATES _frameworkDirs) + foreach (_frameworkDir ${_frameworkDirs}) + set (_index -1) + if ("${CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG}" MATCHES ".+") + list (FIND _systemFrameworkDirs "${_frameworkDir}" _index) + endif() + if (_index GREATER -1) + list (APPEND ${_cmdVar} "${CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG}${_frameworkDir}") + else() + list (APPEND ${_cmdVar} "${CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG}${_frameworkDir}") + endif() endforeach() endif() endif() -endmacro() + set (${_cmdVar} ${${_cmdVar}} PARENT_SCOPE) +endfunction() macro (cotire_add_compile_flags_to_cmd _cmdVar) foreach (_flag ${ARGN}) @@ -1061,9 +1202,9 @@ endfunction() function (cotire_scan_includes _includesVar) set(_options "") - set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_VERSION INCLUDE_SYSTEM_FLAG LANGUAGE UNPARSED_LINES) + set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_VERSION LANGUAGE UNPARSED_LINES SCAN_RESULT) set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES - IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH) + IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH COMPILER_LAUNCHER) cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) if (NOT _option_LANGUAGE) @@ -1075,12 +1216,11 @@ function (cotire_scan_includes _includesVar) if (NOT _option_COMPILER_VERSION) set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}") endif() - set (_cmd "${_option_COMPILER_EXECUTABLE}" ${_option_COMPILER_ARG1}) - cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}") + cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_LAUNCHER}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}") cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS}) cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS}) - cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" "${_option_INCLUDE_SYSTEM_FLAG}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) - cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_INCLUDE_DIRECTORIES}) + cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) + cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) cotire_add_makedep_flags("${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}" _cmd) # only consider existing source files for scanning set (_existingSourceFiles "") @@ -1135,6 +1275,9 @@ function (cotire_scan_includes _includesVar) if (_option_UNPARSED_LINES) set (${_option_UNPARSED_LINES} ${_unparsedLines} PARENT_SCOPE) endif() + if (_option_SCAN_RESULT) + set (${_option_SCAN_RESULT} ${_result} PARENT_SCOPE) + endif() endfunction() macro (cotire_append_undefs _contentsVar) @@ -1273,10 +1416,10 @@ endfunction() function (cotire_generate_prefix_header _prefixFile) set(_options "") - set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION INCLUDE_SYSTEM_FLAG) + set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_ID COMPILER_VERSION) set(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH - IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH) + IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH COMPILER_LAUNCHER) cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) if (NOT _option_COMPILER_ID) set (_option_COMPILER_ID "${CMAKE_${_option_LANGUAGE}_ID}") @@ -1309,24 +1452,26 @@ function (cotire_generate_prefix_header _prefixFile) set (_sourceFiles ${_option_UNPARSED_ARGUMENTS}) cotire_scan_includes(_selectedHeaders ${_sourceFiles} LANGUAGE "${_option_LANGUAGE}" + COMPILER_LAUNCHER "${_option_COMPILER_LAUNCHER}" COMPILER_EXECUTABLE "${_option_COMPILER_EXECUTABLE}" + COMPILER_ARG1 "${_option_COMPILER_ARG1}" COMPILER_ID "${_option_COMPILER_ID}" COMPILER_VERSION "${_option_COMPILER_VERSION}" COMPILE_DEFINITIONS ${_option_COMPILE_DEFINITIONS} COMPILE_FLAGS ${_option_COMPILE_FLAGS} INCLUDE_DIRECTORIES ${_option_INCLUDE_DIRECTORIES} - INCLUDE_SYSTEM_FLAG ${_option_INCLUDE_SYSTEM_FLAG} SYSTEM_INCLUDE_DIRECTORIES ${_option_SYSTEM_INCLUDE_DIRECTORIES} IGNORE_PATH ${_option_IGNORE_PATH} INCLUDE_PATH ${_option_INCLUDE_PATH} IGNORE_EXTENSIONS ${_option_IGNORE_EXTENSIONS} INCLUDE_PRIORITY_PATH ${_option_INCLUDE_PRIORITY_PATH} - UNPARSED_LINES _unparsedLines) + UNPARSED_LINES _unparsedLines + SCAN_RESULT _scanResult) cotire_generate_unity_source("${_prefixFile}" PROLOGUE ${_prologue} EPILOGUE ${_epilogue} LANGUAGE "${_option_LANGUAGE}" ${_selectedHeaders}) set (_unparsedLinesFile "${_prefixFile}.log") if (_unparsedLines) - if (COTIRE_VERBOSE OR NOT _selectedHeaders) + if (COTIRE_VERBOSE OR _scanResult OR NOT _selectedHeaders) list (LENGTH _unparsedLines _skippedLineCount) message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesFile}") endif() @@ -1508,7 +1653,7 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio # -Kc++ process all source or unrecognized file types as C++ source files # -fsyntax-only check only for correct syntax # -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) - get_filename_component(_pchDir "${_pchFile}" PATH) + get_filename_component(_pchDir "${_pchFile}" DIRECTORY) get_filename_component(_pchName "${_pchFile}" NAME) set (_xLanguage_C "c-header") set (_xLanguage_CXX "c++-header") @@ -1634,7 +1779,7 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV # -include process include file as the first line of the primary source file # -Wpch-messages enable diagnostics related to pre-compiled headers (requires Intel XE 2013 Update 2) if (_pchFile) - get_filename_component(_pchDir "${_pchFile}" PATH) + get_filename_component(_pchDir "${_pchFile}" DIRECTORY) get_filename_component(_pchName "${_pchFile}" NAME) if (_flags) # append to list @@ -1668,8 +1813,8 @@ endfunction() function (cotire_precompile_prefix_header _prefixFile _pchFile _hostFile) set(_options "") - set(_oneValueArgs COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION INCLUDE_SYSTEM_FLAG LANGUAGE) - set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES SYS) + set(_oneValueArgs COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_ID COMPILER_VERSION LANGUAGE) + set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES SYS COMPILER_LAUNCHER) cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN}) if (NOT _option_LANGUAGE) set (_option_LANGUAGE "CXX") @@ -1680,11 +1825,11 @@ function (cotire_precompile_prefix_header _prefixFile _pchFile _hostFile) if (NOT _option_COMPILER_VERSION) set (_option_COMPILER_VERSION "${CMAKE_${_option_LANGUAGE}_COMPILER_VERSION}") endif() - cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}") + cotire_init_compile_cmd(_cmd "${_option_LANGUAGE}" "${_option_COMPILER_LAUNCHER}" "${_option_COMPILER_EXECUTABLE}" "${_option_COMPILER_ARG1}") cotire_add_definitions_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_COMPILE_DEFINITIONS}) cotire_add_compile_flags_to_cmd(_cmd ${_option_COMPILE_FLAGS}) - cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" "${_option_INCLUDE_SYSTEM_FLAG}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) - cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" ${_option_INCLUDE_DIRECTORIES}) + cotire_add_includes_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) + cotire_add_frameworks_to_cmd(_cmd "${_option_LANGUAGE}" _option_INCLUDE_DIRECTORIES _option_SYSTEM_INCLUDE_DIRECTORIES) cotire_add_pch_compilation_flags( "${_option_LANGUAGE}" "${_option_COMPILER_ID}" "${_option_COMPILER_VERSION}" "${_prefixFile}" "${_pchFile}" "${_hostFile}" _cmd) @@ -1731,11 +1876,33 @@ function (cotire_check_precompiled_header_support _language _target _msgVar) else() set (${_msgVar} "${_unsupportedCompiler}." PARENT_SCOPE) endif() - if (CMAKE_${_language}_COMPILER MATCHES "ccache") - if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros|pch_defines") - set (${_msgVar} - "ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"." - PARENT_SCOPE) + get_target_property(_launcher ${_target} ${_language}_COMPILER_LAUNCHER) + if (CMAKE_${_language}_COMPILER MATCHES "ccache" OR _launcher MATCHES "ccache") + if (DEFINED ENV{CCACHE_SLOPPINESS}) + if (NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "pch_defines" OR NOT "$ENV{CCACHE_SLOPPINESS}" MATCHES "time_macros") + set (${_msgVar} + "ccache requires the environment variable CCACHE_SLOPPINESS to be set to \"pch_defines,time_macros\"." + PARENT_SCOPE) + endif() + else() + if (_launcher MATCHES "ccache") + get_filename_component(_ccacheExe "${_launcher}" REALPATH) + else() + get_filename_component(_ccacheExe "${CMAKE_${_language}_COMPILER}" REALPATH) + endif() + execute_process( + COMMAND "${_ccacheExe}" "--print-config" + WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" + RESULT_VARIABLE _result + OUTPUT_VARIABLE _ccacheConfig OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET) + if (_result OR NOT + _ccacheConfig MATCHES "sloppiness.*=.*time_macros" OR NOT + _ccacheConfig MATCHES "sloppiness.*=.*pch_defines") + set (${_msgVar} + "ccache requires configuration setting \"sloppiness\" to be set to \"pch_defines,time_macros\"." + PARENT_SCOPE) + endif() endif() endif() if (APPLE) @@ -1961,14 +2128,6 @@ function (cotire_get_prefix_header_dependencies _language _target _dependencySou # depend on target source files marked with custom COTIRE_DEPENDENCY property get_target_property(_targetSourceFiles ${_target} SOURCES) cotire_get_objects_with_property_on(_dependencySources COTIRE_DEPENDENCY SOURCE ${_targetSourceFiles}) - if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") - # GCC and clang raise a fatal error if a file is not found during preprocessing - # thus we depend on target's generated source files for prefix header generation - cotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles}) - if (_generatedSources) - list (APPEND _dependencySources ${_generatedSources}) - endif() - endif() if (COTIRE_DEBUG AND _dependencySources) message (STATUS "${_language} ${_target} prefix header dependencies: ${_dependencySources}") endif() @@ -1991,7 +2150,6 @@ function (cotire_generate_target_script _language _configurations _target _targe get_target_property(COTIRE_TARGET_INCLUDE_PRIORITY_PATH ${_target} COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH) cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_PRE_UNDEFS COTIRE_TARGET_SOURCES_PRE_UNDEFS ${_targetSources}) cotire_get_source_files_undefs(COTIRE_UNITY_SOURCE_POST_UNDEFS COTIRE_TARGET_SOURCES_POST_UNDEFS ${_targetSources}) - string (STRIP "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" COTIRE_INCLUDE_SYSTEM_FLAG) set (COTIRE_TARGET_CONFIGURATION_TYPES "${_configurations}") foreach (_config ${_configurations}) string (TOUPPER "${_config}" _upperConfig) @@ -2004,6 +2162,7 @@ function (cotire_generate_target_script _language _configurations _target _targe cotire_get_source_files_compile_definitions( "${_config}" "${_language}" COTIRE_TARGET_SOURCES_COMPILE_DEFINITIONS_${_upperConfig} ${_targetSources}) endforeach() + get_target_property(COTIRE_TARGET_${_language}_COMPILER_LAUNCHER ${_target} ${_language}_COMPILER_LAUNCHER) # set up COTIRE_TARGET_SOURCES set (COTIRE_TARGET_SOURCES "") foreach (_sourceFile ${_targetSources}) @@ -2019,14 +2178,23 @@ function (cotire_generate_target_script _language _configurations _target _targe # copy variable definitions to cotire target script get_cmake_property(_vars VARIABLES) string (REGEX MATCHALL "COTIRE_[A-Za-z0-9_]+" _matchVars "${_vars}") - # remove COTIRE_VERBOSE which is passed as a CMake define on command line + # omit COTIRE_*_INIT variables + string (REGEX MATCHALL "COTIRE_[A-Za-z0-9_]+_INIT" _initVars "${_matchVars}") + if (_initVars) + list (REMOVE_ITEM _matchVars ${_initVars}) + endif() + # omit COTIRE_VERBOSE which is passed as a CMake define on command line list (REMOVE_ITEM _matchVars COTIRE_VERBOSE) set (_contents "") set (_contentsHasGeneratorExpressions FALSE) foreach (_var IN LISTS _matchVars ITEMS XCODE MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES CMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER_VERSION - CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1 + CMAKE_${_language}_COMPILER_LAUNCHER CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1 + CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_${_language}_SEP + CMAKE_INCLUDE_SYSTEM_FLAG_${_language} + CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG + CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG CMAKE_${_language}_SOURCE_FILE_EXTENSIONS) if (DEFINED ${_var}) string (REPLACE "\"" "\\\"" _value "${${_var}}") @@ -2076,18 +2244,26 @@ function (cotire_setup_pch_file_compilation _language _target _targetScript _pre if (_targetScript) cotire_set_cmd_to_prologue(_cmds) list (APPEND _cmds -P "${COTIRE_CMAKE_MODULE_FILE}" "precompile" "${_targetScript}" "${_prefixFile}" "${_pchFile}" "${_hostFile}") - file (RELATIVE_PATH _pchFileRelPath "${CMAKE_BINARY_DIR}" "${_pchFile}") + if (MSVC_IDE) + file (TO_NATIVE_PATH "${_pchFile}" _pchFileLogPath) + else() + file (RELATIVE_PATH _pchFileLogPath "${CMAKE_BINARY_DIR}" "${_pchFile}") + endif() + # make precompiled header compilation depend on the actual compiler executable used to force + # re-compilation when the compiler executable is updated. This prevents "created by a different GCC executable" + # warnings when the precompiled header is included. + get_filename_component(_realCompilerExe "${CMAKE_${_language}_COMPILER}" ABSOLUTE) if (COTIRE_DEBUG) - message (STATUS "add_custom_command: OUTPUT ${_pchFile} ${_cmds} DEPENDS ${_prefixFile} IMPLICIT_DEPENDS ${_language} ${_prefixFile}") + message (STATUS "add_custom_command: OUTPUT ${_pchFile} ${_cmds} DEPENDS ${_prefixFile} ${_realCompilerExe} IMPLICIT_DEPENDS ${_language} ${_prefixFile}") endif() set_property (SOURCE "${_pchFile}" PROPERTY GENERATED TRUE) add_custom_command( OUTPUT "${_pchFile}" COMMAND ${_cmds} - DEPENDS "${_prefixFile}" + DEPENDS "${_prefixFile}" "${_realCompilerExe}" IMPLICIT_DEPENDS ${_language} "${_prefixFile}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Building ${_language} precompiled header ${_pchFileRelPath}" + COMMENT "Building ${_language} precompiled header ${_pchFileLogPath}" VERBATIM) endif() endif() @@ -2172,19 +2348,23 @@ function (cotire_setup_combine_command _language _targetScript _joinedFile _cmds message (STATUS "add_custom_command: OUTPUT ${_joinedFile} COMMAND ${_prefixCmd} DEPENDS ${_files}") endif() set_property (SOURCE "${_joinedFile}" PROPERTY GENERATED TRUE) - file (RELATIVE_PATH _joinedFileRelPath "${CMAKE_BINARY_DIR}" "${_joinedFile}") + if (MSVC_IDE) + file (TO_NATIVE_PATH "${_joinedFile}" _joinedFileLogPath) + else() + file (RELATIVE_PATH _joinedFileLogPath "${CMAKE_BINARY_DIR}" "${_joinedFile}") + endif() get_filename_component(_joinedFileBaseName "${_joinedFile}" NAME_WE) get_filename_component(_joinedFileExt "${_joinedFile}" EXT) if (_language AND _joinedFileBaseName MATCHES "${COTIRE_UNITY_SOURCE_FILENAME_SUFFIX}$") - set (_comment "Generating ${_language} unity source ${_joinedFileRelPath}") + set (_comment "Generating ${_language} unity source ${_joinedFileLogPath}") elseif (_language AND _joinedFileBaseName MATCHES "${COTIRE_PREFIX_HEADER_FILENAME_SUFFIX}$") if (_joinedFileExt MATCHES "^\\.c") - set (_comment "Generating ${_language} prefix source ${_joinedFileRelPath}") + set (_comment "Generating ${_language} prefix source ${_joinedFileLogPath}") else() - set (_comment "Generating ${_language} prefix header ${_joinedFileRelPath}") + set (_comment "Generating ${_language} prefix header ${_joinedFileLogPath}") endif() else() - set (_comment "Generating ${_joinedFileRelPath}") + set (_comment "Generating ${_joinedFileLogPath}") endif() add_custom_command( OUTPUT "${_joinedFile}" @@ -2285,7 +2465,11 @@ function (cotire_setup_unity_generation_commands _language _target _targetScript # CMake 3.1.0 supports generator expressions in arguments to DEPENDS set (_unityCmdDepends "${_targetConfigScript}") endif() - file (RELATIVE_PATH _unityFileRelPath "${CMAKE_BINARY_DIR}" "${_unityFile}") + if (MSVC_IDE) + file (TO_NATIVE_PATH "${_unityFile}" _unityFileLogPath) + else() + file (RELATIVE_PATH _unityFileLogPath "${CMAKE_BINARY_DIR}" "${_unityFile}") + endif() if (COTIRE_DEBUG) message (STATUS "add_custom_command: OUTPUT ${_unityFile} COMMAND ${_unityCmd} DEPENDS ${_unityCmdDepends}") endif() @@ -2293,41 +2477,59 @@ function (cotire_setup_unity_generation_commands _language _target _targetScript OUTPUT "${_unityFile}" COMMAND ${_unityCmd} DEPENDS ${_unityCmdDepends} - COMMENT "Generating ${_language} unity source ${_unityFileRelPath}" + COMMENT "Generating ${_language} unity source ${_unityFileLogPath}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" VERBATIM) list (APPEND ${_cmdsVar} COMMAND ${_unityCmd}) endforeach() - list (LENGTH _unityFiles _numberOfUnityFiles) - if (_numberOfUnityFiles GREATER 1) - # create a joint unity file from all unity file segments - cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFile) - cotire_setup_combine_command(${_language} "${_targetConfigScript}" "${_unityFile}" ${_cmdsVar} ${_unityFiles}) - endif() set (${_cmdsVar} ${${_cmdsVar}} PARENT_SCOPE) endfunction() -function (cotire_setup_prefix_generation_command _language _target _targetScript _prefixFile _unityFile _cmdsVar) +function (cotire_setup_prefix_generation_command _language _target _targetScript _prefixFile _unityFiles _cmdsVar) set (_sourceFiles ${ARGN}) set (_dependencySources "") cotire_get_prefix_header_dependencies(${_language} ${_target} _dependencySources ${_sourceFiles}) cotire_set_cmd_to_prologue(_prefixCmd) - list (APPEND _prefixCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "prefix" "${_targetScript}" "${_prefixFile}" "${_unityFile}") + list (APPEND _prefixCmd -P "${COTIRE_CMAKE_MODULE_FILE}" "prefix" "${_targetScript}" "${_prefixFile}" ${_unityFiles}) set_property (SOURCE "${_prefixFile}" PROPERTY GENERATED TRUE) + # make prefix header generation depend on the actual compiler executable used to force + # re-generation when the compiler executable is updated. This prevents "file not found" + # errors for compiler version specific system header files. + get_filename_component(_realCompilerExe "${CMAKE_${_language}_COMPILER}" ABSOLUTE) if (COTIRE_DEBUG) - message (STATUS "add_custom_command: OUTPUT ${_prefixFile} COMMAND ${_prefixCmd} DEPENDS ${_unityFile} ${_dependencySources}") + message (STATUS "add_custom_command: OUTPUT ${_prefixFile} COMMAND ${_prefixCmd} DEPENDS ${_unityFile} ${_dependencySources} ${_realCompilerExe}") + endif() + if (MSVC_IDE) + file (TO_NATIVE_PATH "${_prefixFile}" _prefixFileLogPath) + else() + file (RELATIVE_PATH _prefixFileLogPath "${CMAKE_BINARY_DIR}" "${_prefixFile}") endif() - file (RELATIVE_PATH _prefixFileRelPath "${CMAKE_BINARY_DIR}" "${_prefixFile}") get_filename_component(_prefixFileExt "${_prefixFile}" EXT) if (_prefixFileExt MATCHES "^\\.c") - set (_comment "Generating ${_language} prefix source ${_prefixFileRelPath}") + set (_comment "Generating ${_language} prefix source ${_prefixFileLogPath}") else() - set (_comment "Generating ${_language} prefix header ${_prefixFileRelPath}") + set (_comment "Generating ${_language} prefix header ${_prefixFileLogPath}") + endif() + # prevent pre-processing errors upon generating the prefix header when a target's generated include file does not yet exist + # we do not add a file-level dependency for the target's generated files though, because we only want to depend on their existence + # thus we make the prefix header generation depend on a custom helper target which triggers the generation of the files + set (_preTargetName "${_target}${COTIRE_PCH_TARGET_SUFFIX}_pre") + if (TARGET ${_preTargetName}) + # custom helper target has already been generated while processing a different language + list (APPEND _dependencySources ${_preTargetName}) + else() + get_target_property(_targetSourceFiles ${_target} SOURCES) + cotire_get_objects_with_property_on(_generatedSources GENERATED SOURCE ${_targetSourceFiles}) + if (_generatedSources) + add_custom_target("${_preTargetName}" DEPENDS ${_generatedSources}) + cotire_init_target("${_preTargetName}") + list (APPEND _dependencySources ${_preTargetName}) + endif() endif() add_custom_command( OUTPUT "${_prefixFile}" "${_prefixFile}.log" COMMAND ${_prefixCmd} - DEPENDS "${_unityFile}" ${_dependencySources} + DEPENDS ${_unityFiles} ${_dependencySources} "${_realCompilerExe}" COMMENT "${_comment}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" VERBATIM) @@ -2343,17 +2545,9 @@ function (cotire_setup_prefix_generation_from_unity_command _language _target _t else() set (_prefixSourceFile "${_prefixFile}") endif() - list (LENGTH _unityFiles _numberOfUnityFiles) - if (_numberOfUnityFiles GREATER 1) - cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFile) - cotire_setup_prefix_generation_command( - ${_language} ${_target} "${_targetScript}" - "${_prefixSourceFile}" "${_unityFile}" ${_cmdsVar} ${_sourceFiles}) - else() - cotire_setup_prefix_generation_command( - ${_language} ${_target} "${_targetScript}" - "${_prefixSourceFile}" "${_unityFiles}" ${_cmdsVar} ${_sourceFiles}) - endif() + cotire_setup_prefix_generation_command( + ${_language} ${_target} "${_targetScript}" + "${_prefixSourceFile}" "${_unityFiles}" ${_cmdsVar} ${_sourceFiles}) if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang") # set up generation of a prefix source file which includes the prefix header cotire_setup_combine_command(${_language} "${_targetScript}" "${_prefixFile}" _cmds ${_prefixSourceFile}) @@ -2496,10 +2690,12 @@ function (cotire_choose_target_languages _target _targetLanguagesVar _wholeTarge set (${_targetLanguagesVar} "" PARENT_SCOPE) return() endif() - if (_targetUsePCH AND "${_language}" MATCHES "^C|CXX$") - cotire_check_precompiled_header_support("${_language}" "${_target}" _disableMsg) - if (_disableMsg) - set (_targetUsePCH FALSE) + if (_targetUsePCH AND "${_language}" MATCHES "^C|CXX$" AND DEFINED CMAKE_${_language}_COMPILER_ID) + if (CMAKE_${_language}_COMPILER_ID) + cotire_check_precompiled_header_support("${_language}" "${_target}" _disableMsg) + if (_disableMsg) + set (_targetUsePCH FALSE) + endif() endif() endif() set (_sourceFiles "") @@ -2614,14 +2810,22 @@ function (cotire_process_target_language _language _configurations _target _whol endif() cotire_generate_target_script( ${_language} "${_configurations}" ${_target} _targetScript _targetConfigScript ${_unitySourceFiles}) + # set up unity files for parallel compilation cotire_compute_unity_max_number_of_includes(${_target} _maxIncludes ${_unitySourceFiles}) cotire_make_unity_source_file_paths(${_language} ${_target} ${_maxIncludes} _unityFiles ${_unitySourceFiles}) - if (NOT _unityFiles) + list (LENGTH _unityFiles _numberOfUnityFiles) + if (_numberOfUnityFiles EQUAL 0) return() + elseif (_numberOfUnityFiles GREATER 1) + cotire_setup_unity_generation_commands( + ${_language} ${_target} "${_targetScript}" "${_targetConfigScript}" "${_unityFiles}" _cmds ${_unitySourceFiles}) endif() + # set up single unity file for prefix header generation + cotire_make_single_unity_source_file_path(${_language} ${_target} _unityFile) cotire_setup_unity_generation_commands( - ${_language} ${_target} "${_targetScript}" "${_targetConfigScript}" "${_unityFiles}" _cmds ${_unitySourceFiles}) + ${_language} ${_target} "${_targetScript}" "${_targetConfigScript}" "${_unityFile}" _cmds ${_unitySourceFiles}) cotire_make_prefix_file_path(${_language} ${_target} _prefixFile) + # set up prefix header if (_prefixFile) # check for user provided prefix header files get_property(_prefixHeaderFiles TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER_INIT) @@ -2630,7 +2834,7 @@ function (cotire_process_target_language _language _configurations _target _whol ${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" _cmds ${_prefixHeaderFiles}) else() cotire_setup_prefix_generation_from_unity_command( - ${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_unityFiles}" _cmds ${_unitySourceFiles}) + ${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_unityFile}" _cmds ${_unitySourceFiles}) endif() # check if selected language has enough sources at all list (LENGTH _sourceFiles _numberOfSources) @@ -2706,6 +2910,16 @@ function (cotire_setup_pch_target _languages _configurations _target) endif() endfunction() +function (cotire_filter_object_libraries _target _objectLibrariesVar) + set (_objectLibraries "") + foreach (_source ${ARGN}) + if (_source MATCHES "^\\$$") + list (APPEND _objectLibraries "${_source}") + endif() + endforeach() + set (${_objectLibrariesVar} ${_objectLibraries} PARENT_SCOPE) +endfunction() + function (cotire_collect_unity_target_sources _target _languages _unityTargetSourcesVar) get_target_property(_targetSourceFiles ${_target} SOURCES) set (_unityTargetSources ${_targetSourceFiles}) @@ -2724,6 +2938,15 @@ function (cotire_collect_unity_target_sources _target _languages _unityTargetSou list (APPEND _unityTargetSources ${_unityFiles}) endif() endforeach() + get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT) + if ("${_linkLibrariesStrategy}" MATCHES "^COPY_UNITY$") + cotire_filter_object_libraries(${_target} _objectLibraries ${_targetSourceFiles}) + if (_objectLibraries) + cotire_map_libraries("${_linkLibrariesStrategy}" _unityObjectLibraries ${_objectLibraries}) + list (REMOVE_ITEM _unityTargetSources ${_objectLibraries}) + list (APPEND _unityTargetSources ${_unityObjectLibraries}) + endif() + endif() set (${_unityTargetSourcesVar} ${_unityTargetSources} PARENT_SCOPE) endfunction() @@ -2766,8 +2989,13 @@ function (cotire_setup_unity_build_target _languages _configurations _target) if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc) # if the original target sources are subject to CMake's automatic Qt processing, # also include implicitly generated _automoc.cpp file - list (APPEND _unityTargetSources "${_target}_automoc.cpp") - set_property (SOURCE "${_target}_automoc.cpp" PROPERTY GENERATED TRUE) + if (CMAKE_VERSION VERSION_LESS "3.8.0") + list (APPEND _unityTargetSources "${_target}_automoc.cpp") + set_property (SOURCE "${_target}_automoc.cpp" PROPERTY GENERATED TRUE) + else() + list (APPEND _unityTargetSources "${_target}_autogen/moc_compilation.cpp") + set_property (SOURCE "${_target}_autogen/moc_compilation.cpp" PROPERTY GENERATED TRUE) + endif() endif() # prevent AUTOMOC, AUTOUIC and AUTORCC properties from being set when the unity target is created set (CMAKE_AUTOMOC OFF) @@ -2782,9 +3010,20 @@ function (cotire_setup_unity_build_target _languages _configurations _target) else() add_library(${_unityTargetName} ${_unityTargetSubType} EXCLUDE_FROM_ALL ${_unityTargetSources}) endif() - if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc) - # depend on the original target's implicity generated _automoc target - add_dependencies(${_unityTargetName} ${_target}_automoc) + if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio") + # depend on original target's automoc target, if it exists + if (TARGET ${_target}_automoc) + add_dependencies(${_unityTargetName} ${_target}_automoc) + endif() + else() + if (_targetAutoMoc OR _targetAutoUic OR _targetAutoRcc) + # depend on the original target's implicity generated _automoc target + if (CMAKE_VERSION VERSION_LESS "3.8.0") + add_dependencies(${_unityTargetName} ${_target}_automoc) + else() + add_dependencies(${_unityTargetName} ${_target}_autogen) + endif() + endif() endif() # copy output location properties set (_outputDirProperties @@ -2837,7 +3076,10 @@ function (cotire_setup_unity_build_target _languages _configurations _target) INCLUDE_DIRECTORIES INTERPROCEDURAL_OPTIMIZATION INTERPROCEDURAL_OPTIMIZATION_ POSITION_INDEPENDENT_CODE - C_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN) + C_COMPILER_LAUNCHER CXX_COMPILER_LAUNCHER + C_INCLUDE_WHAT_YOU_USE CXX_INCLUDE_WHAT_YOU_USE + C_VISIBILITY_PRESET CXX_VISIBILITY_PRESET VISIBILITY_INLINES_HIDDEN + C_CLANG_TIDY CXX_CLANG_TIDY) # copy compile features cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} C_EXTENSIONS C_STANDARD C_STANDARD_REQUIRED @@ -2860,28 +3102,41 @@ function (cotire_setup_unity_build_target _languages _configurations _target) LINK_INTERFACE_MULTIPLICITY LINK_INTERFACE_MULTIPLICITY_ LINK_SEARCH_START_STATIC LINK_SEARCH_END_STATIC STATIC_LIBRARY_FLAGS STATIC_LIBRARY_FLAGS_ - NO_SONAME SOVERSION VERSION) + NO_SONAME SOVERSION VERSION + LINK_WHAT_YOU_USE) # copy cmake stuff cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} IMPLICIT_DEPENDS_INCLUDE_TRANSFORM RULE_LAUNCH_COMPILE RULE_LAUNCH_CUSTOM RULE_LAUNCH_LINK) # copy Apple platform specific stuff cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} - BUNDLE BUNDLE_EXTENSION FRAMEWORK INSTALL_NAME_DIR MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST - MACOSX_FRAMEWORK_INFO_PLIST MACOSX_RPATH OSX_ARCHITECTURES - OSX_ARCHITECTURES_ PRIVATE_HEADER PUBLIC_HEADER RESOURCE) + BUNDLE BUNDLE_EXTENSION FRAMEWORK FRAMEWORK_VERSION INSTALL_NAME_DIR + MACOSX_BUNDLE MACOSX_BUNDLE_INFO_PLIST MACOSX_FRAMEWORK_INFO_PLIST MACOSX_RPATH + OSX_ARCHITECTURES OSX_ARCHITECTURES_ PRIVATE_HEADER PUBLIC_HEADER RESOURCE XCTEST + IOS_INSTALL_COMBINED) # copy Windows platform specific stuff cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} GNUtoMS COMPILE_PDB_NAME COMPILE_PDB_NAME_ COMPILE_PDB_OUTPUT_DIRECTORY COMPILE_PDB_OUTPUT_DIRECTORY_ PDB_NAME PDB_NAME_ PDB_OUTPUT_DIRECTORY PDB_OUTPUT_DIRECTORY_ - VS_DOTNET_REFERENCES VS_GLOBAL_KEYWORD VS_GLOBAL_PROJECT_TYPES VS_GLOBAL_ROOTNAMESPACE - VS_KEYWORD VS_SCC_AUXPATH VS_SCC_LOCALPATH VS_SCC_PROJECTNAME VS_SCC_PROVIDER - VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES VS_WINRT_COMPONENT - VS_DOTNET_TARGET_FRAMEWORK_VERSION WIN32_EXECUTABLE) + VS_DESKTOP_EXTENSIONS_VERSION VS_DOTNET_REFERENCES VS_DOTNET_TARGET_FRAMEWORK_VERSION + VS_GLOBAL_KEYWORD VS_GLOBAL_PROJECT_TYPES VS_GLOBAL_ROOTNAMESPACE + VS_IOT_EXTENSIONS_VERSION VS_IOT_STARTUP_TASK + VS_KEYWORD VS_MOBILE_EXTENSIONS_VERSION + VS_SCC_AUXPATH VS_SCC_LOCALPATH VS_SCC_PROJECTNAME VS_SCC_PROVIDER + VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION + VS_WINRT_COMPONENT VS_WINRT_EXTENSIONS VS_WINRT_REFERENCES + WIN32_EXECUTABLE WINDOWS_EXPORT_ALL_SYMBOLS + DEPLOYMENT_REMOTE_DIRECTORY VS_CONFIGURATION_TYPE + VS_SDK_REFERENCES) # copy Android platform specific stuff cotire_copy_set_properites("${_configurations}" TARGET ${_target} ${_unityTargetName} - ANDROID_API ANDROID_API_MIN ANDROID_GUI) + ANDROID_API ANDROID_API_MIN ANDROID_GUI + ANDROID_ANT_ADDITIONAL_OPTIONS ANDROID_ARCH ANDROID_ASSETS_DIRECTORIES + ANDROID_JAR_DEPENDENCIES ANDROID_JAR_DIRECTORIES ANDROID_JAVA_SOURCE_DIR + ANDROID_NATIVE_LIB_DEPENDENCIES ANDROID_NATIVE_LIB_DIRECTORIES + ANDROID_PROCESS_MAX ANDROID_PROGUARD ANDROID_PROGUARD_CONFIG_PATH + ANDROID_SECURE_PROPS_PATH ANDROID_SKIP_ANT_STEP ANDROID_STL_TYPE) # use output name from original target get_target_property(_targetOutputName ${_unityTargetName} OUTPUT_NAME) if (NOT _targetOutputName) @@ -2911,10 +3166,16 @@ function (cotire_target _target) if (NOT _option_CONFIGURATIONS) cotire_get_configuration_types(_option_CONFIGURATIONS) endif() - # trivial checks - get_target_property(_imported ${_target} IMPORTED) - if (_imported) - message (WARNING "cotire: imported target ${_target} cannot be cotired.") + # check if cotire can be applied to target at all + cotire_is_target_supported(${_target} _isSupported) + if (NOT _isSupported) + get_target_property(_imported ${_target} IMPORTED) + get_target_property(_targetType ${_target} TYPE) + if (_imported) + message (WARNING "cotire: imported ${_targetType} target ${_target} cannot be cotired.") + else() + message (STATUS "cotire: ${_targetType} target ${_target} cannot be cotired.") + endif() return() endif() # resolve alias @@ -2979,11 +3240,35 @@ endfunction(cotire_target) function (cotire_map_libraries _strategy _mappedLibrariesVar) set (_mappedLibraries "") foreach (_library ${ARGN}) - if (TARGET "${_library}" AND "${_strategy}" MATCHES "COPY_UNITY") - # use target's corresponding unity target, if available - get_target_property(_libraryUnityTargetName ${_library} COTIRE_UNITY_TARGET_NAME) - if (TARGET "${_libraryUnityTargetName}") - list (APPEND _mappedLibraries "${_libraryUnityTargetName}") + if (_library MATCHES "^\\$$") + set (_libraryName "${CMAKE_MATCH_1}") + set (_linkOnly TRUE) + set (_objectLibrary FALSE) + elseif (_library MATCHES "^\\$$") + set (_libraryName "${CMAKE_MATCH_1}") + set (_linkOnly FALSE) + set (_objectLibrary TRUE) + else() + set (_libraryName "${_library}") + set (_linkOnly FALSE) + set (_objectLibrary FALSE) + endif() + if ("${_strategy}" MATCHES "COPY_UNITY") + cotire_is_target_supported(${_libraryName} _isSupported) + if (_isSupported) + # use target's corresponding unity target, if available + get_target_property(_libraryUnityTargetName ${_libraryName} COTIRE_UNITY_TARGET_NAME) + if (TARGET "${_libraryUnityTargetName}") + if (_linkOnly) + list (APPEND _mappedLibraries "$") + elseif (_objectLibrary) + list (APPEND _mappedLibraries "$") + else() + list (APPEND _mappedLibraries "${_libraryUnityTargetName}") + endif() + else() + list (APPEND _mappedLibraries "${_library}") + endif() else() list (APPEND _mappedLibraries "${_library}") endif() @@ -2996,6 +3281,10 @@ function (cotire_map_libraries _strategy _mappedLibrariesVar) endfunction() function (cotire_target_link_libraries _target) + cotire_is_target_supported(${_target} _isSupported) + if (NOT _isSupported) + return() + endif() get_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME) if (TARGET "${_unityTargetName}") get_target_property(_linkLibrariesStrategy ${_target} COTIRE_UNITY_LINK_LIBRARIES_INIT) @@ -3003,21 +3292,21 @@ function (cotire_target_link_libraries _target) message (STATUS "unity target ${_unityTargetName} link strategy: ${_linkLibrariesStrategy}") endif() if ("${_linkLibrariesStrategy}" MATCHES "^(COPY|COPY_UNITY)$") - set (_unityLinkLibraries "") get_target_property(_linkLibraries ${_target} LINK_LIBRARIES) if (_linkLibraries) - list (APPEND _unityLinkLibraries ${_linkLibraries}) + cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkLibraries ${_linkLibraries}) + set_target_properties(${_unityTargetName} PROPERTIES LINK_LIBRARIES "${_unityLinkLibraries}") + if (COTIRE_DEBUG) + message (STATUS "unity target ${_unityTargetName} link libraries: ${_unityLinkLibraries}") + endif() endif() get_target_property(_interfaceLinkLibraries ${_target} INTERFACE_LINK_LIBRARIES) if (_interfaceLinkLibraries) - list (APPEND _unityLinkLibraries ${_interfaceLinkLibraries}) - endif() - cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkLibraries ${_unityLinkLibraries}) - if (COTIRE_DEBUG) - message (STATUS "unity target ${_unityTargetName} libraries: ${_unityLinkLibraries}") - endif() - if (_unityLinkLibraries) - target_link_libraries(${_unityTargetName} ${_unityLinkLibraries}) + cotire_map_libraries("${_linkLibrariesStrategy}" _unityLinkInterfaceLibraries ${_interfaceLinkLibraries}) + set_target_properties(${_unityTargetName} PROPERTIES INTERFACE_LINK_LIBRARIES "${_unityLinkInterfaceLibraries}") + if (COTIRE_DEBUG) + message (STATUS "unity target ${_unityTargetName} interface link libraries: ${_unityLinkInterfaceLibraries}") + endif() endif() endif() endif() @@ -3032,7 +3321,7 @@ function (cotire_cleanup _binaryDir _cotireIntermediateDirName _targetName) # filter files in intermediate directory set (_filesToRemove "") foreach (_file ${_cotireFiles}) - get_filename_component(_dir "${_file}" PATH) + get_filename_component(_dir "${_file}" DIRECTORY) get_filename_component(_dirName "${_dir}" NAME) if ("${_dirName}" STREQUAL "${_cotireIntermediateDirName}") list (APPEND _filesToRemove "${_file}") @@ -3156,7 +3445,6 @@ if (CMAKE_SCRIPT_MODE_FILE) message (STATUS "COTIRE_BUILD_TYPE=${COTIRE_BUILD_TYPE} not cotired (${COTIRE_TARGET_CONFIGURATION_TYPES})") endif() set (_sources "") - set (_sourceLocations "") set (_sourcesDefinitions "") endif() set (_targetPreUndefs ${COTIRE_TARGET_PRE_UNDEFS}) @@ -3205,6 +3493,7 @@ if (CMAKE_SCRIPT_MODE_FILE) cotire_generate_prefix_header( "${COTIRE_ARGV3}" ${_files} + COMPILER_LAUNCHER "${COTIRE_TARGET_${COTIRE_TARGET_LANGUAGE}_COMPILER_LAUNCHER}" COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}" COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1} COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}" @@ -3214,7 +3503,6 @@ if (CMAKE_SCRIPT_MODE_FILE) INCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH} IGNORE_EXTENSIONS "${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}" INCLUDE_PRIORITY_PATH ${COTIRE_TARGET_INCLUDE_PRIORITY_PATH} - INCLUDE_SYSTEM_FLAG "${COTIRE_INCLUDE_SYSTEM_FLAG}" INCLUDE_DIRECTORIES ${_includeDirs} SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs} COMPILE_DEFINITIONS ${_compileDefinitions} @@ -3232,12 +3520,12 @@ if (CMAKE_SCRIPT_MODE_FILE) cotire_precompile_prefix_header( "${COTIRE_ARGV3}" "${COTIRE_ARGV4}" "${COTIRE_ARGV5}" + COMPILER_LAUNCHER "${COTIRE_TARGET_${COTIRE_TARGET_LANGUAGE}_COMPILER_LAUNCHER}" COMPILER_EXECUTABLE "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER}" COMPILER_ARG1 ${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ARG1} COMPILER_ID "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_ID}" COMPILER_VERSION "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}" LANGUAGE "${COTIRE_TARGET_LANGUAGE}" - INCLUDE_SYSTEM_FLAG "${COTIRE_INCLUDE_SYSTEM_FLAG}" INCLUDE_DIRECTORIES ${_includeDirs} SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs} COMPILE_DEFINITIONS ${_compileDefinitions} @@ -3358,9 +3646,9 @@ else() endif() if (MSVC) # MSVC default PCH memory scaling factor of 100 percent (75 MB) is too small for template heavy C++ code - # use a bigger default factor of 140 percent (105 MB) + # use a bigger default factor of 170 percent (128 MB) if (NOT DEFINED COTIRE_PCH_MEMORY_SCALING_FACTOR) - set (COTIRE_PCH_MEMORY_SCALING_FACTOR "140") + set (COTIRE_PCH_MEMORY_SCALING_FACTOR "170") endif() endif() if (NOT COTIRE_UNITY_BUILD_TARGET_SUFFIX) diff --git a/rpcs3/DS4PadHandler.cpp b/rpcs3/ds4_pad_handler.cpp similarity index 96% rename from rpcs3/DS4PadHandler.cpp rename to rpcs3/ds4_pad_handler.cpp index 6ff4e1a9e3..ae628bbede 100644 --- a/rpcs3/DS4PadHandler.cpp +++ b/rpcs3/ds4_pad_handler.cpp @@ -1,7 +1,6 @@ #include "stdafx.h" -#include "stdafx_gui.h" #include "Emu/System.h" -#include "DS4PadHandler.h" +#include "ds4_pad_handler.h" #include #include @@ -123,12 +122,12 @@ namespace } } -DS4PadHandler::~DS4PadHandler() +ds4_pad_handler::~ds4_pad_handler() { Close(); } -void DS4PadHandler::Init(const u32 max_connect) +void ds4_pad_handler::Init(const u32 max_connect) { std::memset(&m_info, 0, sizeof m_info); m_info.max_connect = max_connect; @@ -182,11 +181,11 @@ void DS4PadHandler::Init(const u32 max_connect) pad.m_vibrateMotors.emplace_back(false, 0); } - ds4Thread = std::make_shared(); + ds4Thread = std::make_shared(); ds4Thread->on_init(ds4Thread); } -PadInfo& DS4PadHandler::GetInfo() +PadInfo& ds4_pad_handler::GetInfo() { if (ds4Thread) { @@ -221,7 +220,7 @@ PadInfo& DS4PadHandler::GetInfo() return m_info; } -std::vector& DS4PadHandler::GetPads() +std::vector& ds4_pad_handler::GetPads() { if (ds4Thread) ProcessData(); @@ -229,7 +228,7 @@ std::vector& DS4PadHandler::GetPads() return m_pads; } -void DS4PadHandler::Close() +void ds4_pad_handler::Close() { if (ds4Thread) ds4Thread.reset(); @@ -237,7 +236,7 @@ void DS4PadHandler::Close() m_pads.clear(); } -void DS4PadHandler::ProcessData() +void ds4_pad_handler::ProcessData() { if (!ds4Thread) @@ -395,7 +394,7 @@ void DS4PadHandler::ProcessData() pad.m_buttons[12 + i - 4].m_value = pressed ? 255 : 0; } - // these values come already calibrated from our DS4Thread, + // these values come already calibrated from our ds4Thread, // all we need to do is convert to ds3 range // accel @@ -426,7 +425,7 @@ void DS4PadHandler::ProcessData() } } -void DS4PadHandler::SetRumble(const u32 pad, u8 largeMotor, bool smallMotor) +void ds4_pad_handler::SetRumble(const u32 pad, u8 largeMotor, bool smallMotor) { if (pad > m_pads.size()) return; @@ -440,7 +439,7 @@ void DS4PadHandler::SetRumble(const u32 pad, u8 largeMotor, bool smallMotor) ds4Thread->SetRumbleData(pad, largeMotor, smallMotor ? 255 : 0); } -void DS4Thread::SetRumbleData(u32 port, u8 largeVibrate, u8 smallVibrate) +void ds4_thread::SetRumbleData(u32 port, u8 largeVibrate, u8 smallVibrate) { semaphore_lock lock(mutex); @@ -460,7 +459,7 @@ void DS4Thread::SetRumbleData(u32 port, u8 largeVibrate, u8 smallVibrate) } } -std::array DS4Thread::GetConnectedControllers() +std::array ds4_thread::GetConnectedControllers() { std::array rtnData{}; int i = 0; @@ -473,7 +472,7 @@ std::array DS4Thread::GetConnectedControllers() return rtnData; } -std::array, MAX_GAMEPADS> DS4Thread::GetControllerData() +std::array, MAX_GAMEPADS> ds4_thread::GetControllerData() { std::array, MAX_GAMEPADS> rtnData; @@ -486,7 +485,7 @@ std::array, MAX_GAMEPADS> DS4Thread::GetControllerData() return rtnData; } -bool DS4Thread::GetCalibrationData(DS4Device* ds4Dev) +bool ds4_thread::GetCalibrationData(DS4Device* ds4Dev) { std::array buf; if (ds4Dev->btCon) @@ -574,7 +573,7 @@ bool DS4Thread::GetCalibrationData(DS4Device* ds4Dev) return true; } -void DS4Thread::CheckAddDevice(hid_device* hidDevice, hid_device_info* hidDevInfo) +void ds4_thread::CheckAddDevice(hid_device* hidDevice, hid_device_info* hidDevInfo) { std::string serial = ""; DS4Device ds4Dev; @@ -607,7 +606,7 @@ void DS4Thread::CheckAddDevice(hid_device* hidDevice, hid_device_info* hidDevInf controllers.emplace(serial, ds4Dev); } -void DS4Thread::on_init(const std::shared_ptr& _this) +void ds4_thread::on_init(const std::shared_ptr& _this) { const int res = hid_init(); if (res != 0) @@ -639,7 +638,7 @@ void DS4Thread::on_init(const std::shared_ptr& _this) named_thread::on_init(_this); } -DS4Thread::~DS4Thread() +ds4_thread::~ds4_thread() { for (auto & controller : controllers) { @@ -649,7 +648,7 @@ DS4Thread::~DS4Thread() hid_exit(); } -void DS4Thread::SendVibrateData(const DS4Device& device) +void ds4_thread::SendVibrateData(const DS4Device& device) { std::array outputBuf{0}; // write rumble state @@ -689,7 +688,7 @@ void DS4Thread::SendVibrateData(const DS4Device& device) } } -void DS4Thread::on_task() +void ds4_thread::on_task() { while (!Emu.IsStopped()) { diff --git a/rpcs3/DS4PadHandler.h b/rpcs3/ds4_pad_handler.h similarity index 91% rename from rpcs3/DS4PadHandler.h rename to rpcs3/ds4_pad_handler.h index 74c712b48a..bcb0daed12 100644 --- a/rpcs3/DS4PadHandler.h +++ b/rpcs3/ds4_pad_handler.h @@ -8,7 +8,8 @@ const u32 MAX_GAMEPADS = 7; -class DS4Thread final : public named_thread + +class ds4_thread final : public named_thread { private: enum DS4CalibIndex @@ -70,9 +71,11 @@ public: void SetRumbleData(u32 port, u8 largeVibrate, u8 smallVibrate); - DS4Thread() = default; - ~DS4Thread(); + ds4_thread() = default; + + + ~ds4_thread(); private: bool GetCalibrationData(DS4Device* ds4Device); @@ -93,11 +96,13 @@ private: } }; -class DS4PadHandler final : public PadHandlerBase + +class ds4_pad_handler final : public PadHandlerBase { public: - DS4PadHandler() {} - ~DS4PadHandler(); + + ds4_pad_handler() {} + ~ds4_pad_handler(); void Init(const u32 max_connect) override; void Close(); @@ -112,5 +117,6 @@ private: // holds internal controller state change std::array last_connection_status = {}; - std::shared_ptr ds4Thread; + + std::shared_ptr ds4Thread; }; diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index c97027e4a1..ab606e74ee 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -61,7 +61,7 @@ Use - ..\llvm\include;..\llvm_build\include; + ..\3rdparty\zlib;..\llvm\include;..\llvm_build\include; %windir%\sysnative\cmd.exe /c "$(SolutionDir)\Utilities\git-version-gen.cmd" diff --git a/rpcs3/KeyboardPadHandler.cpp b/rpcs3/keyboard_pad_handler.cpp similarity index 76% rename from rpcs3/KeyboardPadHandler.cpp rename to rpcs3/keyboard_pad_handler.cpp index 777572b562..3c5202e6d4 100644 --- a/rpcs3/KeyboardPadHandler.cpp +++ b/rpcs3/keyboard_pad_handler.cpp @@ -1,12 +1,10 @@ #include "stdafx.h" -#include "stdafx_gui.h" -#include "rpcs3.h" -#include "KeyboardPadHandler.h" +#include "keyboard_pad_handler.h" -KeyboardPadConfig g_kbpad_config; +keyboard_pad_config g_kbpad_config; -void KeyboardPadHandler::Init(const u32 max_connect) +void keyboard_pad_handler::Init(const u32 max_connect) { memset(&m_info, 0, sizeof(PadInfo)); m_info.max_connect = max_connect; @@ -14,25 +12,39 @@ void KeyboardPadHandler::Init(const u32 max_connect) m_info.now_connect = std::min(m_pads.size(), (size_t)max_connect); } -KeyboardPadHandler::KeyboardPadHandler() +keyboard_pad_handler::keyboard_pad_handler(QObject* target, QObject* parent) : QObject(parent), m_target(target) { - wxGetApp().Bind(wxEVT_KEY_DOWN, &KeyboardPadHandler::KeyDown, this); - wxGetApp().Bind(wxEVT_KEY_UP, &KeyboardPadHandler::KeyUp, this); + target->installEventFilter(this); } -void KeyboardPadHandler::KeyDown(wxKeyEvent& event) +bool keyboard_pad_handler::eventFilter(QObject* target, QEvent* ev) { - Key(event.GetKeyCode(), 1); - event.Skip(); + // Commenting target since I don't know how to target game window yet. + //if (target == m_target) + { + if (ev->type() == QEvent::KeyPress) + { + keyPressEvent(static_cast(ev)); + } + else if (ev->type() == QEvent::KeyRelease) + { + keyReleaseEvent(static_cast(ev)); + } + } + return false; } -void KeyboardPadHandler::KeyUp(wxKeyEvent& event) +void keyboard_pad_handler::keyPressEvent(QKeyEvent* event) { - Key(event.GetKeyCode(), 0); - event.Skip(); + Key(event->key(), 1); } -void KeyboardPadHandler::LoadSettings() +void keyboard_pad_handler::keyReleaseEvent(QKeyEvent* event) +{ + Key(event->key(), 0); +} + +void keyboard_pad_handler::LoadSettings() { g_kbpad_config.load(); diff --git a/rpcs3/keyboard_pad_handler.h b/rpcs3/keyboard_pad_handler.h new file mode 100644 index 0000000000..0a1dfc0b65 --- /dev/null +++ b/rpcs3/keyboard_pad_handler.h @@ -0,0 +1,70 @@ +#pragma once + +#include "Utilities/Config.h" +#include "Emu/Io/PadHandler.h" +#include "stdafx.h" +#include "Emu/System.h" + +#include +#include + +struct keyboard_pad_config final : cfg::node +{ + const std::string cfg_name = fs::get_config_dir() + "/config_kbpad_qt.yml"; + + cfg::int32 left_stick_left{ this, "Left Analog Stick Left", Qt::Key_A }; + cfg::int32 left_stick_down{ this, "Left Analog Stick Down", Qt::Key_S }; + cfg::int32 left_stick_right{ this, "Left Analog Stick Right", Qt::Key_D }; + cfg::int32 left_stick_up{ this, "Left Analog Stick Up", Qt::Key_W }; + cfg::int32 right_stick_left{ this, "Right Analog Stick Left", Qt::Key_Home }; + cfg::int32 right_stick_down{ this, "Right Analog Stick Down", Qt::Key_PageDown }; + cfg::int32 right_stick_right{ this, "Right Analog Stick Right", Qt::Key_End }; + cfg::int32 right_stick_up{ this, "Right Analog Stick Up", Qt::Key_PageUp }; + cfg::int32 start{ this, "Start", Qt::Key_Return }; + cfg::int32 select{ this, "Select", Qt::Key_Space }; + cfg::int32 square{ this, "Square", Qt::Key_Z }; + cfg::int32 cross{ this, "Cross", Qt::Key_X }; + cfg::int32 circle{ this, "Circle", Qt::Key_C }; + cfg::int32 triangle{ this, "Triangle", Qt::Key_V }; + cfg::int32 left{ this, "Left", Qt::Key_Left }; + cfg::int32 down{ this, "Down", Qt::Key_Down }; + cfg::int32 right{ this, "Right", Qt::Key_Right }; + cfg::int32 up{ this, "Up", Qt::Key_Up }; + cfg::int32 r1{ this, "R1", Qt::Key_E }; + cfg::int32 r2{ this, "R2", Qt::Key_T }; + cfg::int32 r3{ this, "R3", Qt::Key_G }; + cfg::int32 l1{ this, "L1", Qt::Key_Q }; + cfg::int32 l2{ this, "L2", Qt::Key_R }; + cfg::int32 l3{ this, "L3", Qt::Key_F }; + + bool load() + { + if (fs::file cfg_file{ cfg_name, fs::read }) + { + return from_string(cfg_file.to_string()); + } + + return false; + } + + void save() + { + fs::file(cfg_name, fs::rewrite).write(to_string()); + } +}; + +class keyboard_pad_handler final : public QObject, public PadHandlerBase +{ +public: + virtual void Init(const u32 max_connect) override; + + keyboard_pad_handler(QObject* target, QObject* parent); + + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void LoadSettings(); + + bool eventFilter(QObject* obj, QEvent* ev); +private: + QObject* m_target; +}; diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp new file mode 100644 index 0000000000..f4aef1d6c1 --- /dev/null +++ b/rpcs3/main.cpp @@ -0,0 +1,14 @@ +// Qt5.2+ frontend implementation for rpcs3. Known to work on Windows, Linux, Mac +// by Sacha Refshauge + +#include +#include +#include +#include "rpcs3_app.h" + +int main(int argc, char** argv) +{ + rpcs3_app app(argc, argv); + app.Init(); + return app.exec(); +} diff --git a/rpcs3/MMJoystickHandler.cpp b/rpcs3/mm_joystick_handler.cpp similarity index 90% rename from rpcs3/MMJoystickHandler.cpp rename to rpcs3/mm_joystick_handler.cpp index a602b61a7c..6caf4a38b4 100644 --- a/rpcs3/MMJoystickHandler.cpp +++ b/rpcs3/mm_joystick_handler.cpp @@ -1,9 +1,8 @@ #include "stdafx.h" -#include "stdafx_gui.h" #ifdef _WIN32 -#include "MMJoystickHandler.h" +#include "mm_joystick_handler.h" -MMJoystickConfig g_mmjoystick_config; +mm_joystick_config g_mmjoystick_config; namespace { const DWORD THREAD_SLEEP = 10; @@ -17,16 +16,16 @@ namespace { } -MMJoystickHandler::MMJoystickHandler() : active(false), thread(nullptr) +mm_joystick_handler::mm_joystick_handler() : active(false), thread(nullptr) { } -MMJoystickHandler::~MMJoystickHandler() +mm_joystick_handler::~mm_joystick_handler() { Close(); } -void MMJoystickHandler::Init(const u32 max_connect) +void mm_joystick_handler::Init(const u32 max_connect) { supportedJoysticks = joyGetNumDevs(); if (supportedJoysticks > 0) @@ -86,7 +85,7 @@ void MMJoystickHandler::Init(const u32 max_connect) pad.m_sticks.emplace_back(CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y, 0, 0); active = true; - thread = CreateThread(NULL, 0, &MMJoystickHandler::ThreadProcProxy, this, 0, NULL); + thread = CreateThread(NULL, 0, &mm_joystick_handler::ThreadProcProxy, this, 0, NULL); } } @@ -96,7 +95,7 @@ void MMJoystickHandler::Init(const u32 max_connect) } } -void MMJoystickHandler::Close() +void mm_joystick_handler::Close() { if (active) { @@ -112,7 +111,7 @@ void MMJoystickHandler::Close() m_pads.clear(); } -DWORD MMJoystickHandler::ThreadProcedure() +DWORD mm_joystick_handler::ThreadProcedure() { // holds internal controller state change std::array last_connection_status = {}; @@ -169,9 +168,9 @@ DWORD MMJoystickHandler::ThreadProcedure() return 0; } -DWORD WINAPI MMJoystickHandler::ThreadProcProxy(LPVOID parameter) +DWORD WINAPI mm_joystick_handler::ThreadProcProxy(LPVOID parameter) { - return reinterpret_cast(parameter)->ThreadProcedure(); + return reinterpret_cast(parameter)->ThreadProcedure(); } #endif diff --git a/rpcs3/MMJoystickHandler.h b/rpcs3/mm_joystick_handler.h similarity index 89% rename from rpcs3/MMJoystickHandler.h rename to rpcs3/mm_joystick_handler.h index 33d10f7f4d..9ee283de52 100644 --- a/rpcs3/MMJoystickHandler.h +++ b/rpcs3/mm_joystick_handler.h @@ -1,10 +1,12 @@ -#pragma once +#ifndef MM_JOYSTICK_HANDLER_H +#define MM_JOYSTICK_HANDLER_H #include "Emu/Io/PadHandler.h" +#include #include #include "Utilities/Config.h" -struct MMJoystickConfig final : cfg::node +struct mm_joystick_config final : cfg::node { const std::string cfg_name = fs::get_config_dir() + "/config_mmjoystick.yml"; @@ -49,11 +51,11 @@ struct MMJoystickConfig final : cfg::node } }; -class MMJoystickHandler final : public PadHandlerBase +class mm_joystick_handler final : public PadHandlerBase { public: - MMJoystickHandler(); - ~MMJoystickHandler(); + mm_joystick_handler(); + ~mm_joystick_handler(); void Init(const u32 max_connect) override; void Close(); @@ -69,3 +71,5 @@ private: JOYINFOEX js_info; JOYCAPS js_caps; }; + +#endif diff --git a/rpcs3/resources.qrc b/rpcs3/resources.qrc new file mode 100644 index 0000000000..4ef295097d --- /dev/null +++ b/rpcs3/resources.qrc @@ -0,0 +1,9 @@ + + + Icons/pause.png + Icons/play.png + Icons/restart.png + Icons/stop.png + rpcs3.ico + + diff --git a/rpcs3/rpcs3.cpp b/rpcs3/rpcs3.cpp deleted file mode 100644 index 8ec7fe861b..0000000000 --- a/rpcs3/rpcs3.cpp +++ /dev/null @@ -1,285 +0,0 @@ -#include "stdafx.h" -#include "stdafx_gui.h" -#include "rpcs3.h" - -#include "Utilities/Config.h" -#include "Emu/Memory/Memory.h" -#include "Emu/System.h" - -#include "Gui/ConLogFrame.h" -#include "Emu/GameInfo.h" - -#include "Emu/Io/Null/NullKeyboardHandler.h" -#include "BasicKeyboardHandler.h" - -#include "Emu/Io/Null/NullMouseHandler.h" -#include "BasicMouseHandler.h" - -#include "Emu/Io/Null/NullPadHandler.h" -#include "KeyboardPadHandler.h" -#include "DS4PadHandler.h" -#ifdef _MSC_VER -#include "XInputPadHandler.h" -#endif -#ifdef _WIN32 -#include "MMJoystickHandler.h" -#endif - -#include "Emu/RSX/Null/NullGSRender.h" -#include "Emu/RSX/GL/GLGSRender.h" - -#include "Gui/MsgDialog.h" -#include "Gui/SaveDataDialog.h" - -#include "Gui/GLGSFrame.h" - -#include "Emu/RSX/Null/NullGSRender.h" -#include "Emu/RSX/GL/GLGSRender.h" -#include "Emu/Audio/Null/NullAudioThread.h" -#include "Emu/Audio/AL/OpenALThread.h" -#ifdef _MSC_VER -#include "Emu/RSX/D3D12/D3D12GSRender.h" -#endif -#ifdef _WIN32 -#include "Emu/RSX/VK/VKGSRender.h" -#include "Emu/Audio/XAudio2/XAudio2Thread.h" -#include -#endif -#ifdef __linux__ -#include "Emu/Audio/ALSA/ALSAThread.h" -#endif - -#ifdef __unix__ -#include -#endif - -// GUI config -YAML::Node g_gui_cfg; - -// GUI config file -static fs::file s_gui_cfg; - -void save_gui_cfg() -{ - YAML::Emitter out; - out.SetSeqFormat(YAML::Flow); - out << g_gui_cfg; - - // Save to file - s_gui_cfg.seek(0); - s_gui_cfg.trunc(0); - s_gui_cfg.write(out.c_str(), out.size()); -} - -IMPLEMENT_APP(Rpcs3App) -Rpcs3App* TheApp; - -bool Rpcs3App::OnInit() -{ - static const wxCmdLineEntryDesc desc[] - { - { wxCMD_LINE_SWITCH, "h", "help", "Command line options:\nh (help): Help and commands\nt (test): For directly executing a (S)ELF", wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP }, - { wxCMD_LINE_SWITCH, "t", "test", "Run in test mode on (S)ELF", wxCMD_LINE_VAL_NONE }, - { wxCMD_LINE_PARAM, NULL, NULL, "(S)ELF", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, - { wxCMD_LINE_NONE } - }; - - parser.SetDesc(desc); - parser.SetCmdLine(argc, argv); - - if (parser.Parse()) - { - // help was given, terminating - this->Exit(); - } - - s_gui_cfg.open(fs::get_config_dir() + "/config_gui.yml", fs::read + fs::write + fs::create); - g_gui_cfg = YAML::Load(s_gui_cfg.to_string()); - - EmuCallbacks callbacks; - - callbacks.call_after = [](std::function func) - { - wxGetApp().CallAfter(std::move(func)); - }; - - callbacks.process_events = [this]() - { - m_MainFrame->Update(); - wxGetApp().ProcessPendingEvents(); - }; - - callbacks.exit = [this]() - { - wxGetApp().Exit(); - }; - - callbacks.get_kb_handler = []() -> std::shared_ptr - { - switch (keyboard_handler type = g_cfg.io.keyboard) - { - case keyboard_handler::null: return std::make_shared(); - case keyboard_handler::basic: return std::make_shared(); - default: fmt::throw_exception("Invalid keyboard handler: %s", type); - } - }; - - callbacks.get_mouse_handler = []() -> std::shared_ptr - { - switch (mouse_handler type = g_cfg.io.mouse) - { - case mouse_handler::null: return std::make_shared(); - case mouse_handler::basic: return std::make_shared(); - default: fmt::throw_exception("Invalid mouse handler: %s", type); - } - }; - - callbacks.get_pad_handler = []() -> std::shared_ptr - { - switch (pad_handler type = g_cfg.io.pad) - { - case pad_handler::null: return std::make_shared(); - case pad_handler::keyboard: return std::make_shared(); - case pad_handler::ds4: return std::make_shared(); -#ifdef _MSC_VER - case pad_handler::xinput: return std::make_shared(); -#endif -#ifdef _WIN32 - case pad_handler::mm: return std::make_shared(); -#endif - default: fmt::throw_exception("Invalid pad handler: %s", type); - } - }; - - callbacks.get_gs_frame = []() -> std::unique_ptr - { - extern const std::unordered_map, value_hash> g_video_out_resolution_map; - - const auto size = g_video_out_resolution_map.at(g_cfg.video.resolution); - - switch (video_renderer type = g_cfg.video.renderer) - { - case video_renderer::null: return std::make_unique("Null", size.first, size.second); - case video_renderer::opengl: return std::make_unique(size.first, size.second); -#ifdef _WIN32 - case video_renderer::vulkan: return std::make_unique("Vulkan", size.first, size.second); -#endif -#ifdef _MSC_VER - case video_renderer::dx12: return std::make_unique("DirectX 12", size.first, size.second); -#endif - default: fmt::throw_exception("Invalid video renderer: %s" HERE, type); - } - }; - - callbacks.get_gs_render = []() -> std::shared_ptr - { - switch (video_renderer type = g_cfg.video.renderer) - { - case video_renderer::null: return std::make_shared(); - case video_renderer::opengl: return std::make_shared(); -#ifdef _WIN32 - case video_renderer::vulkan: return std::make_shared(); -#endif -#ifdef _MSC_VER - case video_renderer::dx12: return std::make_shared(); -#endif - default: fmt::throw_exception("Invalid video renderer: %s" HERE, type); - } - }; - - callbacks.get_audio = []() -> std::shared_ptr - { - switch (audio_renderer type = g_cfg.audio.renderer) - { - case audio_renderer::null: return std::make_shared(); -#ifdef _WIN32 - case audio_renderer::xaudio: return std::make_shared(); -#elif __linux__ - case audio_renderer::alsa: return std::make_shared(); -#endif - case audio_renderer::openal: return std::make_shared(); - default: fmt::throw_exception("Invalid audio renderer: %s" HERE, type); - } - }; - - callbacks.get_msg_dialog = []() -> std::shared_ptr - { - return std::make_shared(); - }; - - callbacks.get_save_dialog = []() -> std::unique_ptr - { - return std::make_unique(); - }; - - Emu.SetCallbacks(std::move(callbacks)); - - TheApp = this; - SetAppName("RPCS3"); - wxInitAllImageHandlers(); - - Emu.Init(); - - m_MainFrame = new MainFrame(); - SetTopWindow(m_MainFrame); - m_MainFrame->Show(); - m_MainFrame->DoSettings(true); - - OnArguments(parser); - - return true; -} - -void Rpcs3App::OnArguments(const wxCmdLineParser& parser) -{ - // Usage: - // rpcs3-*.exe Initializes RPCS3 - // rpcs3-*.exe [(S)ELF] Initializes RPCS3, then loads and runs the specified (S)ELF file. - - if (parser.FoundSwitch("t")) - { - if (parser.GetParamCount() != 1) - { - wxLogDebug("A (S)ELF file needs to be given in test mode, exiting."); - this->Exit(); - } - - // TODO: clean implementation - g_cfg.misc.autostart.from_string("true"); - g_cfg.misc.autoexit.from_string("true"); - } - - if (parser.GetParamCount() > 0) - { - Emu.SetPath(fmt::ToUTF8(parser.GetParam(0))); - Emu.Load(); - Emu.Run(); - } -} - -void Rpcs3App::Exit() -{ - Emu.Stop(); - wxApp::Exit(); -} - -Rpcs3App::Rpcs3App() -{ -#ifdef _WIN32 - timeBeginPeriod(1); - - WSADATA wsaData; - WORD wVersionRequested = MAKEWORD(2, 2); - WSAStartup(wVersionRequested, &wsaData); - - std::atexit([] - { - timeEndPeriod(1); - WSACleanup(); - }); -#endif - -#if defined(__unix__) && !defined(__APPLE__) - XInitThreads(); -#endif -} diff --git a/rpcs3/rpcs3.h b/rpcs3/rpcs3.h deleted file mode 100644 index 37d19da994..0000000000 --- a/rpcs3/rpcs3.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include "Gui/MainFrame.h" -#include -#include - -class Rpcs3App : public wxApp -{ -private: - wxCmdLineParser parser; - -public: - MainFrame* m_MainFrame; - - virtual bool OnInit(); // RPCS3's entry point - virtual void OnArguments(const wxCmdLineParser& parser); // Handle arguments: Rpcs3App::argc, Rpcs3App::argv - virtual void Exit(); - - Rpcs3App(); -}; - -DECLARE_APP(Rpcs3App) - -extern Rpcs3App* TheApp; diff --git a/rpcs3/rpcs3.vcxproj.user b/rpcs3/rpcs3.vcxproj.user index 975b4ed10e..3b30a09edc 100644 --- a/rpcs3/rpcs3.vcxproj.user +++ b/rpcs3/rpcs3.vcxproj.user @@ -3,24 +3,34 @@ $(SolutionDir)bin\ WindowsLocalDebugger + PATH=$(QTDIR)\bin%3bC:\Qt\5.8\msvc2015_64\bin%3b$(PATH) + C:\Qt\5.8\msvc2015_64 $(SolutionDir)bin\ WindowsLocalDebugger + PATH=$(QTDIR)\bin%3bC:\Qt\5.8\msvc2015_64\bin%3b$(PATH) + C:\Qt\5.8\msvc2015_64 $(SolutionDir)bin\ WindowsLocalDebugger + PATH=$(QTDIR)\bin%3bC:\Qt\5.8\msvc2015_64\bin%3b$(PATH) + C:\Qt\5.8\msvc2015_64 $(SolutionDir)bin\ WindowsLocalDebugger 1> stdout.log 2> stderr.log + PATH=$(QTDIR)\bin%3bC:\Qt\5.8\msvc2015_64\bin%3b$(PATH) + C:\Qt\5.8\msvc2015_64 $(SolutionDir)bin\ WindowsLocalDebugger 1> stdout.log 2> stderr.log + PATH=$(QTDIR)\bin%3bC:\Qt\5.8\msvc2015_64\bin%3b$(PATH) + C:\Qt\5.8\msvc2015_64 $(SolutionDir)bin\ diff --git a/rpcs3/rpcs3_app.cpp b/rpcs3/rpcs3_app.cpp new file mode 100644 index 0000000000..956c0513c6 --- /dev/null +++ b/rpcs3/rpcs3_app.cpp @@ -0,0 +1,268 @@ +#include "rpcs3_app.h" + +#include "rpcs3qt/welcome_dialog.h" +#include "rpcs3qt/gui_settings.h" + +#include "Emu/System.h" +#include "rpcs3qt/gs_frame.h" +#include "rpcs3qt/gl_gs_frame.h" + +#include "Emu/Cell/Modules/cellSaveData.h" +#include "rpcs3qt/save_data_dialog.h" + +#include "rpcs3qt/msg_dialog_frame.h" +#include "Emu/Cell/Modules/cellMsgDialog.h" + +#include "Emu/Io/Null/NullKeyboardHandler.h" +#include "basic_keyboard_handler.h" + +#include "Emu/Io/Null/NullMouseHandler.h" +#include "basic_mouse_handler.h" + +#include "Emu/Io/Null/NullPadHandler.h" +#include "keyboard_pad_handler.h" +#include "ds4_pad_handler.h" +#ifdef _MSC_VER +#include "xinput_pad_handler.h" +#endif +#ifdef _WIN32 +#include "mm_joystick_handler.h" +#endif + + +#include "Emu/RSX/Null/NullGSRender.h" +#include "Emu/RSX/GL/GLGSRender.h" +#include "Emu/Audio/Null/NullAudioThread.h" +#include "Emu/Audio/AL/OpenALThread.h" +#ifdef _MSC_VER +#include "Emu/RSX/D3D12/D3D12GSRender.h" +#endif +#ifdef _WIN32 +#include "Emu/RSX/VK/VKGSRender.h" +#include "Emu/Audio/XAudio2/XAudio2Thread.h" +#endif +#ifdef __linux__ +#include "Emu/Audio/ALSA/ALSAThread.h" +#endif + +// For now, a trivial constructor/destructor. May add command line usage later. +rpcs3_app::rpcs3_app(int& argc, char** argv) : QApplication(argc, argv) +{ +} + +void rpcs3_app::Init() +{ + Emu.Init(); + + // Create the main window + RPCS3MainWin = new main_window(nullptr); + + // Reset the pads -- see the method for why this is currently needed. + ResetPads(); + + // Create callbacks from the emulator, which reference the handlers. + InitializeCallbacks(); + + // Create connects to propagate events throughout Gui. + InitializeConnects(); + + setApplicationName("RPCS3"); + RPCS3MainWin->show(); + + // Create the thumbnail toolbar after the main_window is created + RPCS3MainWin->CreateThumbnailToolbar(); + + // Slightly inneficient to make a gui_settings instance right here. + // But, I don't really feel like adding this as a dependency injection into RPCS3MainWin. + if (gui_settings().GetValue(GUI::ib_show_welcome).toBool()) + { + welcome_dialog* welcome = new welcome_dialog(); + welcome->exec(); + } +} + +/** RPCS3 emulator has functions it desires to call from the GUI at times. Initialize them in here. +*/ +void rpcs3_app::InitializeCallbacks() +{ + EmuCallbacks callbacks; + + callbacks.exit = [this]() + { + quit(); + }; + callbacks.call_after = [=](std::function func) + { + emit RequestCallAfter(std::move(func)); + }; + + callbacks.process_events = [this]() + { + RPCS3MainWin->update(); + processEvents(); + }; + + callbacks.get_kb_handler = [=]() -> std::shared_ptr + { + switch (keyboard_handler type = g_cfg.io.keyboard) + { + case keyboard_handler::null: return std::make_shared(); + case keyboard_handler::basic: return m_basicKeyboardHandler; + default: fmt::throw_exception("Invalid keyboard handler: %s", type); + } + }; + + callbacks.get_mouse_handler = [=]() -> std::shared_ptr + { + switch (mouse_handler type = g_cfg.io.mouse) + { + case mouse_handler::null: return std::make_shared(); + case mouse_handler::basic: return m_basicMouseHandler; + default: fmt::throw_exception("Invalid mouse handler: %s", type); + } + }; + + callbacks.get_pad_handler = [this]() -> std::shared_ptr + { + switch (pad_handler type = g_cfg.io.pad) + { + case pad_handler::null: return std::make_shared(); + case pad_handler::keyboard: return m_keyboardPadHandler; + case pad_handler::ds4: return std::make_shared(); +#ifdef _MSC_VER + case pad_handler::xinput: return std::make_shared(); +#endif +#ifdef _WIN32 + case pad_handler::mm: return std::make_shared(); +#endif + default: fmt::throw_exception("Invalid pad handler: %s", type); + } + }; + + callbacks.get_gs_frame = [this]() -> std::unique_ptr + { + extern const std::unordered_map, value_hash> g_video_out_resolution_map; + + const auto size = g_video_out_resolution_map.at(g_cfg.video.resolution); + + switch (video_renderer type = g_cfg.video.renderer) + { + case video_renderer::null: return std::make_unique("Null", size.first, size.second, RPCS3MainWin->GetAppIcon()); + case video_renderer::opengl: return std::make_unique(size.first, size.second, RPCS3MainWin->GetAppIcon()); +#ifdef _WIN32 + case video_renderer::vulkan: return std::make_unique("Vulkan", size.first, size.second, RPCS3MainWin->GetAppIcon()); +#endif +#ifdef _MSC_VER + case video_renderer::dx12: return std::make_unique("DirectX 12", size.first, size.second, RPCS3MainWin->GetAppIcon()); +#endif + default: fmt::throw_exception("Invalid video renderer: %s" HERE, type); + } + }; + + callbacks.get_gs_render = []() -> std::shared_ptr + { + switch (video_renderer type = g_cfg.video.renderer) + { + case video_renderer::null: return std::make_shared(); + case video_renderer::opengl: return std::make_shared(); +#ifdef _WIN32 + case video_renderer::vulkan: return std::make_shared(); +#endif +#ifdef _MSC_VER + case video_renderer::dx12: return std::make_shared(); +#endif + default: fmt::throw_exception("Invalid video renderer: %s" HERE, type); + } + }; + + callbacks.get_audio = []() -> std::shared_ptr + { + switch (audio_renderer type = g_cfg.audio.renderer) + { + case audio_renderer::null: return std::make_shared(); +#ifdef _WIN32 + case audio_renderer::xaudio: return std::make_shared(); +#elif __linux__ + case audio_renderer::alsa: return std::make_shared(); +#endif + case audio_renderer::openal: return std::make_shared(); + default: fmt::throw_exception("Invalid audio renderer: %s" HERE, type); + } + }; + + callbacks.get_msg_dialog = [=]() -> std::shared_ptr + { + return std::make_shared(RPCS3MainWin->windowHandle()); + }; + + callbacks.get_save_dialog = [=]() -> std::unique_ptr + { + return std::make_unique(); + }; + + callbacks.on_run = [=]() { emit OnEmulatorRun(); }; + callbacks.on_pause = [=]() {emit OnEmulatorPause(); }; + callbacks.on_resume = [=]() {emit OnEmulatorResume(); }; + callbacks.on_stop = [=]() {emit OnEmulatorStop(); }; + callbacks.on_ready = [=]() {emit OnEmulatorReady(); }; + + Emu.SetCallbacks(std::move(callbacks)); +} + +/* + * Initialize connects here. These are used to connect things between UI elements that require the intervention of rpcs3_app. + */ +void rpcs3_app::InitializeConnects() +{ + connect(RPCS3MainWin, &main_window::RequestGlobalStylesheetChange, this, &rpcs3_app::OnChangeStyleSheetRequest); + + qRegisterMetaType >("std::function"); + connect(this, &rpcs3_app::RequestCallAfter, this, &rpcs3_app::HandleCallAfter); + + connect(this, &rpcs3_app::OnEmulatorRun, RPCS3MainWin, &main_window::OnEmuRun); + connect(this, &rpcs3_app::OnEmulatorStop, this, &rpcs3_app::ResetPads); + connect(this, &rpcs3_app::OnEmulatorStop, RPCS3MainWin, &main_window::OnEmuStop); + connect(this, &rpcs3_app::OnEmulatorPause, RPCS3MainWin, &main_window::OnEmuPause); + connect(this, &rpcs3_app::OnEmulatorResume, RPCS3MainWin, &main_window::OnEmuResume); + connect(this, &rpcs3_app::OnEmulatorReady, RPCS3MainWin, &main_window::OnEmuReady); +} + +/* +* Handle a request to change the stylesheet. May consider adding reporting of errors in future. +* Empty string means default. +*/ +void rpcs3_app::OnChangeStyleSheetRequest(const QString& sheetFilePath) +{ + QFile file(sheetFilePath); + if (sheetFilePath == "") + { + setStyleSheet(""); + } + else if (file.open(QIODevice::ReadOnly | QIODevice::Text)) + { + setStyleSheet(file.readAll()); + file.close(); + } +} + +/** + * Using connects avoids timers being unable to be used in a non-qt thread. So, even if this looks stupid to just call func, it's succinct. +*/ +void rpcs3_app::HandleCallAfter(const std::function& func) +{ + func(); +} + +/** + * We need to make this in the main thread to receive events from the main thread. + * This leads to the tricky situation. Creating it while booting leads to deadlock with a blocking connection. + * So, I need to make them before, but when? + * I opted to reset them when the Emu stops and on first init. Potentially a race condition on restart? Never encountered issues. + * The other tricky issue is that I don't want Init to be called twice on the same object. Reseting the pointer on emu stop should handle this as well! +*/ +void rpcs3_app::ResetPads() +{ + m_basicKeyboardHandler.reset(new basic_keyboard_handler(this, this)); + m_basicMouseHandler.reset(new basic_mouse_handler(this, this)); + m_keyboardPadHandler.reset(new keyboard_pad_handler(this, this)); +} diff --git a/rpcs3/rpcs3_app.h b/rpcs3/rpcs3_app.h new file mode 100644 index 0000000000..7bf88f478a --- /dev/null +++ b/rpcs3/rpcs3_app.h @@ -0,0 +1,56 @@ +#ifndef RPCS3_APP_H +#define RPCS3_APP_H + +#include "stdafx.h" + +#include "keyboard_pad_handler.h" +#include "basic_keyboard_handler.h" +#include "basic_mouse_handler.h" + +#include "Utilities/Config.h" +#include "Emu/RSX/GSRender.h" +#include "Emu/Io/KeyboardHandler.h" +#include "Emu/Io/PadHandler.h" +#include "Emu/Io/MouseHandler.h" +#include "Emu/Audio/AudioThread.h" + +#include "rpcs3qt/msg_dialog_frame.h" +#include "rpcs3qt/main_window.h" + +#include + +/** RPCS3 Application Class + * The point of this class is to do application initialization and to hold onto the main window. The main thing I intend this class to do, for now, is to initialize callbacks and the main_window. +*/ + +class rpcs3_app : public QApplication +{ + Q_OBJECT +public: + rpcs3_app(int& argc, char** argv); + /** Call this method before calling app.exec + */ + void Init(); +signals: + void OnEmulatorRun(); + void OnEmulatorPause(); + void OnEmulatorResume(); + void OnEmulatorStop(); + void OnEmulatorReady(); + void RequestCallAfter(const std::function& func); +private slots: + void OnChangeStyleSheetRequest(const QString& path); + void HandleCallAfter(const std::function& func); + void ResetPads(); +private: + void InitializeCallbacks(); + void InitializeConnects(); + + // See ResetPads() for why these shared pointers exist. + std::shared_ptr m_keyboardPadHandler; + std::shared_ptr m_basicKeyboardHandler; + std::shared_ptr m_basicMouseHandler; + + main_window* RPCS3MainWin; +}; +#endif diff --git a/rpcs3/rpcs3qt.vcxproj b/rpcs3/rpcs3qt.vcxproj new file mode 100644 index 0000000000..6e2acc771a --- /dev/null +++ b/rpcs3/rpcs3qt.vcxproj @@ -0,0 +1,1527 @@ + + + + + Debug - LLVM + x64 + + + Release - LLVM + x64 + + + Release + x64 + + + Debug + x64 + + + + {D0EC0F82-3BED-3CE4-8DEC-3BCF71B08B69} + rpcs3-qt + Qt4VSv1.0 + 8.1 + + + + v140 + release\ + false + Unicode + Application + release\ + rpcs3-qt + + + v140 + release\ + false + Unicode + Application + release\ + rpcs3-qt + + + v140 + debug\ + false + Unicode + Application + debug\ + rpcs3-qt + + + v140 + debug\ + false + Unicode + Application + debug\ + rpcs3-qt + + + + + + + + + + + + + + + + + + + + + + + + + + + + ..\bin + ..\bin + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + rpcs3-qt + rpcs3-qt + true + true + false + true + ..\bin\ + ..\bin\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + rpcs3-qtd + rpcs3-qtd + true + true + + + ..\3rdparty\hidapi\hidapi;..\rsx_program_decompiler\rsx_decompiler;.\;..\;..\asmjit\src\asmjit;..\Utilities\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src + $(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath) + + + ..\3rdparty\hidapi\hidapi;..\rsx_program_decompiler\rsx_decompiler;.\;..\;..\asmjit\src\asmjit;..\Utilities\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src + $(SolutionDir)lib\Debug-x64;$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath) + + + $(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath) + ..\3rdparty\hidapi\hidapi;..\rsx_program_decompiler\rsx_decompiler;.\;..\;..\asmjit\src\asmjit;..\Utilities\yaml-cpp\include;..\wxWidgets\src\zlib;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src + + + $(SolutionDir)lib\Release-x64;$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath) + ..\3rdparty\hidapi\hidapi;..\rsx_program_decompiler\rsx_decompiler;.\;..\;..\asmjit\src\asmjit;..\Utilities\yaml-cpp\include;..\wxWidgets\src\zlib;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src + + + + ..\Vulkan\Vulkan-LoaderAndValidationLayers\include;..\3rdparty\minidx12\Include;$(QTDIR)\include;$(QTDIR)\include\QtOpenGL;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtQuick;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtQml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;.\release;$(QTDIR)\mkspecs\win32-msvc2015;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;%(AdditionalIncludeDirectories) + -Zc:strictStrings -Zc:throwingNew -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) + release\ + false + None + 4577;4467;%(DisableSpecificWarnings) + Sync + $(IntDir) + MaxSpeed + _WINDOWS;UNICODE;WIN32;WIN64;QT_NO_DEBUG;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_QUICK_LIB;QT_GUI_LIB;QT_QML_LIB;QT_NETWORK_LIB;QT_CORE_LIB;NDEBUG;QT_WINEXTRAS_LIB;%(PreprocessorDefinitions) + false + $(IntDir)vc$(PlatformToolsetVersion).pdb + MultiThreadedDLL + true + true + true + Level3 + + + ..\hidapi.lib;winmm.lib;OpenAL.lib;XAudio.lib;D3D12GSRender.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;VKstatic.1.lib;glslang.lib;OSDependent.lib;OGLCompiler.lib;SPIRV.lib;HLSL.lib;Advapi32.lib;user32.lib;zlib.lib;shader_code.lib;..\libpng.lib;asmjit.lib;rsx_decompiler.lib;yaml-cpp.lib;emucore.lib;dxgi.lib;$(QTDIR)\lib\qtmain.lib;shell32.lib;opengl32.lib;$(QTDIR)\lib\Qt5OpenGL.lib;$(QTDIR)\lib\Qt5Widgets.lib;$(QTDIR)\lib\Qt5Quick.lib;$(QTDIR)\lib\Qt5Gui.lib;$(QTDIR)\lib\Qt5Qml.lib;$(QTDIR)\lib\Qt5Network.lib;$(QTDIR)\lib\Qt5Core.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5WinExtras.lib;%(AdditionalDependencies) + ..\3rdparty\OpenAL\libs\Win64;..\Vulkan\glslang-build\hlsl\Release;..\Vulkan\glslang-build\SPIRV\Release;..\Vulkan\glslang-build\OGLCompilersDLL\Release;..\Vulkan\glslang-build\glslang\OSDependent\Windows\Release;..\Vulkan\Vulkan-build\loader\Release;..\Vulkan\glslang-build\glslang\Release;..\lib\$(CONFIGURATION)-$(PLATFORM);..\3rdparty\minidx12\Lib;$(QTDIR)\lib;C:\utils\my_sql\my_sql\lib;C:\utils\postgresql\pgsql\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories) + "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) + true + false + true + false + $(OutDir)\rpcs3-qt.exe + false + Windows + true + 0x10000 + + + Unsigned + None + 0 + + + _WINDOWS;UNICODE;WIN32;WIN64;QT_UI;QT_NO_DEBUG;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_QUICK_LIB;QT_GUI_LIB;QT_QML_LIB;QT_NETWORK_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) + + + + xcopy "$(QTDIR)\bin\Qt5Core.dll" "$(OutDir)" /d + xcopy "$(QTDIR)\bin\Qt5Gui.dll" "$(OutDir)" /d + xcopy "$(QTDIR)\bin\Qt5Widgets.dll" "$(OutDir)" /d + + + + + + + + + + ..\Vulkan\Vulkan-LoaderAndValidationLayers\include;..\3rdparty\minidx12\Include;$(QTDIR)\include;$(QTDIR)\include\QtOpenGL;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtQuick;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtQml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;.\release;$(QTDIR)\mkspecs\win32-msvc2015;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;%(AdditionalIncludeDirectories) + -Zc:strictStrings -Zc:throwingNew -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) + release\ + false + None + 4577;4467;%(DisableSpecificWarnings) + Sync + $(IntDir) + MaxSpeed + _WINDOWS;UNICODE;WIN32;WIN64;QT_NO_DEBUG;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_QUICK_LIB;QT_GUI_LIB;QT_QML_LIB;QT_NETWORK_LIB;QT_CORE_LIB;NDEBUG;QT_WINEXTRAS_LIB;%(PreprocessorDefinitions) + false + $(IntDir)vc$(PlatformToolsetVersion).pdb + MultiThreadedDLL + true + true + true + Level3 + + + ..\hidapi.lib;winmm.lib;OpenAL.lib;XAudio.lib;D3D12GSRender.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;VKstatic.1.lib;glslang.lib;OSDependent.lib;OGLCompiler.lib;SPIRV.lib;HLSL.lib;Advapi32.lib;user32.lib;zlib.lib;shader_code.lib;..\libpng.lib;asmjit.lib;rsx_decompiler.lib;yaml-cpp.lib;emucore.lib;dxgi.lib;$(QTDIR)\lib\qtmain.lib;shell32.lib;opengl32.lib;$(QTDIR)\lib\Qt5OpenGL.lib;$(QTDIR)\lib\Qt5Widgets.lib;$(QTDIR)\lib\Qt5Quick.lib;$(QTDIR)\lib\Qt5Gui.lib;$(QTDIR)\lib\Qt5Qml.lib;$(QTDIR)\lib\Qt5Network.lib;$(QTDIR)\lib\Qt5Core.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5WinExtras.lib;%(AdditionalDependencies) + ..\3rdparty\OpenAL\libs\Win64;..\Vulkan\glslang-build\hlsl\Release;..\Vulkan\glslang-build\SPIRV\Release;..\Vulkan\glslang-build\OGLCompilersDLL\Release;..\Vulkan\glslang-build\glslang\OSDependent\Windows\Release;..\Vulkan\Vulkan-build\loader\Release;..\Vulkan\glslang-build\glslang\Release;..\lib\$(CONFIGURATION)-$(PLATFORM);..\3rdparty\minidx12\Lib;$(QTDIR)\lib;C:\utils\my_sql\my_sql\lib;C:\utils\postgresql\pgsql\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories) + "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) + true + false + true + false + $(OutDir)\rpcs3-qt.exe + false + Windows + true + 0x10000 + + + Unsigned + None + 0 + + + _WINDOWS;UNICODE;WIN32;WIN64;QT_UI;QT_NO_DEBUG;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_QUICK_LIB;QT_GUI_LIB;QT_QML_LIB;QT_NETWORK_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) + + + + xcopy "$(QTDIR)\bin\Qt5Core.dll" "$(OutDir)" /d + xcopy "$(QTDIR)\bin\Qt5Gui.dll" "$(OutDir)" /d + xcopy "$(QTDIR)\bin\Qt5Widgets.dll" "$(OutDir)" /d + + + + + + + + + + ..\Vulkan\Vulkan-LoaderAndValidationLayers\include;..\;..\3rdparty\minidx12\Include;$(QTDIR)\include;$(QTDIR)\include\QtOpenGL;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtQuick;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtQml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;.\debug;$(QTDIR)\mkspecs\win32-msvc2015;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;%(AdditionalIncludeDirectories) + -Zc:strictStrings -Zc:throwingNew -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) + debug\ + false + ProgramDatabase + 4577;4467;%(DisableSpecificWarnings) + Sync + $(IntDir) + Disabled + _WINDOWS;UNICODE;WIN32;WIN64;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_QUICK_LIB;QT_GUI_LIB;QT_QML_LIB;QT_NETWORK_LIB;QT_CORE_LIB;QT_WINEXTRAS_LIB;%(PreprocessorDefinitions) + false + MultiThreadedDebugDLL + true + true + true + Level3 + $(IntDir)vc$(PlatformToolsetVersion).pdb + + + ..\hidapi.lib;winmm.lib;OpenAL.lib;XAudio.lib;D3D12GSRender.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;VKstatic.1.lib;glslang.lib;OSDependent.lib;OGLCompiler.lib;SPIRV.lib;HLSL.lib;Advapi32.lib;user32.lib;zlib.lib;shader_code.lib;..\libpng.lib;asmjit.lib;rsx_decompiler.lib;yaml-cpp.lib;emucore.lib;dxgi.lib;$(QTDIR)\lib\qtmaind.lib;shell32.lib;opengl32.lib;$(QTDIR)\lib\Qt5OpenGLd.lib;$(QTDIR)\lib\Qt5Widgetsd.lib;$(QTDIR)\lib\Qt5Quickd.lib;$(QTDIR)\lib\Qt5Guid.lib;$(QTDIR)\lib\Qt5Qmld.lib;$(QTDIR)\lib\Qt5Networkd.lib;$(QTDIR)\lib\Qt5Cored.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;Qt5WinExtrasd.lib;%(AdditionalDependencies) + ..\3rdparty\OpenAL\libs\Win64;..\Vulkan\glslang-build\hlsl\Debug;..\Vulkan\glslang-build\SPIRV\Debug;..\Vulkan\glslang-build\OGLCompilersDLL\Debug;..\Vulkan\glslang-build\glslang\OSDependent\Windows\Debug;..\Vulkan\Vulkan-build\loader\Debug;..\Vulkan\glslang-build\glslang\Debug;..\3rdparty\minidx12\Lib;..\lib\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;C:\utils\my_sql\my_sql\lib;C:\utils\postgresql\pgsql\lib;%(AdditionalLibraryDirectories) + "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) + true + true + true + $(OutDir)\rpcs3-qtd.exe + false + Windows + true + + + 0x10000 + + + Unsigned + None + 0 + + + _WINDOWS;UNICODE;WIN32;WIN64;QT_UI;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_QUICK_LIB;QT_GUI_LIB;QT_QML_LIB;QT_NETWORK_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) + + + + xcopy "$(QTDIR)\bin\Qt5Cored.dll" "$(OutDir)" /d + xcopy "$(QTDIR)\bin\Qt5Guid.dll" "$(OutDir)" /d + xcopy "$(QTDIR)\bin\Qt5Widgetsd.dll" "$(OutDir)" /d + + + + + + + + + + ..\Vulkan\Vulkan-LoaderAndValidationLayers\include;..\;..\3rdparty\minidx12\Include;$(QTDIR)\include;$(QTDIR)\include\QtOpenGL;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtQuick;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtQml;$(QTDIR)\include\QtNetwork;$(QTDIR)\include\QtCore;.\debug;$(QTDIR)\mkspecs\win32-msvc2015;.\QTGeneratedFiles\$(ConfigurationName);.\QTGeneratedFiles;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtWinExtras;%(AdditionalIncludeDirectories) + -Zc:strictStrings -Zc:throwingNew -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) + debug\ + false + ProgramDatabase + 4577;4467;%(DisableSpecificWarnings) + Sync + $(IntDir) + Disabled + _WINDOWS;UNICODE;WIN32;WIN64;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_QUICK_LIB;QT_GUI_LIB;QT_QML_LIB;QT_NETWORK_LIB;QT_CORE_LIB;QT_WINEXTRAS_LIB;%(PreprocessorDefinitions) + false + MultiThreadedDebugDLL + true + true + true + Level3 + $(IntDir)vc$(PlatformToolsetVersion).pdb + + + ..\hidapi.lib;winmm.lib;OpenAL.lib;XAudio.lib;D3D12GSRender.lib;GLGSRender.lib;shlwapi.lib;VKGSRender.lib;VKstatic.1.lib;glslang.lib;OSDependent.lib;OGLCompiler.lib;SPIRV.lib;HLSL.lib;Advapi32.lib;user32.lib;zlib.lib;shader_code.lib;..\libpng.lib;asmjit.lib;rsx_decompiler.lib;yaml-cpp.lib;emucore.lib;dxgi.lib;$(QTDIR)\lib\qtmaind.lib;shell32.lib;opengl32.lib;$(QTDIR)\lib\Qt5OpenGLd.lib;$(QTDIR)\lib\Qt5Widgetsd.lib;$(QTDIR)\lib\Qt5Quickd.lib;$(QTDIR)\lib\Qt5Guid.lib;$(QTDIR)\lib\Qt5Qmld.lib;$(QTDIR)\lib\Qt5Networkd.lib;$(QTDIR)\lib\Qt5Cored.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;Qt5WinExtrasd.lib;%(AdditionalDependencies) + ..\3rdparty\OpenAL\libs\Win64;..\Vulkan\glslang-build\hlsl\Debug;..\Vulkan\glslang-build\SPIRV\Debug;..\Vulkan\glslang-build\OGLCompilersDLL\Debug;..\Vulkan\glslang-build\glslang\OSDependent\Windows\Debug;..\Vulkan\Vulkan-build\loader\Debug;..\Vulkan\glslang-build\glslang\Debug;..\3rdparty\minidx12\Lib;..\lib\$(CONFIGURATION)-$(PLATFORM);$(QTDIR)\lib;C:\utils\my_sql\my_sql\lib;C:\utils\postgresql\pgsql\lib;%(AdditionalLibraryDirectories) + "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /VERBOSE %(AdditionalOptions) + true + true + true + $(OutDir)\rpcs3-qtd.exe + false + Windows + true + + + 0x10000 + + + Unsigned + None + 0 + + + _WINDOWS;UNICODE;WIN32;WIN64;QT_UI;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_QUICK_LIB;QT_GUI_LIB;QT_QML_LIB;QT_NETWORK_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) + + + + xcopy "$(QTDIR)\bin\Qt5Cored.dll" "$(OutDir)" /d + xcopy "$(QTDIR)\bin\Qt5Guid.dll" "$(OutDir)" /d + xcopy "$(QTDIR)\bin\Qt5Widgetsd.dll" "$(OutDir)" /d + + + + + + + + + + + + + + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + + + + + + + + + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Moc%27ing rpcs3_app.h... + Moc%27ing rpcs3_app.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing rpcs3_app.h... + Moc%27ing rpcs3_app.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing basic_keyboard_handler.h... + Moc%27ing basic_keyboard_handler.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing basic_keyboard_handler.h... + Moc%27ing basic_keyboard_handler.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing basic_mouse_handler.h... + Moc%27ing basic_mouse_handler.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing basic_mouse_handler.h... + Moc%27ing basic_mouse_handler.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + + + Moc%27ing graphics_tab.h... + Moc%27ing graphics_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing graphics_tab.h... + Moc%27ing graphics_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing gs_frame.h... + Moc%27ing gs_frame.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing gs_frame.h... + Moc%27ing gs_frame.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing input_tab.h... + Moc%27ing input_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing input_tab.h... + Moc%27ing input_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing log_frame.h... + Moc%27ing log_frame.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing log_frame.h... + Moc%27ing log_frame.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing main_window.h... + Moc%27ing main_window.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing main_window.h... + Moc%27ing main_window.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing misc_tab.h... + Moc%27ing misc_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing misc_tab.h... + Moc%27ing misc_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing networking_tab.h... + Moc%27ing networking_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing networking_tab.h... + Moc%27ing networking_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing pad_settings_dialog.h... + Moc%27ing pad_settings_dialog.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing pad_settings_dialog.h... + Moc%27ing pad_settings_dialog.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing settings_dialog.h... + Moc%27ing settings_dialog.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing settings_dialog.h... + Moc%27ing settings_dialog.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing system_tab.h... + Moc%27ing system_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing system_tab.h... + Moc%27ing system_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing audio_tab.h... + Moc%27ing audio_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing audio_tab.h... + Moc%27ing audio_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing auto_pause_settings_dialog.h... + Moc%27ing auto_pause_settings_dialog.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing auto_pause_settings_dialog.h... + Moc%27ing auto_pause_settings_dialog.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing core_tab.h... + Moc%27ing core_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing core_tab.h... + Moc%27ing core_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing debugger_frame.h... + Moc%27ing debugger_frame.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing debugger_frame.h... + Moc%27ing debugger_frame.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing game_list_frame.h... + Moc%27ing game_list_frame.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing game_list_frame.h... + Moc%27ing game_list_frame.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + + Moc%27ing cg_disasm_window.h... + Moc%27ing cg_disasm_window.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing cg_disasm_window.h... + Moc%27ing cg_disasm_window.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing memory_string_searcher.h... + Moc%27ing memory_string_searcher.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing memory_string_searcher.h... + Moc%27ing memory_string_searcher.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing gui_settings.h... + Moc%27ing gui_settings.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing gui_settings.h... + Moc%27ing gui_settings.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing gui_tab.h... + Moc%27ing gui_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing gui_tab.h... + Moc%27ing gui_tab.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing kernel_explorer.h... + Moc%27ing kernel_explorer.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing kernel_explorer.h... + Moc%27ing kernel_explorer.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing emu_settings.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing emu_settings.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing emu_settings.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing emu_settings.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + + + + Moc%27ing msg_dialog_frame.h... + Moc%27ing msg_dialog_frame.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing msg_dialog_frame.h... + Moc%27ing msg_dialog_frame.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing rsx_debugger.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing rsx_debugger.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing rsx_debugger.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing rsx_debugger.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + + + Moc%27ing save_data_utility.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing save_data_utility.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing save_data_utility.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + Moc%27ing save_data_utility.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + + + + + + Moc%27ing welcome_dialog.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing welcome_dialog.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing welcome_dialog.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DNDEBUG -DQT_WINEXTRAS_LIB -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\release" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + Moc%27ing welcome_dialog.h... + .\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\QTGeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -D_WINDOWS -DUNICODE -DWIN32 -DWIN64 -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WINEXTRAS_LIB -DLLVM_AVAILABLE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE "-I.\..\Vulkan\Vulkan-LoaderAndValidationLayers\include" "-I.\.." "-I.\..\3rdparty\minidx12\Include" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtOpenGL" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtQuick" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtANGLE" "-I$(QTDIR)\include\QtQml" "-I$(QTDIR)\include\QtNetwork" "-I$(QTDIR)\include\QtCore" "-I.\debug" "-I$(QTDIR)\mkspecs\win32-msvc2015" "-I.\QTGeneratedFiles\$(ConfigurationName)\." "-I.\QTGeneratedFiles" "-I$(QTDIR)\include\QtWinExtras" "-I$(NOINHERIT)\." + $(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath) + $(QTDIR)\bin\moc.exe;%(FullPath) + + + + + + + + Document + true + true + $(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs) + $(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs) + cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E -Za $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >debug\moc_predefs.h + cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E -Za $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >debug\moc_predefs.h + Generate moc_predefs.h + Generate moc_predefs.h + debug\moc_predefs.h;%(Outputs) + debug\moc_predefs.h;%(Outputs) + + + Document + $(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs) + $(QTDIR)\mkspecs\features\data\dummy.cpp;%(AdditionalInputs) + cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E -Za $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h + cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E -Za $(QTDIR)\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h + Generate moc_predefs.h + Generate moc_predefs.h + release\moc_predefs.h;%(Outputs) + release\moc_predefs.h;%(Outputs) + true + true + + + + + %(FullPath);%(AdditionalInputs) + Rcc%27ing %(Identity)... + .\QTGeneratedFiles\qrc_%(Filename).cpp;%(Outputs) + "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\QTGeneratedFiles\qrc_%(Filename).cpp + %(FullPath);%(AdditionalInputs) + Rcc%27ing %(Identity)... + .\QTGeneratedFiles\qrc_%(Filename).cpp;%(Outputs) + "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\QTGeneratedFiles\qrc_%(Filename).cpp + %(FullPath);%(AdditionalInputs) + Rcc%27ing %(Identity)... + .\QTGeneratedFiles\qrc_%(Filename).cpp;%(Outputs) + "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\QTGeneratedFiles\qrc_%(Filename).cpp + %(FullPath);%(AdditionalInputs) + Rcc%27ing %(Identity)... + .\QTGeneratedFiles\qrc_%(Filename).cpp;%(Outputs) + "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\QTGeneratedFiles\qrc_%(Filename).cpp + + + + + + + + + + \ No newline at end of file diff --git a/rpcs3/rpcs3qt.vcxproj.filters b/rpcs3/rpcs3qt.vcxproj.filters new file mode 100644 index 0000000000..41f3a0f91c --- /dev/null +++ b/rpcs3/rpcs3qt.vcxproj.filters @@ -0,0 +1,648 @@ + + + + + {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} + cpp;c;cxx;moc;h;def;odl;idl;res; + + + {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} + cpp;c;cxx;moc;h;def;odl;idl;res; + + + {c7e705d0-5c35-4008-8a5f-690b35623ab9} + + + {f3356193-d7b3-4328-b5e2-7ab9e8ef9f3d} + cpp;moc + False + + + {46da41cb-0929-4bca-bf2c-30599aa91923} + cpp;moc + False + + + {364dd441-10bc-446b-b6aa-4d7b338f30fe} + + + {cc5a491c-6f1b-491a-8e4a-96743645fd3e} + + + {750a54d9-a15b-4d9a-9938-a15e00ba62f8} + + + {8f3a932a-5c23-4f8c-a29b-003c59840ef8} + + + {04f53189-8145-4a58-8fe0-3b1abebe11e9} + + + {0f9f8411-9536-42d8-8f46-5537fb4aae6f} + + + {9dcc13d5-0080-4338-baad-070a544b63b6} + cpp;moc + False + + + {ed43eb83-3470-4fec-9340-91385acd5d19} + cpp;moc + False + + + {D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E} + qrc;* + false + + + + + Source Files + + + rpcs3 + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Gui + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Io\Basic + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Io\Basic + + + Io\Basic + + + Io\DS4 + + + Io\MMJoystick + + + Io\XInput + + + rpcs3 + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Gui + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + Gui + + + Generated Files + + + Gui + + + Generated Files\Release - LLVM + + + Generated Files\Debug + + + Generated Files\Release + + + Generated Files\Debug - LLVM + + + + + Header Files + + + + Gui + + + Gui + + + Gui + + + Io\Basic + + + Io\DS4 + + + Io\MMJoystick + + + Io\XInput + + + Gui + + + Gui + + + Gui + + + + + Generated Files + + + Generated Files + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Gui + + + Io\Basic + + + Io\Basic + + + rpcs3 + + + Gui + + + Resource Files + + + Gui + + + \ No newline at end of file diff --git a/rpcs3/rpcs3qt/.qmake.conf b/rpcs3/rpcs3qt/.qmake.conf deleted file mode 100644 index 18d50a7899..0000000000 --- a/rpcs3/rpcs3qt/.qmake.conf +++ /dev/null @@ -1,3 +0,0 @@ -# P is project dir, B is build dir -P = $$PWD/.. -B = $$shadowed($$PWD) \ No newline at end of file diff --git a/rpcs3/rpcs3qt/AutoPauseSettingsDialog.cpp b/rpcs3/rpcs3qt/AutoPauseSettingsDialog.cpp deleted file mode 100644 index c3e7aff73b..0000000000 --- a/rpcs3/rpcs3qt/AutoPauseSettingsDialog.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#ifdef QT_UI - -#include -#include -#include -#include - -#include "AutoPauseSettingsDialog.h" - -AutoPauseSettingsDialog::AutoPauseSettingsDialog(QWidget *parent) : QDialog(parent) -{ - QLabel *desc = new QLabel(tr("To use auto pause: enter the ID(s) of a function or a system call.\nRestart of the game is required to apply. You can enable/disable this in the settings.")); - - QTableWidget *pauseList = new QTableWidget; - pauseList->setColumnCount(2); - pauseList->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Call ID"))); - pauseList->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Type"))); - - QPushButton *clearButton = new QPushButton(tr("Clear")); - - QPushButton *reloadButton = new QPushButton(tr("Reload")); - - QPushButton *saveButton = new QPushButton(tr("Save")); - connect(saveButton, &QAbstractButton::clicked, this, &QDialog::accept); - - QPushButton *cancelButton = new QPushButton(tr("Cancel")); - cancelButton->setDefault(true); - connect(cancelButton, &QAbstractButton::clicked, this, &QWidget::close); - - QHBoxLayout *buttonsLayout = new QHBoxLayout; - buttonsLayout->addWidget(clearButton); - buttonsLayout->addWidget(reloadButton); - buttonsLayout->addStretch(); - buttonsLayout->addWidget(saveButton); - buttonsLayout->addWidget(cancelButton); - - QVBoxLayout *mainLayout = new QVBoxLayout; - mainLayout->addWidget(desc); - mainLayout->addWidget(pauseList); - mainLayout->addLayout(buttonsLayout); - setLayout(mainLayout); - - setMinimumSize(QSize(400, 360)); - - setWindowTitle(tr("Auto Pause Manager")); -} - -#endif // QT_UI - diff --git a/rpcs3/rpcs3qt/AutoPauseSettingsDialog.h b/rpcs3/rpcs3qt/AutoPauseSettingsDialog.h deleted file mode 100644 index 387c52c740..0000000000 --- a/rpcs3/rpcs3qt/AutoPauseSettingsDialog.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef AUTOPAUSESETTINGSDIALOG_H -#define AUTOPAUSESETTINGSDIALOG_H - -#include - -class AutoPauseSettingsDialog : public QDialog -{ - Q_OBJECT - -public: - explicit AutoPauseSettingsDialog(QWidget *parent = 0); -}; - -#endif // AUTOPAUSESETTINGSDIALOG_H diff --git a/rpcs3/rpcs3qt/audiotab.cpp b/rpcs3/rpcs3qt/audio_tab.cpp similarity index 52% rename from rpcs3/rpcs3qt/audiotab.cpp rename to rpcs3/rpcs3qt/audio_tab.cpp index 2643e8a804..ae41ad4bb0 100644 --- a/rpcs3/rpcs3qt/audiotab.cpp +++ b/rpcs3/rpcs3qt/audio_tab.cpp @@ -1,38 +1,33 @@ -#ifdef QT_UI - #include #include #include #include #include -#include "audiotab.h" +#include "audio_tab.h" -AudioTab::AudioTab(QWidget *parent) : QWidget(parent) +audio_tab::audio_tab(std::shared_ptr xemu_settings, QWidget *parent) : QWidget(parent) { // Audio Out QGroupBox *audioOut = new QGroupBox(tr("Audio Out")); - QComboBox *audioOutBox = new QComboBox; - audioOutBox->addItem(tr("Null")); -#ifdef _WIN32 - audioOutBox->addItem(tr("XAudio2")); -#endif // _WIN32 - audioOutBox->addItem(tr("OpenAL")); + QComboBox *audioOutBox = xemu_settings->CreateEnhancedComboBox(emu_settings::AudioRenderer, this); QVBoxLayout *audioOutVbox = new QVBoxLayout; audioOutVbox->addWidget(audioOutBox); audioOut->setLayout(audioOutVbox); // Checkboxes - QCheckBox *audioDump = new QCheckBox(tr("Dump to file")); - QCheckBox *conv = new QCheckBox(tr("Convert to 16 bit")); + QCheckBox *audioDump = xemu_settings->CreateEnhancedCheckBox(emu_settings::DumpToFile, this); + QCheckBox *conv = xemu_settings->CreateEnhancedCheckBox(emu_settings::ConvertTo16Bit, this); + QCheckBox *downmix = xemu_settings->CreateEnhancedCheckBox(emu_settings::DownmixStereo, this); // Main layout QVBoxLayout *vbox = new QVBoxLayout; vbox->addWidget(audioOut); vbox->addWidget(audioDump); vbox->addWidget(conv); + vbox->addWidget(downmix); vbox->addStretch(); QHBoxLayout *hbox = new QHBoxLayout; @@ -40,5 +35,3 @@ AudioTab::AudioTab(QWidget *parent) : QWidget(parent) hbox->addStretch(); setLayout(hbox); } - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/audio_tab.h b/rpcs3/rpcs3qt/audio_tab.h new file mode 100644 index 0000000000..2d9b8ca1f7 --- /dev/null +++ b/rpcs3/rpcs3qt/audio_tab.h @@ -0,0 +1,22 @@ +#ifndef AUDIOTAB_H +#define AUDIOTAB_H + +#include "emu_settings.h" + +#include + +#include + +class audio_tab : public QWidget +{ + Q_OBJECT + +public: + explicit audio_tab(std::shared_ptr xemu_settings, QWidget *parent = 0); + +signals: + +public slots: +}; + +#endif // AUDIOTAB_H diff --git a/rpcs3/rpcs3qt/audiotab.h b/rpcs3/rpcs3qt/audiotab.h deleted file mode 100644 index fe4d3f8967..0000000000 --- a/rpcs3/rpcs3qt/audiotab.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef AUDIOTAB_H -#define AUDIOTAB_H - -#include - -class AudioTab : public QWidget -{ - Q_OBJECT - -public: - explicit AudioTab(QWidget *parent = 0); - -signals: - -public slots: -}; - -#endif // AUDIOTAB_H diff --git a/rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp b/rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp new file mode 100644 index 0000000000..45b4e1a8ef --- /dev/null +++ b/rpcs3/rpcs3qt/auto_pause_settings_dialog.cpp @@ -0,0 +1,268 @@ + +#include "auto_pause_settings_dialog.h" + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } + +auto_pause_settings_dialog::auto_pause_settings_dialog(QWidget *parent) : QDialog(parent) +{ + QLabel *description = new QLabel(tr("To use auto pause: enter the ID(s) of a function or a system call.\nRestart of the game is required to apply. You can enable/disable this in the settings."), this); + + pauseList = new QTableWidget(this); + pauseList->setColumnCount(2); + pauseList->setHorizontalHeaderLabels(QStringList() << tr("Call ID") << tr("Type")); + //pauseList->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); + pauseList->setSelectionBehavior(QAbstractItemView::SelectRows); + pauseList->setContextMenuPolicy(Qt::CustomContextMenu); + pauseList->setItemDelegate(new table_item_delegate(this)); + pauseList->setShowGrid(false); + + QPushButton *clearButton = new QPushButton(tr("Clear"), this); + QPushButton *reloadButton = new QPushButton(tr("Reload"), this); + QPushButton *saveButton = new QPushButton(tr("Save"), this); + QPushButton *cancelButton = new QPushButton(tr("Cancel"), this); + cancelButton->setDefault(true); + + QHBoxLayout *buttonsLayout = new QHBoxLayout(); + buttonsLayout->addWidget(clearButton); + buttonsLayout->addWidget(reloadButton); + buttonsLayout->addStretch(); + buttonsLayout->addWidget(saveButton); + buttonsLayout->addWidget(cancelButton); + + QVBoxLayout *mainLayout = new QVBoxLayout(this); + mainLayout->addWidget(description); + mainLayout->addWidget(pauseList); + mainLayout->addLayout(buttonsLayout); + setLayout(mainLayout); + + setMinimumSize(QSize(400, 360)); + setWindowTitle(tr("Auto Pause Manager")); + + //Events + connect(pauseList, &QTableWidget::customContextMenuRequested, this, &auto_pause_settings_dialog::ShowContextMenu); + connect(clearButton, &QAbstractButton::clicked, [=](){ m_entries.clear(); UpdateList(); }); + connect(reloadButton, &QAbstractButton::clicked, [=](){ LoadEntries(); UpdateList(); }); + connect(saveButton, &QAbstractButton::clicked, [=](){ + SaveEntries(); + LOG_SUCCESS(HLE, "Auto Pause: File pause.bin was updated."); + }); + connect(cancelButton, &QAbstractButton::clicked, this, &QWidget::close); + + Emu.Stop(); + + LoadEntries(); + UpdateList(); + setFixedSize(sizeHint()); +} + +//Copied some from AutoPause. +void auto_pause_settings_dialog::LoadEntries(void) +{ + m_entries.clear(); + m_entries.reserve(16); + + fs::file list(fs::get_config_dir() + "pause.bin"); + + if (list) + { + //System calls ID and Function calls ID are all u32 iirc. + u32 num; + size_t fmax = list.size(); + size_t fcur = 0; + list.seek(0); + while (fcur <= fmax - sizeof(u32)) + { + list.read(&num, sizeof(u32)); + fcur += sizeof(u32); + if (num == 0xFFFFFFFF) break; + + m_entries.emplace_back(num); + } + } +} + +//Copied some from AutoPause. +//Tip: This one doesn't check for the file is being read or not. +//This would always use a 0xFFFFFFFF as end of the pause.bin +void auto_pause_settings_dialog::SaveEntries(void) +{ + fs::file list(fs::get_config_dir() + "pause.bin", fs::rewrite); + //System calls ID and Function calls ID are all u32 iirc. + u32 num = 0; + list.seek(0); + for (size_t i = 0; i < m_entries.size(); ++i) + { + if (num == 0xFFFFFFFF) continue; + num = m_entries[i]; + list.write(&num, sizeof(u32)); + } + num = 0xFFFFFFFF; + list.write(&num, sizeof(u32)); +} + +void auto_pause_settings_dialog::UpdateList(void) +{ + pauseList->clearContents(); + pauseList->setRowCount(m_entries.size()); + for (size_t i = 0; i < m_entries.size(); ++i) + { + QTableWidgetItem* callItem = new QTableWidgetItem; + QTableWidgetItem* typeItem = new QTableWidgetItem; + callItem->setFlags(callItem->flags() & ~Qt::ItemIsEditable); + typeItem->setFlags(typeItem->flags() & ~Qt::ItemIsEditable); + if (m_entries[i] != 0xFFFFFFFF) + { + callItem->setData(Qt::DisplayRole, qstr(fmt::format("%08x", m_entries[i]))); + } + else + { + callItem->setData(Qt::DisplayRole, tr("Unset")); + } + + if (m_entries[i] < 1024) + { + typeItem->setData(Qt::DisplayRole, tr("System Call")); + } + else + { + typeItem->setData(Qt::DisplayRole, tr("Function Call")); + } + + pauseList->setItem(i, 0, callItem); + pauseList->setItem(i, 1, typeItem); + } +} + +void auto_pause_settings_dialog::ShowContextMenu(const QPoint &pos) +{ + int row = pauseList->indexAt(pos).row(); + + QPoint globalPos = pauseList->mapToGlobal(pos); + QMenu myMenu; + + // Make Actions + QAction* add = myMenu.addAction(tr("&Add")); + QAction* remove = myMenu.addAction(tr("&Remove")); + myMenu.addSeparator(); + QAction* config = myMenu.addAction(tr("&Config")); + + if (row == -1) + { + remove->setEnabled(false); + config->setEnabled(false); + } + + auto OnEntryConfig = [=](int row, bool newEntry) + { + AutoPauseConfigDialog *config = new AutoPauseConfigDialog(this, this, newEntry, &m_entries[row]); + config->setModal(true); + config->exec(); + UpdateList(); + }; + + connect(add, &QAction::triggered, [=]() { + m_entries.emplace_back(0xFFFFFFFF); + UpdateList(); + u32 idx = m_entries.size() - 1; + pauseList->selectRow(idx); + OnEntryConfig(idx, true); + }); + connect(remove, &QAction::triggered, this, &auto_pause_settings_dialog::OnRemove); + connect(config, &QAction::triggered, [=]() {OnEntryConfig(row, false); }); + + myMenu.exec(globalPos); +} + +void auto_pause_settings_dialog::OnRemove() +{ + QModelIndexList selection = pauseList->selectionModel()->selectedRows(); + qSort(selection.begin(), selection.end()); // crash on unordered + for (int i = selection.count() - 1; i >= 0; i--) + { + m_entries.erase(m_entries.begin() + selection.at(i).row()); + } + UpdateList(); +} + +void auto_pause_settings_dialog::keyPressEvent(QKeyEvent *event) +{ + if (event->key() == Qt::Key_Delete) + { + OnRemove(); + } +} + +AutoPauseConfigDialog::AutoPauseConfigDialog(QWidget* parent, auto_pause_settings_dialog* apsd, bool newEntry, u32 *entry) + : QDialog(parent), m_presult(entry), b_newEntry(newEntry), apsd_parent(apsd) +{ + m_entry = *m_presult; + setMinimumSize(QSize(300, -1)); + + QPushButton* button_ok = new QPushButton(tr("&Ok"), this); + QPushButton* button_cancel = new QPushButton(tr("&Cancel"), this); + button_ok->setFixedWidth(50); + button_cancel->setFixedWidth(50); + + QLabel* description = new QLabel(tr("Specify ID of System Call or Function Call below. You need to use a Hexadecimal ID."), this); + description->setWordWrap(true); + + m_current_converted = new QLabel(tr("Currently it gets an id of \"Unset\"."), this); + m_current_converted->setWordWrap(true); + + m_id = new QLineEdit(this); + m_id->setText(qstr(fmt::format("%08x", m_entry))); + m_id->setPlaceholderText("ffffffff"); + m_id->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont)); + m_id->setMaxLength(8); + m_id->setFixedWidth(65); + setWindowTitle("Auto Pause Setting: " + m_id->text()); + + connect(button_cancel, &QAbstractButton::clicked, this, &AutoPauseConfigDialog::OnCancel); + connect(button_ok, &QAbstractButton::clicked, this, &AutoPauseConfigDialog::OnOk); + connect(m_id, &QLineEdit::textChanged, this, &AutoPauseConfigDialog::OnUpdateValue); + + QHBoxLayout* configHBox = new QHBoxLayout(); + configHBox->addWidget(m_id); + configHBox->addWidget(button_ok); + configHBox->addWidget(button_cancel); + configHBox->setAlignment(Qt::AlignCenter); + + QVBoxLayout* mainLayout = new QVBoxLayout(this); + mainLayout->addWidget(description); + mainLayout->addLayout(configHBox); + mainLayout->addWidget(m_current_converted); + + setLayout(mainLayout); + setFixedSize(QSize(300, sizeHint().height())); + + OnUpdateValue(); +} + +void AutoPauseConfigDialog::OnOk() +{ + bool ok; + ullong value = m_id->text().toULongLong(&ok, 16); + + m_entry = value; + *m_presult = m_entry; + + accept(); +} + +void AutoPauseConfigDialog::OnCancel() +{ + if (b_newEntry) + { + apsd_parent->OnRemove(); + } + close(); +} + +void AutoPauseConfigDialog::OnUpdateValue() +{ + bool ok; + ullong value = m_id->text().toULongLong(&ok, 16); + const bool is_ok = ok && value <= UINT32_MAX; + + m_current_converted->setText(qstr(fmt::format("Current value: %08x (%s)", u32(value), is_ok ? "OK" : "conversion failed"))); +} diff --git a/rpcs3/rpcs3qt/auto_pause_settings_dialog.h b/rpcs3/rpcs3qt/auto_pause_settings_dialog.h new file mode 100644 index 0000000000..6e268ab35f --- /dev/null +++ b/rpcs3/rpcs3qt/auto_pause_settings_dialog.h @@ -0,0 +1,70 @@ +#ifndef AUTOPAUSESETTINGSDIALOG_H +#define AUTOPAUSESETTINGSDIALOG_H + +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/Memory/Memory.h" +#include "table_item_delegate.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class auto_pause_settings_dialog : public QDialog +{ + Q_OBJECT + + enum + { + id_add, + id_remove, + id_config, + }; + + std::vector m_entries; + +public: + explicit auto_pause_settings_dialog(QWidget* parent); + QTableWidget *pauseList; + void UpdateList(void); + void LoadEntries(void); + void SaveEntries(void); + +public slots : + void OnRemove(); +private slots : + void ShowContextMenu(const QPoint &pos); + void keyPressEvent(QKeyEvent *event); +}; + +class AutoPauseConfigDialog : public QDialog +{ + Q_OBJECT + + u32 m_entry; + u32* m_presult; + bool b_newEntry; + QLineEdit* m_id; + QLabel* m_current_converted; + auto_pause_settings_dialog* apsd_parent; + +public: + explicit AutoPauseConfigDialog(QWidget* parent, auto_pause_settings_dialog* apsd, bool newEntry, u32* entry); + +private slots : + void OnOk(); + void OnCancel(); + void OnUpdateValue(); +}; + +#endif // AUTOPAUSESETTINGSDIALOG_H diff --git a/rpcs3/rpcs3qt/cg_disasm_window.cpp b/rpcs3/rpcs3qt/cg_disasm_window.cpp new file mode 100644 index 0000000000..f2a35eba69 --- /dev/null +++ b/rpcs3/rpcs3qt/cg_disasm_window.cpp @@ -0,0 +1,80 @@ +#include "stdafx.h" + +#include "cg_disasm_window.h" +#include "Emu/System.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "Emu/RSX/CgBinaryProgram.h" + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } +inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); } + +cg_disasm_window::cg_disasm_window(QWidget* parent): QTabWidget() +{ + setWindowTitle(tr("Cg Disasm")); + setAttribute(Qt::WA_DeleteOnClose); + setMinimumSize(200, 150); // seems fine on win 10 + resize(QSize(620, 395)); + + tab_disasm = new QWidget(this); + tab_glsl = new QWidget(this); + addTab(tab_disasm, "ASM"); + addTab(tab_glsl, "GLSL"); + + QVBoxLayout* layout_disasm = new QVBoxLayout(); + m_disasm_text = new QTextEdit(); + m_disasm_text->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_disasm_text->setReadOnly(true); + m_disasm_text->setWordWrapMode(QTextOption::NoWrap); + m_disasm_text->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont)); + layout_disasm->addWidget(m_disasm_text); + tab_disasm->setLayout(layout_disasm); + + QVBoxLayout* layout_glsl = new QVBoxLayout(); + m_glsl_text = new QTextEdit(); + m_glsl_text->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_glsl_text->setReadOnly(true); + m_glsl_text->setWordWrapMode(QTextOption::NoWrap); + m_glsl_text->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont)); + layout_glsl->addWidget(m_glsl_text); + tab_glsl->setLayout(layout_glsl); + + m_disasm_text->setContextMenuPolicy(Qt::CustomContextMenu); + m_glsl_text->setContextMenuPolicy(Qt::CustomContextMenu); + connect(m_disasm_text, &QWidget::customContextMenuRequested, this, &cg_disasm_window::ShowContextMenu); + connect(m_glsl_text, &QWidget::customContextMenuRequested, this, &cg_disasm_window::ShowContextMenu); +} + +void cg_disasm_window::ShowContextMenu(const QPoint &pos) // this is a slot +{ + QMenu myMenu; + QPoint globalPos = mapToGlobal(pos); + QAction* clear = new QAction(tr("&Clear")); + QAction* open = new QAction(tr("Open &Cg binary program")); + + myMenu.addAction(open); + myMenu.addSeparator(); + myMenu.addAction(clear); + + auto l_clear = [=]() {m_disasm_text->clear(); m_glsl_text->clear();}; + connect(clear, &QAction::triggered, l_clear); + connect(open, &QAction::triggered, [=] { + QString filePath = QFileDialog::getOpenFileName(this, tr("Select Cg program object"), m_path_last, tr("Cg program objects (*.fpo;*.vpo);;")); + if (filePath == NULL) return; + m_path_last = QFileInfo(filePath).path(); + + CgBinaryDisasm disasm(sstr(filePath)); + disasm.BuildShaderBody(); + m_disasm_text->setText(qstr(disasm.GetArbShader())); + m_glsl_text->setText(qstr(disasm.GetGlslShader())); + }); + + myMenu.exec(globalPos); +} diff --git a/rpcs3/rpcs3qt/cg_disasm_window.h b/rpcs3/rpcs3qt/cg_disasm_window.h new file mode 100644 index 0000000000..f6e837314a --- /dev/null +++ b/rpcs3/rpcs3qt/cg_disasm_window.h @@ -0,0 +1,26 @@ +#ifndef CGDISASMWINDOW_H +#define CGDISASMWINDOW_H + +#include +#include + +class cg_disasm_window : public QTabWidget +{ + Q_OBJECT + +private slots: + void ShowContextMenu(const QPoint &pos); +private: + QString m_path_last; + QTextEdit* m_disasm_text; + QTextEdit* m_glsl_text; + QWidget* tab_disasm; + QWidget* tab_glsl; + + QAction *openCgBinaryProgram; + +public: + explicit cg_disasm_window(QWidget *parent); +}; + +#endif // CGDISASMWINDOW_H diff --git a/rpcs3/rpcs3qt/core_tab.cpp b/rpcs3/rpcs3qt/core_tab.cpp new file mode 100644 index 0000000000..82d617676b --- /dev/null +++ b/rpcs3/rpcs3qt/core_tab.cpp @@ -0,0 +1,259 @@ +#include "core_tab.h" + +#include "stdafx.h" +#include "Emu/System.h" +#include "Crypto/unself.h" + +#include "rpcs3qt/emu_settings.h" + +#include +#include +#include +#include +#include +#include + +#include + +inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); } + +core_tab::core_tab(std::shared_ptr settings, QWidget *parent) : QWidget(parent), xemu_settings(settings) +{ + // PPU Decoder + QGroupBox *ppuDecoder = new QGroupBox(tr("PPU Decoder")); + QVBoxLayout *ppuVbox = new QVBoxLayout; + + { // PPU Stuff : I could make a lambda/special getter in emu_settings, but it's only used three times like this, and two times they're done slighly differently (one setting is disabled). + std::string selectedPPU = settings->GetSetting(emu_settings::PPUDecoder); + for (QString settingType : settings->GetSettingOptions(emu_settings::PPUDecoder)) + { + std::string curr = sstr(settingType); + QRadioButton* butt = new QRadioButton(tr(curr.c_str()), this); + butt->setCheckable(true); + ppuVbox->addWidget(butt); + if (curr == selectedPPU) + { + butt->setChecked(true); + } + connect(butt, &QAbstractButton::pressed, [=]() {settings->SetSetting(emu_settings::PPUDecoder, curr); }); + } + } + ppuDecoder->setLayout(ppuVbox); + + // SPU Decoder + QGroupBox *spuDecoder = new QGroupBox(tr("SPU Decoder")); + QVBoxLayout *spuVbox = new QVBoxLayout; + + { // Spu stuff + std::string selectedSPU = settings->GetSetting(emu_settings::SPUDecoder); + for (QString settingType : settings->GetSettingOptions(emu_settings::SPUDecoder)) + { + std::string curr = sstr(settingType); + QRadioButton* butt = new QRadioButton(tr(curr.c_str()), this); + if (curr == "Recompiler (LLVM)") + { + butt->setEnabled(false); + } + butt->setCheckable(true); + spuVbox->addWidget(butt); + if (curr == selectedSPU) + { + butt->setChecked(true); + } + connect(butt, &QAbstractButton::pressed, [=]() {settings->SetSetting(emu_settings::SPUDecoder, curr); }); + } + } + spuDecoder->setLayout(spuVbox); + + // Checkboxes + QCheckBox *hookStFunc = settings->CreateEnhancedCheckBox(emu_settings::HookStaticFuncs, this); + QCheckBox *bindSPUThreads = settings->CreateEnhancedCheckBox(emu_settings::BindSPUThreads, this); + QCheckBox *lowerSPUThrPrio = settings->CreateEnhancedCheckBox(emu_settings::LowerSPUThreadPrio, this); + + // Load libraries + QGroupBox *lle = new QGroupBox(tr("Load libraries")); + QButtonGroup *libModeBG = new QButtonGroup(this); + QVBoxLayout *lleVbox = new QVBoxLayout; + + + {// Handle lib loading options + std::string selectedLib = settings->GetSetting(emu_settings::LibLoadOptions); + for (QString settingType : settings->GetSettingOptions(emu_settings::LibLoadOptions)) + { + std::string curr = sstr(settingType); + QRadioButton* butt = new QRadioButton(tr(curr.c_str()), lle); + butt->setCheckable(true); + libModeBG->addButton(butt); + lleVbox->addWidget(butt); + if (curr == selectedLib) + { + butt->setChecked(true); + } + connect(butt, &QAbstractButton::pressed, [=]() {settings->SetSetting(emu_settings::LibLoadOptions, curr); }); + } + } + lleList = new QListWidget; + lleList->setSelectionMode(QAbstractItemView::MultiSelection); + searchBox = new QLineEdit; + + // Sort string vector alphabetically + static const auto sort_string_vector = [](std::vector& vec) + { + std::sort(vec.begin(), vec.end(), [](const std::string &str1, const std::string &str2) { return str1 < str2; }); + }; + + std::vector loadedLibs = xemu_settings->GetLoadedLibraries(); + + sort_string_vector(loadedLibs); + + for (auto lib : loadedLibs) + { + QListWidgetItem* item = new QListWidgetItem(qstr(lib), lleList); + item->setFlags(item->flags() | Qt::ItemIsUserCheckable); // set checkable flag + item->setCheckState(Qt::Checked); // AND initialize check state + lleList->addItem(item); + } + const std::string& lle_dir = Emu.GetLibDir(); // TODO + + std::unordered_set set(loadedLibs.begin(), loadedLibs.end()); + std::vector lle_module_list_unselected; + + for (const auto& prxf : fs::dir(lle_dir)) + { + // List found unselected modules + if (prxf.is_directory || (prxf.name.substr(std::max(size_t(3), prxf.name.length()) - 3)) != "prx") + continue; + if (verify_npdrm_self_headers(fs::file(lle_dir + prxf.name)) && !set.count(prxf.name)) + { + lle_module_list_unselected.push_back(prxf.name); + } + + } + + sort_string_vector(lle_module_list_unselected); + + for (auto lib : lle_module_list_unselected) + { + QListWidgetItem* item = new QListWidgetItem(qstr(lib), lleList); + item->setFlags(item->flags() | Qt::ItemIsUserCheckable); // set checkable flag + item->setCheckState(Qt::Unchecked); // AND initialize check state + lleList->addItem(item); + } + + + // lleVbox + lleVbox->addSpacing(5); + lleVbox->addWidget(lleList); + lleVbox->addWidget(searchBox); + lle->setLayout(lleVbox); + + // Main layout + QVBoxLayout *vbox = new QVBoxLayout; + vbox->addWidget(ppuDecoder); + vbox->addWidget(spuDecoder); + vbox->addWidget(hookStFunc); + vbox->addWidget(bindSPUThreads); + vbox->addWidget(lowerSPUThrPrio); + vbox->addStretch(); + + QHBoxLayout *hbox = new QHBoxLayout; + hbox->addLayout(vbox); + hbox->addWidget(lle); + setLayout(hbox); + + auto l_OnLibButtonClicked = [=](int ind) + { + if (ind == -3 || ind == -4) + { + shouldSaveLibs = true; + searchBox->setEnabled(true); + lleList->setEnabled(true); + } + else + { + shouldSaveLibs = false; + searchBox->setEnabled(false); + lleList->setEnabled(false); + } + }; + + auto l_OnSearchBoxTextChanged = [=](QString text) + { + QString searchTerm = text.toLower(); + QList checked_Libs; + QList unchecked_Libs; + + // create sublists. we need clones to preserve checkstates + for (int i = 0; i < lleList->count(); ++i) + { + if (lleList->item(i)->checkState() == Qt::Checked) + { + checked_Libs.append(lleList->item(i)->clone()); + } + else + { + unchecked_Libs.append(lleList->item(i)->clone()); + } + } + + // sort sublists + auto qLessThan = [](QListWidgetItem *i1, QListWidgetItem *i2) { return i1->text() < i2->text(); }; + qSort(checked_Libs.begin(), checked_Libs.end(), qLessThan); + qSort(unchecked_Libs.begin(), unchecked_Libs.end(), qLessThan); + + // refill library list + lleList->clear(); + + for (auto lib : checked_Libs) + { + lleList->addItem(lib); + } + for (auto lib : unchecked_Libs) + { + lleList->addItem(lib); + } + + // only show items filtered for search text + for (int i = 0; i < lleList->count(); i++) + { + if (lleList->item(i)->text().contains(searchTerm)) + { + lleList->setRowHidden(i, false); + } + else + { + lleList->setRowHidden(i, true); + } + } + }; + + // Events + connect(libModeBG, static_cast(&QButtonGroup::buttonClicked), l_OnLibButtonClicked); + connect(searchBox, &QLineEdit::textChanged, l_OnSearchBoxTextChanged); + + int buttid = libModeBG->checkedId(); + if (buttid != -1) + { + l_OnLibButtonClicked(buttid); + } +} + +void core_tab::SaveSelectedLibraries() +{ + if (shouldSaveLibs) + { + std::set selectedlle; + for (int i =0; icount(); ++i) + { + auto item = lleList->item(i); + if (item->checkState() != Qt::CheckState::Unchecked) + { + std::string lib = sstr(item->text()); + selectedlle.emplace(lib); + } + } + + std::vector selected_ls = std::vector(selectedlle.begin(), selectedlle.end()); + xemu_settings->SaveSelectedLibraries(selected_ls); + } +} diff --git a/rpcs3/rpcs3qt/core_tab.h b/rpcs3/rpcs3qt/core_tab.h new file mode 100644 index 0000000000..2351091f0a --- /dev/null +++ b/rpcs3/rpcs3qt/core_tab.h @@ -0,0 +1,29 @@ +#ifndef CORETAB_H +#define CORETAB_H + +#include "emu_settings.h" + +#include +#include +#include + +#include + +class core_tab : public QWidget +{ + Q_OBJECT + +public: + explicit core_tab(std::shared_ptr xSettings, QWidget *parent = 0); +public slots: + void SaveSelectedLibraries(); + +private: + bool shouldSaveLibs = false; + QListWidget *lleList; + QLineEdit *searchBox; + + std::shared_ptr xemu_settings; +}; + +#endif // CORETAB_H diff --git a/rpcs3/rpcs3qt/coretab.cpp b/rpcs3/rpcs3qt/coretab.cpp deleted file mode 100644 index 99d14b25b9..0000000000 --- a/rpcs3/rpcs3qt/coretab.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#ifdef QT_UI - -#include -#include -#include -#include -#include -#include - -#include "coretab.h" - -CoreTab::CoreTab(QWidget *parent) : QWidget(parent) -{ - // PPU Decoder - QGroupBox *ppuDecoder = new QGroupBox(tr("PPU Decoder")); - - QRadioButton *ppuRadio1 = new QRadioButton(tr("Interpreter (precise)")); - QRadioButton *ppuRadio2 = new QRadioButton(tr("Interpreter (fast)")); - QRadioButton *ppuRadio3 = new QRadioButton(tr("Recompiler (LLVM)")); - - QVBoxLayout *ppuVbox = new QVBoxLayout; - ppuVbox->addWidget(ppuRadio1); - ppuVbox->addWidget(ppuRadio2); - ppuVbox->addWidget(ppuRadio3); - ppuDecoder->setLayout(ppuVbox); - - // SPU Decoder - QGroupBox *spuDecoder = new QGroupBox(tr("SPU Decoder")); - - QRadioButton *spuRadio1 = new QRadioButton(tr("Interpreter (precise)")); - QRadioButton *spuRadio2 = new QRadioButton(tr("Interpreter (fast)")); - QRadioButton *spuRadio3 = new QRadioButton(tr("Recompiler (ASMJIT)")); - QRadioButton *spuRadio4 = new QRadioButton(tr("Recompiler (LLVM)")); - spuRadio4->setEnabled(false); // TODO - - QVBoxLayout *spuVbox = new QVBoxLayout; - spuVbox->addWidget(spuRadio1); - spuVbox->addWidget(spuRadio2); - spuVbox->addWidget(spuRadio3); - spuVbox->addWidget(spuRadio4); - spuDecoder->setLayout(spuVbox); - - // Checkboxes - QCheckBox *hookStFunc = new QCheckBox(tr("Hook static functions")); - QCheckBox *loadLiblv2 = new QCheckBox(tr("Load liblv2.sprx only")); - - // Load libraries - QGroupBox *lle = new QGroupBox(tr("Load libraries")); - - lleList = new QListWidget; - searchBox = new QLineEdit; - connect(searchBox, &QLineEdit::textChanged, this, &CoreTab::OnSearchBoxTextChanged); - - QVBoxLayout *lleVbox = new QVBoxLayout; - lleVbox->addWidget(lleList); - lleVbox->addWidget(searchBox); - lle->setLayout(lleVbox); - - // Main layout - QVBoxLayout *vbox = new QVBoxLayout; - vbox->addWidget(ppuDecoder); - vbox->addWidget(spuDecoder); - vbox->addWidget(hookStFunc); - vbox->addWidget(loadLiblv2); - vbox->addStretch(); - - QHBoxLayout *hbox = new QHBoxLayout; - hbox->addLayout(vbox); - hbox->addWidget(lle); - setLayout(hbox); -} - -void CoreTab::OnSearchBoxTextChanged() -{ - if (searchBox->text().isEmpty()) - qDebug() << "Empty!"; - - lleList->clear(); - - QString searchTerm = searchBox->text().toLower(); -} - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/coretab.h b/rpcs3/rpcs3qt/coretab.h deleted file mode 100644 index 41fbdd1384..0000000000 --- a/rpcs3/rpcs3qt/coretab.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef CORETAB_H -#define CORETAB_H - -#include -#include -#include - -class CoreTab : public QWidget -{ - Q_OBJECT - -public: - explicit CoreTab(QWidget *parent = 0); - -private slots: - void OnSearchBoxTextChanged(); - -private: - QListWidget *lleList; - QLineEdit *searchBox; -}; - -#endif // CORETAB_H diff --git a/rpcs3/rpcs3qt/debugger_frame.cpp b/rpcs3/rpcs3qt/debugger_frame.cpp new file mode 100644 index 0000000000..3e904a9910 --- /dev/null +++ b/rpcs3/rpcs3qt/debugger_frame.cpp @@ -0,0 +1,568 @@ +#include "debugger_frame.h" + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } + +debugger_frame::debugger_frame(QWidget *parent) : QDockWidget(tr("Debugger"), parent) +{ + pSize = 10; + + update = new QTimer(this); + connect(update, &QTimer::timeout, this, &debugger_frame::UpdateUI); + EnableUpdateTimer(true); + + body = new QWidget(this); + mono = QFontDatabase::systemFont(QFontDatabase::FixedFont); + mono.setPointSize(pSize); + QFontMetrics* fontMetrics = new QFontMetrics(mono); + + QVBoxLayout* vbox_p_main = new QVBoxLayout(); + QHBoxLayout* hbox_b_main = new QHBoxLayout(); + + m_list = new debugger_list(this); + m_choice_units = new QComboBox(this); + m_choice_units->setSizeAdjustPolicy(QComboBox::AdjustToContents); + m_choice_units->setMaxVisibleItems(30); + m_choice_units->setMaximumWidth(500); + + m_go_to_addr = new QPushButton(tr("Go To Address"), this); + m_go_to_pc = new QPushButton(tr("Go To PC"), this); + m_btn_step = new QPushButton(tr("Step"), this); + m_btn_run = new QPushButton(tr("Run"), this); + m_btn_pause = new QPushButton(tr("Pause"), this); + + EnableButtons(Emu.IsRunning() || Emu.IsPaused()); + + hbox_b_main->addWidget(m_go_to_addr); + hbox_b_main->addWidget(m_go_to_pc); + hbox_b_main->addWidget(m_btn_step); + hbox_b_main->addWidget(m_btn_run); + hbox_b_main->addWidget(m_btn_pause); + hbox_b_main->addWidget(m_choice_units); + hbox_b_main->addStretch(); + + //Registers + m_regs = new QTextEdit(this); + m_regs->setLineWrapMode(QTextEdit::NoWrap); + m_regs->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); + + m_list->setFont(mono); + m_regs->setFont(mono); + + QHBoxLayout* hbox_w_list = new QHBoxLayout(); + hbox_w_list->addWidget(m_list); + hbox_w_list->addWidget(m_regs); + + vbox_p_main->addLayout(hbox_b_main); + vbox_p_main->addLayout(hbox_w_list); + + body->setLayout(vbox_p_main); + setWidget(body); + + m_list->setWindowTitle(tr("ASM")); + for (uint i = 0; i < m_list->m_item_count; ++i) + { + m_list->insertItem(i, new QListWidgetItem("")); + } + m_list->setSizeAdjustPolicy(QListWidget::AdjustToContents); + + connect(m_go_to_addr, &QAbstractButton::clicked, this, &debugger_frame::Show_Val); + connect(m_go_to_pc, &QAbstractButton::clicked, this, &debugger_frame::Show_PC); + connect(m_btn_step, &QAbstractButton::clicked, this, &debugger_frame::DoStep); + connect(m_btn_run, &QAbstractButton::clicked, [=](){ + const auto cpu = this->cpu.lock(); + if (cpu && cpu->state.test_and_reset(cpu_flag::dbg_pause)) + if (!test(cpu->state, cpu_flag::dbg_pause + cpu_flag::dbg_global_pause)) + cpu->notify(); + UpdateUI(); + }); + connect(m_btn_pause, &QAbstractButton::clicked, [=](){ + if (const auto cpu = this->cpu.lock()) cpu->state += cpu_flag::dbg_pause; + UpdateUI(); + }); + connect(m_choice_units, static_cast(&QComboBox::activated), this, &debugger_frame::UpdateUI); + connect(m_choice_units, static_cast(&QComboBox::currentIndexChanged), this, &debugger_frame::OnSelectUnit); + connect(this, &QDockWidget::visibilityChanged, this, &debugger_frame::EnableUpdateTimer); + + m_list->ShowAddr(CentrePc(m_list->m_pc)); + UpdateUnitList(); +} + +void debugger_frame::closeEvent(QCloseEvent *event) +{ + QDockWidget::closeEvent(event); + emit DebugFrameClosed(); +} + +//static const int show_lines = 30; +#include + +std::map g_breakpoints; + +extern void ppu_breakpoint(u32 addr); + +u32 debugger_frame::GetPc() const +{ + const auto cpu = this->cpu.lock(); + + if (!cpu) + { + return 0; + } + + switch (g_system) + { + case system_type::ps3: return cpu->id_type() == 1 ? static_cast(cpu.get())->cia : static_cast(cpu.get())->pc; + case system_type::psv: return static_cast(cpu.get())->PC; + } + + return 0xabadcafe; +} + +u32 debugger_frame::CentrePc(u32 pc) const +{ + return pc/* - ((m_item_count / 2) * 4)*/; +} + +void debugger_frame::UpdateUI() +{ + UpdateUnitList(); + + const auto cpu = this->cpu.lock(); + + if (!cpu) + { + if (m_last_pc != -1 || m_last_stat) + { + m_last_pc = -1; + m_last_stat = 0; + DoUpdate(); + + m_btn_run->setEnabled(false); + m_btn_step->setEnabled(false); + m_btn_pause->setEnabled(false); + } + } + else + { + const auto cia = GetPc(); + const auto state = cpu->state.load(); + + if (m_last_pc != cia || m_last_stat != static_cast(state)) + { + m_last_pc = cia; + m_last_stat = static_cast(state); + DoUpdate(); + + if (test(state & cpu_flag::dbg_pause)) + { + m_btn_run->setEnabled(true); + m_btn_step->setEnabled(true); + m_btn_pause->setEnabled(false); + } + else + { + m_btn_run->setEnabled(false); + m_btn_step->setEnabled(false); + m_btn_pause->setEnabled(true); + } + } + } + + if (Emu.IsStopped()) + { + g_breakpoints.clear(); + } +} + +void debugger_frame::UpdateUnitList() +{ + const u64 threads_created = cpu_thread::g_threads_created; + const u64 threads_deleted = cpu_thread::g_threads_deleted; + + if (threads_created != m_threads_created || threads_deleted != m_threads_deleted) + { + m_threads_created = threads_created; + m_threads_deleted = threads_deleted; + } + else + { + // Nothing to do + return; + } + + m_choice_units->clear(); + + const auto on_select = [&](u32, cpu_thread& cpu) + { + QVariant var_cpu = qVariantFromValue((void *)&cpu); + m_choice_units->addItem(qstr(cpu.get_name()), var_cpu); + }; + + idm::select(on_select); + idm::select(on_select); + idm::select(on_select); + idm::select(on_select); + + m_choice_units->update(); +} + +void debugger_frame::OnSelectUnit() +{ + if (m_choice_units->count() < 1) return; + + m_disasm.reset(); + + const auto on_select = [&](u32, cpu_thread& cpu) + { + cpu_thread* data = (cpu_thread *)m_choice_units->currentData().value(); + return data == &cpu; + }; + + if (auto ppu = idm::select(on_select)) + { + m_disasm = std::make_unique(CPUDisAsm_InterpreterMode); + cpu = ppu.ptr; + } + else if (auto spu1 = idm::select(on_select)) + { + m_disasm = std::make_unique(CPUDisAsm_InterpreterMode); + cpu = spu1.ptr; + } + else if (auto rspu = idm::select(on_select)) + { + m_disasm = std::make_unique(CPUDisAsm_InterpreterMode); + cpu = rspu.ptr; + } + else if (auto arm = idm::select(on_select)) + { + m_disasm = std::make_unique(CPUDisAsm_InterpreterMode); + cpu = arm.ptr; + } + + DoUpdate(); +} + +//void debugger_frame::resizeEvent(QResizeEvent* event) +//{ +// if (0) +// { +// if (!m_list->rowCount()) +// { +// m_list->InsertItem(m_list->rowCount(), ""); +// } +// +// int size = 0; +// m_list->clear(); +// int item = 0; +// while (size < m_list->GetSize().GetHeight()) +// { +// item = m_list->rowCount(); +// m_list->InsertItem(item, ""); +// QRect rect; +// m_list->GetItemRect(item, rect); +// +// size = rect.GetBottom(); +// } +// +// if (item) +// { +// m_list->removeRow(--item); +// } +// +// m_item_count = item; +// ShowAddr(m_pc); +// } +//} + +void debugger_frame::DoUpdate() +{ + Show_PC(); + WriteRegs(); +} + +void debugger_frame::WriteRegs() +{ + const auto cpu = this->cpu.lock(); + + if (!cpu) + { + m_regs->clear(); + return; + } + + m_regs->clear(); + m_regs->setText(qstr(cpu->dump())); +} + +void debugger_frame::OnUpdate() +{ + //WriteRegs(); +} + +void debugger_frame::Show_Val() +{ + QDialog* diag = new QDialog(this); + diag->setWindowTitle(tr("Set value")); + diag->setModal(true); + + QPushButton* button_ok = new QPushButton(tr("Ok")); + QPushButton* button_cancel = new QPushButton(tr("Cancel")); + QVBoxLayout* vbox_panel(new QVBoxLayout()); + QHBoxLayout* hbox_text_panel(new QHBoxLayout()); + QHBoxLayout* hbox_button_panel(new QHBoxLayout()); + QLineEdit* p_pc(new QLineEdit(diag)); + p_pc->setFont(mono); + p_pc->setMaxLength(8); + p_pc->setFixedWidth(75); + QLabel* addr(new QLabel(diag)); + addr->setFont(mono); + + hbox_text_panel->addWidget(addr); + hbox_text_panel->addWidget(p_pc); + + hbox_button_panel->addWidget(button_ok); + hbox_button_panel->addWidget(button_cancel); + + vbox_panel->addLayout(hbox_text_panel); + vbox_panel->addSpacing(8); + vbox_panel->addLayout(hbox_button_panel); + + diag->setLayout(vbox_panel); + + const auto cpu = this->cpu.lock(); + + if (cpu) + { + unsigned long pc = cpu ? GetPc() : 0x0; + bool ok; + addr->setText("Address: " + QString("%1").arg(pc, 8, 16, QChar('0'))); // set address input line to 8 digits + p_pc->setPlaceholderText(QString("%1").arg(pc, 8, 16, QChar('0'))); + } + else + { + p_pc->setPlaceholderText("00000000"); + addr->setText("Address: 00000000"); + } + + auto l_changeLabel = [=]() + { + if (p_pc->text().isEmpty()) + { + addr->setText("Address: " + p_pc->placeholderText()); + } + else + { + bool ok; + ulong ul_addr = p_pc->text().toULong(&ok, 16); + addr->setText("Address: " + QString("%1").arg(ul_addr, 8, 16, QChar('0'))); // set address input line to 8 digits + } + }; + + connect(p_pc, &QLineEdit::textChanged, l_changeLabel); + connect(button_ok, &QAbstractButton::clicked, diag, &QDialog::accept); + connect(button_cancel, &QAbstractButton::clicked, diag, &QDialog::reject);; + + if (diag->exec() == QDialog::Accepted) + { + unsigned long pc = cpu ? GetPc() : 0x0; + if (p_pc->text().isEmpty()) + { + addr->setText(p_pc->placeholderText()); + } + else + { + bool ok; + pc = p_pc->text().toULong(&ok, 16); + addr->setText(p_pc->text()); + } + m_list->ShowAddr(CentrePc(pc)); + } +} + +void debugger_frame::Show_PC() +{ + if (const auto cpu = this->cpu.lock()) m_list->ShowAddr(CentrePc(GetPc())); +} + +void debugger_frame::DoStep() +{ + if (const auto cpu = this->cpu.lock()) + { + if (test(cpu_flag::dbg_pause, cpu->state.fetch_op([](bs_t& state) + { + state += cpu_flag::dbg_step; + state -= cpu_flag::dbg_pause; + }))) + { + cpu->notify(); + } + } + UpdateUI(); +} + +void debugger_frame::EnableUpdateTimer(bool enable) +{ + enable ? update->start(50) : update->stop(); +} + +void debugger_frame::EnableButtons(bool enable) +{ + m_go_to_addr->setEnabled(enable); + m_go_to_pc->setEnabled(enable); + m_btn_step->setEnabled(enable); + m_btn_run->setEnabled(enable); + m_btn_pause->setEnabled(enable); +} + +debugger_list::debugger_list(debugger_frame* parent) : QListWidget(parent) +{ + m_pc = 0; + m_item_count = 30; + m_debugFrame = parent; +}; + +void debugger_list::ShowAddr(u32 addr) +{ + m_pc = addr; + + const auto cpu = m_debugFrame->cpu.lock(); + + if (!cpu) + { + for (uint i = 0; isetText(qstr(fmt::format("[%08x] illegal address", m_pc))); + } + } + else + { + const u32 cpu_offset = g_system == system_type::ps3 && cpu->id_type() != 1 ? static_cast(*cpu).offset : 0; + m_debugFrame->m_disasm->offset = (u8*)vm::base(cpu_offset); + for (uint i = 0, count = 4; isetText((IsBreakPoint(m_pc) ? ">>> " : " ") + qstr(fmt::format("[%08x] illegal address", m_pc))); + count = 4; + continue; + } + + count = m_debugFrame->m_disasm->disasm(m_debugFrame->m_disasm->dump_pc = m_pc); + + item(i)->setText((IsBreakPoint(m_pc) ? ">>> " : " ") + qstr(m_debugFrame->m_disasm->last_opcode)); + + QColor colour; + + if (test(cpu->state & cpu_state_pause) && m_pc == m_debugFrame->GetPc()) + { + colour = QColor(Qt::green); + } + else + { + colour = QColor(IsBreakPoint(m_pc) ? Qt::yellow : Qt::white); + } + + item(i)->setBackgroundColor(colour); + } + } + + setLineWidth(-1); +} + +bool debugger_list::IsBreakPoint(u32 pc) +{ + return g_breakpoints.count(pc) != 0; +} + +void debugger_list::AddBreakPoint(u32 pc) +{ + g_breakpoints.emplace(pc, false); + ppu_breakpoint(pc); +} + +void debugger_list::RemoveBreakPoint(u32 pc) +{ + g_breakpoints.erase(pc); + ppu_breakpoint(pc); +} + +void debugger_list::keyPressEvent(QKeyEvent* event) +{ + if (!isActiveWindow()) + { + return; + } + + const auto cpu = m_debugFrame->cpu.lock(); + long i = currentRow(); + + if (i < 0 || !cpu) + { + return; + } + + const u32 start_pc = m_pc - m_item_count * 4; + const u32 pc = start_pc + i * 4; + + if (event->key() == Qt::Key_Space && QApplication::keyboardModifiers() & Qt::ControlModifier) + { + m_debugFrame->DoStep(); + return; + } + else + { + switch (event->key()) + { + case Qt::Key_PageUp: ShowAddr(m_pc - (m_item_count * 2) * 4); return; + case Qt::Key_PageDown: ShowAddr(m_pc); return; + case Qt::Key_Up: ShowAddr(m_pc - (m_item_count + 1) * 4); return; + case Qt::Key_Down: ShowAddr(m_pc - (m_item_count - 1) * 4); return; + case Qt::Key_E: + { + instruction_editor_dialog* dlg = new instruction_editor_dialog(this, pc, cpu, m_debugFrame->m_disasm.get()); + dlg->show(); + m_debugFrame->DoUpdate(); + return; + } + case Qt::Key_R: + { + register_editor_dialog* dlg = new register_editor_dialog(this, pc, cpu, m_debugFrame->m_disasm.get()); + dlg->show(); + m_debugFrame->DoUpdate(); + return; + } + } + } +} + +void debugger_list::mouseDoubleClickEvent(QMouseEvent* event) +{ + if (event->button() == Qt::LeftButton && (Emu.IsRunning() || Emu.IsPaused())) + { + long i = currentRow(); + if (i < 0) return; + + const u32 start_pc = m_pc - m_item_count * 4; + const u32 pc = start_pc + i * 4; + //ConLog.Write("pc=0x%llx", pc); + + if (IsBreakPoint(pc)) + { + RemoveBreakPoint(pc); + } + else + { + AddBreakPoint(pc); + } + + ShowAddr(start_pc); + } +} + +void debugger_list::wheelEvent(QWheelEvent* event) +{ + QPoint numSteps = event->angleDelta() / 8 / 15; // http://doc.qt.io/qt-5/qwheelevent.html#pixelDelta + const int value = numSteps.y(); + + ShowAddr(m_pc - (event->modifiers() == Qt::ControlModifier ? m_item_count * (value + 1) : m_item_count + value) * 4); +} diff --git a/rpcs3/rpcs3qt/debugger_frame.h b/rpcs3/rpcs3qt/debugger_frame.h new file mode 100644 index 0000000000..c1accb3aaf --- /dev/null +++ b/rpcs3/rpcs3qt/debugger_frame.h @@ -0,0 +1,119 @@ +#ifndef DEBUGGERFRAME_H +#define DEBUGGERFRAME_H + +#include "stdafx.h" +#include "Emu/Memory/Memory.h" +#include "Emu/System.h" +#include "Emu/IdManager.h" +#include "Emu/CPU/CPUThread.h" +#include "Emu/CPU/CPUDisAsm.h" +#include "Emu/Cell/PPUThread.h" +#include "Emu/Cell/SPUThread.h" +#include "Emu/Cell/RawSPUThread.h" +#include "Emu/PSP2/ARMv7Thread.h" +#include "Emu/Cell/PPUDisAsm.h" +#include "Emu/Cell/SPUDisAsm.h" +#include "Emu/PSP2/ARMv7DisAsm.h" +#include "Emu/Cell/PPUInterpreter.h" + +#include "instruction_editor_dialog.h" +#include "register_editor_dialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class debugger_list; + +class debugger_frame : public QDockWidget +{ + Q_OBJECT + + QWidget* body; + debugger_list* m_list; + int pSize; + QFont mono; + QTextEdit* m_regs; + QPushButton* m_go_to_addr; + QPushButton* m_go_to_pc; + QPushButton* m_btn_step; + QPushButton* m_btn_run; + QPushButton* m_btn_pause; + QComboBox* m_choice_units; + + u64 m_threads_created = 0; + u64 m_threads_deleted = 0; + u32 m_last_pc = -1; + u32 m_last_stat = 0; + + QTimer* update; + +public: + std::unique_ptr m_disasm; + std::weak_ptr cpu; + +public: + explicit debugger_frame(QWidget *parent = 0); + + void UpdateUI(); + void UpdateUnitList(); + + u32 GetPc() const; + u32 CentrePc(u32 pc) const; + //void resizeEvent(QResizeEvent* event); + void DoUpdate(); + void WriteRegs(); + void EnableButtons(bool enable); + + void OnUpdate(); + +protected: + /** Override inherited method from Qt to allow signalling when close happened.*/ + void closeEvent(QCloseEvent* event); + +signals: + void DebugFrameClosed(); +public slots: + void DoStep(); +private slots: + void OnSelectUnit(); + void Show_Val(); + void Show_PC(); + void EnableUpdateTimer(bool state); +}; + +class debugger_list : public QListWidget +{ + Q_OBJECT + + debugger_frame* m_debugFrame; + +public: + u32 m_pc; + u32 m_item_count; + +public: + debugger_list(debugger_frame* parent); + void ShowAddr(u32 addr); + +private: + bool IsBreakPoint(u32 pc); + void AddBreakPoint(u32 pc); + void RemoveBreakPoint(u32 pc); + +protected: + void keyPressEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QMouseEvent* event); + void wheelEvent(QWheelEvent* event); +}; + +#endif // DEBUGGERFRAME_H diff --git a/rpcs3/rpcs3qt/debuggerframe.cpp b/rpcs3/rpcs3qt/debuggerframe.cpp deleted file mode 100644 index 64499eb7da..0000000000 --- a/rpcs3/rpcs3qt/debuggerframe.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#ifdef QT_UI - -#include "debuggerframe.h" - -DebuggerFrame::DebuggerFrame(QWidget *parent) : QDockWidget(tr("Debugger"), parent) -{ - -} - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/debuggerframe.h b/rpcs3/rpcs3qt/debuggerframe.h deleted file mode 100644 index 94d111890f..0000000000 --- a/rpcs3/rpcs3qt/debuggerframe.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef DEBUGGERFRAME_H -#define DEBUGGERFRAME_H - -#include - -class DebuggerFrame : public QDockWidget -{ - Q_OBJECT - -public: - explicit DebuggerFrame(QWidget *parent = 0); -}; - -#endif // DEBUGGERFRAME_H diff --git a/rpcs3/rpcs3qt/emu_settings.cpp b/rpcs3/rpcs3qt/emu_settings.cpp new file mode 100644 index 0000000000..e47e2c11e8 --- /dev/null +++ b/rpcs3/rpcs3qt/emu_settings.cpp @@ -0,0 +1,214 @@ +#include "emu_settings.h" + +#include "stdafx.h" +#include "Emu/System.h" +#include "Utilities/Config.h" + +extern std::string g_cfg_defaults; //! Default settings grabbed from Utilities/Config.h + +inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); } +inline std::string sstr(const QVariant& _in) { return sstr(_in.toString()); } + +// Emit sorted YAML +namespace +{ + static NEVER_INLINE void emitData(YAML::Emitter& out, const YAML::Node& node) + { + // TODO + out << node; + } + + // Incrementally load YAML + static NEVER_INLINE void operator +=(YAML::Node& left, const YAML::Node& node) + { + if (node && !node.IsNull()) + { + if (node.IsMap()) + { + for (const auto& pair : node) + { + if (pair.first.IsScalar()) + { + auto&& lhs = left[pair.first.Scalar()]; + lhs += pair.second; + } + else + { + // Exotic case (TODO: probably doesn't work) + auto&& lhs = left[YAML::Clone(pair.first)]; + lhs += pair.second; + } + } + } + else if (node.IsScalar() || node.IsSequence()) + { + // Scalars and sequences are replaced completely, but this may change in future. + // This logic may be overwritten by custom demands of every specific cfg:: node. + left = node; + } + } + } +} + + +// Helper methods to interact with YAML and the config settings. +namespace cfg_adapter +{ + + static cfg::_base& get_cfg(cfg::_base& root, const std::string& name) + { + if (root.get_type() == cfg::type::node) + { + for (const auto& pair : static_cast(root).get_nodes()) + { + if (pair.first == name) + { + return *pair.second; + } + } + } + + fmt::throw_exception("Node not found: %s", name); + } + + static cfg::_base& get_cfg(cfg::_base& root, cfg_location::const_iterator begin, cfg_location::const_iterator end) + { + return begin == end ? root : get_cfg(get_cfg(root, *begin), begin + 1, end); + } + + + static YAML::Node get_node(const YAML::Node& node, cfg_location::const_iterator begin, cfg_location::const_iterator end) + { + return begin == end ? node : get_node(node[*begin], begin + 1, end); // TODO + } + + /** Syntactic sugar to get a setting at a given config location. */ + static YAML::Node get_node(const YAML::Node& node, cfg_location loc) + { + return get_node(node, loc.cbegin(), loc.cend()); + } +}; + + +/** Returns possible options for values for some particular setting.*/ +static QStringList getOptions(cfg_location location) +{ + QStringList values; + auto begin = location.cbegin(); + auto end = location.cend(); + for (const auto& v : cfg_adapter::get_cfg(g_cfg, begin, end).to_list()) + { + values.append(qstr(v)); + } + return values; +} + +emu_settings::emu_settings(const std::string& path) : QObject() +{ + currentSettings = YAML::Load(g_cfg_defaults); + + // Create config path if necessary + fs::create_path(fs::get_config_dir() + path); + + // Incrementally load config.yml + config = fs::file(fs::get_config_dir() + path + "/config.yml", fs::read + fs::write + fs::create); + + if (config.size() == 0 && !path.empty()) // First time + { + config = fs::file(fs::get_config_dir() + "/config.yml", fs::read + fs::write + fs::create); + currentSettings += YAML::Load(config.to_string()); + } + else + { + currentSettings += YAML::Load(config.to_string()); + } +} + +emu_settings::~emu_settings() +{ +} + +void emu_settings::SaveSettings() + { + YAML::Emitter out; + emitData(out, currentSettings); + + // Save config + config.seek(0); + config.trunc(0); + config.write(out.c_str(), out.size()); +} + +QComboBox* emu_settings::CreateEnhancedComboBox(SettingsType type, QWidget* parent) +{ + QComboBox* box = new QComboBox(parent); + + for (QString setting : GetSettingOptions(type)) + { + box->addItem(tr(setting.toStdString().c_str()), QVariant(setting)); + } + + QString selected = qstr(GetSetting(type)); + int index = box->findData(selected); + if (index == -1) + { + LOG_WARNING(GENERAL, "Current setting not found while creating combobox"); + } + else + { + box->setCurrentIndex(index); + } + + connect(box, static_cast(&QComboBox::currentIndexChanged), [=](int index) { + SetSetting(type, sstr(box->itemData(index))); + }); + + return box; +} + +QCheckBox* emu_settings::CreateEnhancedCheckBox(SettingsType type, QWidget* parent) +{ + cfg_location loc = SettingsLoc[type]; + std::string name = loc[loc.size()-1]; + QCheckBox* settingsButton = new QCheckBox(tr(name.c_str()), parent); + + std::string currSet = GetSetting(type); + if (currSet == "true") + { + settingsButton->setChecked(true); + } + else if (currSet != "false") + { + LOG_WARNING(GENERAL, "Passed in an invalid setting for creating enhanced checkbox"); + } + connect(settingsButton, &QCheckBox::stateChanged, [=](int val) { + std::string str = val != 0 ? "true" : "false"; + SetSetting(type, str); + }); + return settingsButton; +} + +std::vector emu_settings::GetLoadedLibraries() +{ + return currentSettings["Core"]["Load libraries"].as, std::initializer_list>({}); +} + +void emu_settings::SaveSelectedLibraries(const std::vector& libs) +{ + currentSettings["Core"]["Load libraries"] = libs; +} + +QStringList emu_settings::GetSettingOptions(SettingsType type) const +{ + return getOptions(const_cast(SettingsLoc[type])); +} + +std::string emu_settings::GetSetting(SettingsType type) const +{ + return cfg_adapter::get_node(currentSettings, SettingsLoc[type]).Scalar(); +} + +void emu_settings::SetSetting(SettingsType type, const std::string& val) +{ + cfg_adapter::get_node(currentSettings, SettingsLoc[type])= val; +} diff --git a/rpcs3/rpcs3qt/emu_settings.h b/rpcs3/rpcs3qt/emu_settings.h new file mode 100644 index 0000000000..6f1014da44 --- /dev/null +++ b/rpcs3/rpcs3qt/emu_settings.h @@ -0,0 +1,248 @@ +#ifndef EMU_SETTINGS_H +#define EMU_SETTINGS_H + +#include "Utilities/File.h" +#include "Utilities/Log.h" + +#include "yaml-cpp/yaml.h" + +#include +#include +#include +#include +#include + +#ifdef _MSC_VER +#include +#undef GetHwnd +#include +#include +#include +#endif + +#ifdef _WIN32 +#include "Emu/RSX/VK/VKHelpers.h" +#endif + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } + +struct Render_Creator +{ + bool supportsD3D12 = false; + bool supportsVulkan = false; + QStringList D3D12Adapters; + QStringList vulkanAdapters; + QString render_Vulkan = QObject::tr("Vulkan"); + QString render_D3D12 = QObject::tr("D3D12"); + QString render_OpenGL = QObject::tr("OpenGL"); + + Render_Creator() + { + // check for dx12 adapters +#ifdef _MSC_VER + Microsoft::WRL::ComPtr dxgi_factory; + supportsD3D12 = SUCCEEDED(CreateDXGIFactory(IID_PPV_ARGS(&dxgi_factory))); + + if (supportsD3D12) + { + supportsD3D12 = false; + IDXGIAdapter1* pAdapter = nullptr; + + for (UINT adapterIndex = 0; DXGI_ERROR_NOT_FOUND != dxgi_factory->EnumAdapters1(adapterIndex, &pAdapter); ++adapterIndex) + { + HMODULE D3D12Module = verify("d3d12.dll", LoadLibrary(L"d3d12.dll")); + PFN_D3D12_CREATE_DEVICE wrapD3D12CreateDevice = (PFN_D3D12_CREATE_DEVICE)GetProcAddress(D3D12Module, "D3D12CreateDevice"); + + if (SUCCEEDED(wrapD3D12CreateDevice(pAdapter, D3D_FEATURE_LEVEL_11_0, _uuidof(ID3D12Device), nullptr))) + { + //A device with D3D12 support found. Init data + supportsD3D12 = true; + + DXGI_ADAPTER_DESC desc; + pAdapter->GetDesc(&desc); + D3D12Adapters.append(QString::fromWCharArray(desc.Description)); + } + } + } +#endif + + // check for vulkan adapters +#ifdef _WIN32 + vk::context device_enum_context; + u32 instance_handle = device_enum_context.createInstance("RPCS3", true); + + if (instance_handle > 0) + { + device_enum_context.makeCurrentInstance(instance_handle); + std::vector& gpus = device_enum_context.enumerateDevices(); + + if (gpus.size() > 0) + { + //A device with vulkan support found. Init data + supportsVulkan = true; + + for (auto& gpu : gpus) + { + vulkanAdapters.append(qstr(gpu.name())); + } + } + } +#endif + + } +}; + +// Node location +using cfg_location = std::vector; + +class emu_settings : public QObject +{ + /** A settings class for Emulator specific settings. This class is a refactored version of the wx version. It is much nicer + * + */ + Q_OBJECT +public: + enum SettingsType { + // Core + PPUDecoder, + SPUDecoder, + LibLoadOptions, + HookStaticFuncs, + BindSPUThreads, + LowerSPUThreadPrio, + + // Graphics + Renderer, + Resolution, + AspectRatio, + FrameLimit, + LogShaderPrograms, + WriteDepthBuffer, + WriteColorBuffers, + ReadColorBuffers, + ReadDepthBuffer, + VSync, + DebugOutput, + DebugOverlay, + LegacyBuffers, + GPUTextureScaling, + D3D12Adapter, + VulkanAdapter, + + // Audio + AudioRenderer, + DumpToFile, + ConvertTo16Bit, + DownmixStereo, + + // Input / Output + PadHandler, + KeyboardHandler, + MouseHandler, + Camera, + CameraType, + + // Misc + ExitRPCS3OnFinish, + StartOnBoot, + StartGameFullscreen, + ShowFPSInTitle, + ShowWelcomeScreen, + + // Network + ConnectionStatus, + + // Language + Language, + EnableHostRoot, + }; + + /** Creates a settings object which reads in the config.yml file at rpcs3/bin/%path%/config.yml + * Settings are only written when SaveSettings is called. + */ + emu_settings(const std::string& path); + ~emu_settings(); + + /** Returns a combo box of that setting type that is bound to the parent. */ + QComboBox* CreateEnhancedComboBox(SettingsType type, QWidget* parent = nullptr); + + /** Returns a check button that is connected to the target settings type, bound to the life of parent*/ + QCheckBox* CreateEnhancedCheckBox(SettingsType target, QWidget* parent = nullptr); + + std::vector GetLoadedLibraries(); + void SaveSelectedLibraries(const std::vector& libs); + + /** Returns the valid options for a given setting.*/ + QStringList GetSettingOptions(SettingsType type) const; + + /** Returns the value of the setting type.*/ + std::string GetSetting(SettingsType type) const; + + /** Sets the setting type to a given value.*/ + void SetSetting(SettingsType type, const std::string& val); +public slots: +/** Writes the unsaved settings to file. Used in settings dialog on accept.*/ + void SaveSettings(); +private: + /** A helper map that keeps track of where a given setting type is located*/ + const QMap SettingsLoc = { + // Core Tab + { PPUDecoder, { "Core", "PPU Decoder"}}, + { SPUDecoder, { "Core", "SPU Decoder"}}, + { LibLoadOptions, { "Core", "Lib Loader"}}, + { HookStaticFuncs, { "Core", "Hook static functions"}}, + { BindSPUThreads, { "Core", "Bind SPU threads to secondary cores"}}, + { LowerSPUThreadPrio, { "Core", "Lower SPU thread priority"}}, + + // Graphics Tab + { Renderer, { "Video", "Renderer"}}, + { Resolution, { "Video", "Resolution"}}, + { AspectRatio, { "Video", "Aspect ratio"}}, + { FrameLimit, { "Video", "Frame limit"}}, + { LogShaderPrograms,{ "Video", "Log shader programs"}}, + { WriteDepthBuffer, { "Video", "Write Depth Buffer"}}, + { WriteColorBuffers,{ "Video", "Write Color Buffers"}}, + { ReadColorBuffers, { "Video", "Read Color Buffers"}}, + { ReadDepthBuffer, { "Video", "Read Depth Buffer"}}, + { VSync, { "Video", "VSync"}}, + { DebugOutput, { "Video", "Debug output"}}, + { DebugOverlay, { "Video", "Debug overlay"}}, + { LegacyBuffers, { "Video", "Use Legacy OpenGL Buffers (Debug)"}}, + { GPUTextureScaling,{ "Video", "Use GPU texture scaling"}}, + { D3D12Adapter, { "Video", "D3D12", "Adapter"}}, + { VulkanAdapter, { "Video", "Vulkan", "Adapter"}}, + + // Audio + { AudioRenderer, { "Audio", "Renderer"}}, + { DumpToFile, { "Audio", "Dump to file"}}, + { ConvertTo16Bit, { "Audio", "Convert to 16 bit"}}, + { DownmixStereo, { "Audio", "Downmix to Stereo"}}, + + // Input / Output + { PadHandler, { "Input/Output", "Pad"}}, + { KeyboardHandler, { "Input/Output", "Keyboard"}}, + { MouseHandler, { "Input/Output", "Mouse"}}, + { Camera, { "Input/Output", "Camera"}}, + { CameraType, { "Input/Output", "Camera type"}}, + + // Misc + {ExitRPCS3OnFinish, { "Miscellaneous", "Exit RPCS3 when process finishes" }}, + {StartOnBoot, { "Miscellaneous", "Automatically start games after boot" }}, + {StartGameFullscreen, { "Miscellaneous", "Start games in fullscreen mode"}}, + {ShowFPSInTitle, { "Miscellaneous", "Show FPS counter in window title"}}, + {ShowWelcomeScreen, { "Miscellaneous", "Show Welcome Screen"}}, + + // Networking + {ConnectionStatus, { "Net", "Connection status"}}, + + // System + {Language, { "System", "Language"}}, + {EnableHostRoot, { "VFS", "Enable /host_root/"}}, + + }; + + YAML::Node currentSettings; // The current settings as a YAML node. + fs::file config; //! File to read/write the config settings. +}; + +#endif diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp new file mode 100644 index 0000000000..0fdfa22f98 --- /dev/null +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -0,0 +1,641 @@ +#include "game_list_frame.h" + +#include "settings_dialog.h" +#include "table_item_delegate.h" + +#include "Emu/Memory/Memory.h" +#include "Emu/System.h" +#include "Loader/PSF.h" +#include "Utilities/types.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +static const std::string m_class_name = "GameViewer"; +inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); } + +// Auxiliary classes +class sortGameData +{ + int sortColumn; + bool sortAscending; + +public: + sortGameData(u32 column, bool ascending) : sortColumn(column), sortAscending(ascending) {} + bool operator()(const GameInfo& game1, const GameInfo& game2) const + { + // Note that the column index has to match the appropriate GameInfo member + switch (sortColumn - 1) // skip *icon* column + { + case 0: return sortAscending ? (game1.name < game2.name) : (game1.name > game2.name); + case 1: return sortAscending ? (game1.serial < game2.serial) : (game1.serial > game2.serial); + case 2: return sortAscending ? (game1.fw < game2.fw) : (game1.fw > game2.fw); + case 3: return sortAscending ? (game1.app_ver < game2.app_ver) : (game1.app_ver > game2.app_ver); + case 4: return sortAscending ? (game1.category < game2.category) : (game1.category > game2.category); + case 5: return sortAscending ? (game1.root < game2.root) : (game1.root > game2.root); + default: return false; + } + } +}; + +game_list_frame::game_list_frame(std::shared_ptr settings, Render_Creator r_Creator, QWidget *parent) + : QDockWidget(tr("Game List"), parent), xgui_settings(settings), m_Render_Creator(r_Creator) +{ + m_Icon_Size = GUI::gl_icon_size.at(m_gui_settings->GetValue(GUI::gl_iconSize).toString()); + + m_columns = columns_arr(m_Icon_Size); + + gameList = new QTableWidget(this); + gameList->setShowGrid(false); + gameList->setItemDelegate(new table_item_delegate(this)); + gameList->setSelectionBehavior(QAbstractItemView::SelectRows); + gameList->setSelectionMode(QAbstractItemView::SingleSelection); + gameList->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed); + gameList->verticalHeader()->setMinimumSectionSize(m_Icon_Size.height()); + gameList->verticalHeader()->setMaximumSectionSize(m_Icon_Size.height()); + gameList->verticalHeader()->setVisible(false); + gameList->horizontalHeader()->setContextMenuPolicy(Qt::CustomContextMenu); + gameList->setContextMenuPolicy(Qt::CustomContextMenu); + + gameList->setColumnCount(7); + gameList->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Icon"))); + gameList->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Name"))); + gameList->setHorizontalHeaderItem(2, new QTableWidgetItem(tr("Serial"))); + gameList->setHorizontalHeaderItem(3, new QTableWidgetItem(tr("FW"))); + gameList->setHorizontalHeaderItem(4, new QTableWidgetItem(tr("App version"))); + gameList->setHorizontalHeaderItem(5, new QTableWidgetItem(tr("Category"))); + gameList->setHorizontalHeaderItem(6, new QTableWidgetItem(tr("Path"))); + + setWidget(gameList); + + // Actions + showIconColAct = new QAction(tr("Show Icons"), this); + showNameColAct = new QAction(tr("Show Names"), this); + showSerialColAct = new QAction(tr("Show Serials"), this); + showFWColAct = new QAction(tr("Show FWs"), this); + showAppVersionColAct = new QAction(tr("Show App Versions"), this); + showCategoryColAct = new QAction(tr("Show Categories"), this); + showPathColAct = new QAction(tr("Show Paths"), this); + + columnActs = { showIconColAct, showNameColAct, showSerialColAct, showFWColAct, showAppVersionColAct, showCategoryColAct, showPathColAct }; + + // Events + connect(gameList, &QTableWidget::customContextMenuRequested, this, &game_list_frame::ShowContextMenu); + connect(gameList->horizontalHeader(), &QHeaderView::customContextMenuRequested, [=](const QPoint& pos) { + QMenu* configure = new QMenu(this); + configure->addActions({ showIconColAct, showNameColAct, showSerialColAct, showFWColAct, showAppVersionColAct, showCategoryColAct, showPathColAct }); + configure->exec(mapToGlobal(pos)); + }); + connect(gameList, &QTableWidget::doubleClicked, this, &game_list_frame::doubleClickedSlot); + connect(gameList->horizontalHeader(), &QHeaderView::sectionClicked, this, &game_list_frame::OnColClicked); + + for (int col = 0; col < columnActs.count(); ++col) + { + columnActs[col]->setCheckable(true); + + auto l_CallBack = [this, col](bool val) { + if (!val) // be sure to have at least one column left so you can call the context menu at all time + { + int c = 0; + for (int i = 0; i < columnActs.count(); ++i) + { + if (xgui_settings->GetGamelistColVisibility(i)) { if (++c > 1) { break; } } + } + if (c < 2) + { + columnActs[col]->setChecked(true); // re-enable the checkbox if we don't change the actual state + return; + } + } + gameList->setColumnHidden(col, !val); // Negate because it's a set col hidden and we have menu say show. + xgui_settings->SetGamelistColVisibility(col, val); + }; + connect(columnActs[col], &QAction::triggered, l_CallBack); + } + + // Init + Refresh(); // Data MUST be loaded so that first settings load will reset columns to correct width w/r to data. + LoadSettings(); +} + +void game_list_frame::LoadSettings() +{ + QByteArray state = xgui_settings->GetValue(GUI::gl_state).toByteArray(); + + for (int col = 0; col < columnActs.count(); ++col) + { + bool vis = xgui_settings->GetGamelistColVisibility(col); + columnActs[col]->setChecked(vis); + gameList->setColumnHidden(col, !vis); + } + m_sortAscending = xgui_settings->GetValue(GUI::gl_sortAsc).toBool(); + m_sortColumn = xgui_settings->GetValue(GUI::gl_sortCol).toInt(); + + m_categoryFilters = xgui_settings->GetGameListCategoryFilters(); + + if (state.isEmpty()) + { // If no settings exist, go to default. + gameList->verticalHeader()->resizeSections(QHeaderView::ResizeMode::ResizeToContents); + gameList->horizontalHeader()->resizeSections(QHeaderView::ResizeMode::ResizeToContents); + gameList->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Fixed); + } + else + { + gameList->horizontalHeader()->restoreState(state); + } + + Refresh(); +} + +game_list_frame::~game_list_frame() +{ + SaveSettings(); +} + +void game_list_frame::OnColClicked(int col) +{ + if (col == m_sortColumn) + { + m_sortAscending ^= true; + } + else + { + m_sortAscending = true; + } + m_sortColumn = col; + + xgui_settings->SetValue(GUI::gl_sortAsc, m_sortAscending); + xgui_settings->SetValue(GUI::gl_sortCol, col); + + // Sort entries, update columns and refresh the panel + Refresh(); +} + + +void game_list_frame::LoadGames() +{ + m_games.clear(); + + for (const auto& entry : fs::dir(Emu.GetGameDir())) + { + if (entry.is_directory) + { + m_games.push_back(entry.name); + } + } +} + +void game_list_frame::LoadPSF() +{ + m_game_data.clear(); + + const std::string& game_path = Emu.GetGameDir(); + + for (u32 i = 0; i < m_games.size(); ++i) + { + const std::string& dir = game_path + m_games[i]; + const std::string& sfb = dir + "/PS3_DISC.SFB"; + const std::string& sfo = dir + (fs::is_file(sfb) ? "/PS3_GAME/PARAM.SFO" : "/PARAM.SFO"); + + const fs::file sfo_file(sfo); + if (!sfo_file) + { + continue; + } + + const auto& psf = psf::load_object(sfo_file); + + GameInfo game; + game.root = m_games[i]; + game.serial = psf::get_string(psf, "TITLE_ID", ""); + game.name = psf::get_string(psf, "TITLE", "unknown"); + game.app_ver = psf::get_string(psf, "APP_VER", "unknown"); + game.category = psf::get_string(psf, "CATEGORY", "unknown"); + game.fw = psf::get_string(psf, "PS3_SYSTEM_VER", "unknown"); + game.parental_lvl = psf::get_integer(psf, "PARENTAL_LEVEL"); + game.resolution = psf::get_integer(psf, "RESOLUTION"); + game.sound_format = psf::get_integer(psf, "SOUND_FORMAT"); + + if (game.category == "HG") + { + game.category = sstr(category::hdd_Game); + game.icon_path = dir + "/ICON0.PNG"; + } + else if (game.category == "DG") + { + game.category = sstr(category::disc_Game); + game.icon_path = dir + "/PS3_GAME/ICON0.PNG"; + } + else if (game.category == "HM") + { + game.category = sstr(category::home); + game.icon_path = dir + "/ICON0.PNG"; + } + else if (game.category == "AV") + { + game.category = sstr(category::audio_Video); + game.icon_path = dir + "/ICON0.PNG"; + } + else if (game.category == "GD") + { + game.category = sstr(category::game_Data); + game.icon_path = dir + "/ICON0.PNG"; + } + else if (game.category == "unknown") + { + game.category = sstr(category::unknown); + } + + m_game_data.push_back(game); + } + + // Sort entries and update columns + std::sort(m_game_data.begin(), m_game_data.end(), sortGameData(m_sortColumn, m_sortAscending)); + m_columns.Update(m_game_data); +} + +void game_list_frame::ShowData() +{ + m_columns.ShowData(gameList); +} + +// Filter for Categories +void game_list_frame::FilterData() +{ + for (int i = 0; i < gameList->rowCount(); ++i) + { + bool match = false; + for (auto filter : m_categoryFilters) + { + for (int j = 0; j < gameList->columnCount(); ++j) + { + if (gameList->horizontalHeaderItem(j)->text() == tr("Category") && gameList->item(i, j)->text().contains(filter)) + { + match = true; + goto OutOfThis; + } + } + } + OutOfThis: + gameList->setRowHidden(i, !match); + } +} + +void game_list_frame::Refresh() +{ + int row = gameList->currentRow(); + LoadGames(); + LoadPSF(); + ShowData(); + FilterData(); + gameList->selectRow(row); +} + +void game_list_frame::ToggleCategoryFilter(QString category, bool show) +{ + if (show) { m_categoryFilters.append(category); } else { m_categoryFilters.removeAll(category); } + Refresh(); +} + +void game_list_frame::SaveSettings() +{ + for (int col = 0; col < columnActs.count(); ++col) + { + xgui_settings->SetGamelistColVisibility(col, columnActs[col]->isChecked()); + } + xgui_settings->SetValue(GUI::gl_sortCol, m_sortColumn); + xgui_settings->SetValue(GUI::gl_sortAsc, m_sortAscending); + + xgui_settings->SetValue(GUI::gl_state, gameList->horizontalHeader()->saveState()); +} + +static void open_dir(const std::string& spath) +{ + fs::create_dir(spath); + QString path = qstr(spath); + QProcess* process = new QProcess(); + +#ifdef _WIN32 + std::string command = "explorer"; + std::replace(path.begin(), path.end(), '/', '\\'); + process->start("explorer", QStringList() << path); +#elif __APPLE__ + process->start("open", QStringList() << path); +#elif __linux__ + process->start("xdg-open", QStringList() << path); +#endif +} + +void game_list_frame::doubleClickedSlot(const QModelIndex& index) +{ + int i = index.row(); + QString category = qstr(m_game_data[i].category); + + // Boot these categories + if (category == category::hdd_Game || category == category::disc_Game || category == category::audio_Video) + { + const std::string& path = Emu.GetGameDir() + m_game_data[i].root; + emit RequestIconPathSet(path); + + Emu.Stop(); + + if (!Emu.BootGame(path)) + { + LOG_ERROR(LOADER, "Failed to boot /dev_hdd0/game/%s", m_game_data[i].root); + } + } + else + { + open_dir(Emu.GetGameDir() + m_game_data[i].root); + } +} + +void game_list_frame::ShowContextMenu(const QPoint &pos) // this is a slot +{ + int row = gameList->indexAt(pos).row(); + + if (row == -1) + { + return; // invalid + } + + // for most widgets + QPoint globalPos = gameList->mapToGlobal(pos); + // for QAbstractScrollArea and derived classes you would use: + // QPoint globalPos = myWidget->viewport()->mapToGlobal(pos); + + QMenu myMenu; + + // Make Actions + QAction* boot = myMenu.addAction(tr("&Boot")); + QFont f = boot->font(); + f.setBold(true); + boot->setFont(f); + QAction* configure = myMenu.addAction(tr("&Configure")); + myMenu.addSeparator(); + QAction* removeGame = myMenu.addAction(tr("&Remove")); + QAction* removeConfig = myMenu.addAction(tr("&Remove Custom Configuration")); + myMenu.addSeparator(); + QAction* openGameFolder = myMenu.addAction(tr("&Open Install Folder")); + QAction* openConfig = myMenu.addAction(tr("&Open Config Folder")); + myMenu.addSeparator(); + QAction* checkCompat = myMenu.addAction(tr("&Check Game Compatibility")); + + connect(boot, &QAction::triggered, [=]() {Boot(row); }); + connect(configure, &QAction::triggered, [=](){ + settings_dialog(xgui_settings, m_Render_Creator, this, &m_game_data[row]).exec(); + }); + connect(removeGame, &QAction::triggered, [=](){ + if (QMessageBox::question(this, tr("Confirm Delete"), tr("Permanently delete files?")) == QMessageBox::Yes) + fs::remove_all(Emu.GetGameDir() + m_game_data[row].root); + Refresh(); + }); + connect(removeConfig, &QAction::triggered, [=]() {RemoveCustomConfiguration(row); }); + connect(openGameFolder, &QAction::triggered, [=]() {open_dir(Emu.GetGameDir() + m_game_data[row].root); }); + connect(openConfig, &QAction::triggered, [=]() {open_dir(fs::get_config_dir() + "data/" + m_game_data[row].serial); }); + connect(checkCompat, &QAction::triggered, [=]() { + QString serial = qstr(m_game_data[row].serial); + QString link = "https://rpcs3.net/compatibility?g=" + serial; + QDesktopServices::openUrl(QUrl(link)); + }); + + //Disable options depending on software category + QString category = qstr(m_game_data[row].category); + + if (category == category::disc_Game) + { + removeGame->setEnabled(false); + } + else if (category == category::audio_Video) + { + configure->setEnabled(false); + removeConfig->setEnabled(false); + openConfig->setEnabled(false); + checkCompat->setEnabled(false); + } + else if (category == category::home || category == category::game_Data) + { + boot->setEnabled(false), f.setBold(false), boot->setFont(f); + configure->setEnabled(false); + removeConfig->setEnabled(false); + openConfig->setEnabled(false); + checkCompat->setEnabled(false); + } + + myMenu.exec(globalPos); +} + +void game_list_frame::Boot(int row) +{ + const std::string& path = Emu.GetGameDir() + m_game_data[row].root; + emit RequestIconPathSet(path); + + Emu.Stop(); + + if (!Emu.BootGame(path)) + { + QMessageBox::warning(this, tr("Warning!"), tr("Failed to boot ") + qstr(m_game_data[row].root)); + LOG_ERROR(LOADER, "Failed to boot /dev_hdd0/game/%s", m_game_data[row].root); + } +} + +void game_list_frame::RemoveCustomConfiguration(int row) +{ + const std::string config_path = fs::get_config_dir() + "data/" + m_game_data[row].serial + "/config.yml"; + + if (fs::is_file(config_path)) + { + if (QMessageBox::question(this, tr("Confirm Delete"), tr("Delete custom game configuration?")) == QMessageBox::Yes) + { + if (fs::remove_file(config_path)) + { + LOG_SUCCESS(GENERAL, "Removed configuration file: %s", config_path); + } + else + { + QMessageBox::warning(this, tr("Warning!"), tr("Failed to delete configuration file!")); + LOG_FATAL(GENERAL, "Failed to delete configuration file: %s\nError: %s", config_path, fs::g_tls_error); + } + } + } + else + { + QMessageBox::warning(this, tr("Warning!"), tr("No custom configuration found!")); + LOG_ERROR(GENERAL, "Configuration file not found: %s", config_path); + } +} + +void game_list_frame::ResizeIcons(QSize size) +{ + m_columns.m_Icon_Size = size; + m_Icon_Size = size; + gameList->verticalHeader()->setMinimumSectionSize(m_Icon_Size.height()); + gameList->verticalHeader()->setMaximumSectionSize(m_Icon_Size.height()); + Refresh(); +} + +columns_arr::columns_arr(QSize icon_Size) : m_Icon_Size(icon_Size) +{ + m_img_list = new QList(); + + m_columns.clear(); + m_columns.emplace_back(0, 90, "Icon"); + m_columns.emplace_back(1, 160, "Name"); + m_columns.emplace_back(2, 85, "Serial"); + m_columns.emplace_back(3, 55, "FW"); + m_columns.emplace_back(4, 55, "App version"); + m_columns.emplace_back(5, 75, "Category"); + m_columns.emplace_back(6, 160, "Path"); + m_col_icon = &m_columns[0]; + m_col_name = &m_columns[1]; + m_col_serial = &m_columns[2]; + m_col_fw = &m_columns[3]; + m_col_app_ver = &m_columns[4]; + m_col_category = &m_columns[5]; + m_col_path = &m_columns[6]; +} + +Column* columns_arr::GetColumnByPos(u32 pos) +{ + std::vector columns; + for (u32 pos = 0; posshown) + { + pos++; + continue; + } + if (columns[c]->pos != pos) continue; + return columns[c]; + } + + return NULL; +} + +void columns_arr::Update(const std::vector& game_data) +{ + m_img_list->clear(); + m_col_icon->data.clear(); + m_col_name->data.clear(); + m_col_serial->data.clear(); + m_col_fw->data.clear(); + m_col_app_ver->data.clear(); + m_col_category->data.clear(); + m_col_path->data.clear(); + m_icon_indexes.clear(); + + if (m_columns.size() == 0) return; + + for (const auto& game : game_data) + { + m_col_icon->data.push_back(game.icon_path); + m_col_name->data.push_back(game.name); + m_col_serial->data.push_back(game.serial); + m_col_fw->data.push_back(game.fw); + m_col_app_ver->data.push_back(game.app_ver); + m_col_category->data.push_back(game.category); + m_col_path->data.push_back(game.root); + } + + int c = 0; + // load icons + for (const auto& path : m_col_icon->data) + { + QImage* img = new QImage(m_Icon_Size, QImage::Format_ARGB32); + if (!path.empty()) + { + // Load image. + bool success = img->load(qstr(path)); + if (success) + { + m_img_list->append(new QImage(img->scaled(m_Icon_Size, Qt::KeepAspectRatio, Qt::TransformationMode::SmoothTransformation))); + } + else { + // IIRC a load failure means blank image which is fine to have as a placeholder. + QString abspath = QDir(qstr(path)).absolutePath(); + LOG_ERROR(HLE, "Count not load image from path %s", sstr(abspath)); + img->fill(QColor(0, 0, 0, 0)); + m_img_list->append(img); + } + } + else + { + LOG_ERROR(HLE, "Count not load image from empty path"); + img->fill(QColor(0, 0, 0, 0)); + m_img_list->append(img); + } + m_icon_indexes.push_back(c); + c++; + } +} + +void columns_arr::ShowData(QTableWidget* table) +{ + // Hack to delete everything without removing the headers. + table->setRowCount(0); + + // Expect number of columns to be the same as number of icons. + table->setRowCount(m_img_list->length()); + + // Add icons. + for (int r = 0; r < m_img_list->length(); ++r) + { + QTableWidgetItem* iconItem = new QTableWidgetItem; + iconItem->setFlags(iconItem->flags() & ~Qt::ItemIsEditable); + iconItem->setData(Qt::DecorationRole, QPixmap::fromImage(*m_img_list->at(m_icon_indexes[r]))); + table->setItem(r, 0, iconItem); + } + + // Add the other data. + for (int c = 1; c < table->columnCount(); ++c) + { + Column* col = GetColumnByPos(c); + + if (!col) + { + LOG_ERROR(HLE, "Columns loaded with error!"); + return; + } + + int numRows = col->data.size(); + if (numRows != table->rowCount()) + { + table->setRowCount(numRows); + LOG_WARNING(HLE, "Warning. Columns are of different size: number of icons %d number wanted: %d", m_img_list->length(), numRows); + } + + for (int r = 0; rdata.size(); ++r) + { + QTableWidgetItem* curr = new QTableWidgetItem; + curr->setFlags(curr->flags() & ~Qt::ItemIsEditable); + QString text = qstr(col->data[r]); + curr->setText(text); + table->setItem(r, c, curr); + } + table->resizeRowsToContents(); + table->resizeColumnToContents(0); + } +} + +void game_list_frame::closeEvent(QCloseEvent *event) +{ + QDockWidget::closeEvent(event); + emit game_list_frameClosed(); +} diff --git a/rpcs3/rpcs3qt/game_list_frame.h b/rpcs3/rpcs3qt/game_list_frame.h new file mode 100644 index 0000000000..6e797a9a2e --- /dev/null +++ b/rpcs3/rpcs3qt/game_list_frame.h @@ -0,0 +1,139 @@ +#ifndef GAMELISTFRAME_H +#define GAMELISTFRAME_H + +#include "stdafx.h" +#include "Emu/GameInfo.h" + +#include "gui_settings.h" +#include "emu_settings.h" + +#include +#include +#include + +struct Column +{ + u32 pos; + u32 width; + bool shown; + std::vector data; + + const std::string name; + const u32 def_pos; + const u32 def_width; + + Column(const u32 _def_pos, const u32 _def_width, const std::string& _name) + : def_pos(_def_pos) + , def_width(_def_width) + , pos(_def_pos) + , width(_def_width) + , shown(true) + , name(_name) + { + data.clear(); + } + +}; + +struct columns_arr +{ + std::vector m_columns; + + columns_arr(){}; + columns_arr(QSize icon_Size); + + Column* GetColumnByPos(u32 pos); + +public: + Column* m_col_icon; + Column* m_col_name; + Column* m_col_serial; + Column* m_col_fw; + Column* m_col_app_ver; + Column* m_col_category; + Column* m_col_path; + + QSize m_Icon_Size; + QList* m_img_list; + std::vector m_icon_indexes; + + void Update(const std::vector& game_data); + + void ShowData(QTableWidget* list); +}; + +namespace category +{ + const QString hdd_Game = QObject::tr("HDD Game"); + const QString disc_Game = QObject::tr("Disc Game"); + const QString home = QObject::tr("Home"); + const QString audio_Video = QObject::tr("Audio/Video"); + const QString game_Data = QObject::tr("Game Data"); + const QString unknown = QObject::tr("Unknown"); +} + +class game_list_frame : public QDockWidget { + Q_OBJECT + + int m_sortColumn; + bool m_sortAscending; + std::vector m_games; + std::vector m_game_data; + gui_settings* m_gui_settings = new gui_settings(this); + QSize m_Icon_Size; + columns_arr m_columns; + QStringList m_categoryFilters; + Render_Creator m_Render_Creator; + +public: + explicit game_list_frame(std::shared_ptr settings, Render_Creator r_Creator, QWidget *parent = nullptr); + ~game_list_frame(); + void Refresh(); + void ToggleCategoryFilter(QString category, bool show); + + /** Loads from settings. Public so that main frame can easily reset these settings if needed. */ + void LoadSettings(); + + /** Saves settings. Public so that main frame can save this when a caching of column widths is needed for settings backup */ + void SaveSettings(); + +public slots: + /** Resize Gamelist Icons to size */ + void ResizeIcons(QSize size); + +private slots: + void Boot(int row); + void RemoveCustomConfiguration(int row); + + void OnColClicked(int col); +signals: + void game_list_frameClosed(); + void RequestIconPathSet(const std::string path); +protected: + /** Override inherited method from Qt to allow signalling when close happened.*/ + void closeEvent(QCloseEvent* event); +private: + QTableWidget *gameList; + + void ShowContextMenu(const QPoint &pos); + void doubleClickedSlot(const QModelIndex& index); + + void LoadGames(); + void LoadPSF(); + void ShowData(); + void FilterData(); + + // Actions regarding showing/hiding columns + QAction* showIconColAct; + QAction* showNameColAct; + QAction* showSerialColAct; + QAction* showFWColAct; + QAction* showAppVersionColAct; + QAction* showCategoryColAct; + QAction* showPathColAct; + + QList columnActs; + std::shared_ptr xgui_settings; +}; + +#endif // GAMELISTFRAME_H diff --git a/rpcs3/rpcs3qt/gamelistframe.cpp b/rpcs3/rpcs3qt/gamelistframe.cpp deleted file mode 100644 index 1221634298..0000000000 --- a/rpcs3/rpcs3qt/gamelistframe.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#ifdef QT_UI - -#include "gamelistframe.h" - -GameListFrame::GameListFrame(QWidget *parent) : QDockWidget(tr("Game List"), parent) -{ - gameList = new QTableWidget(this); - gameList->setColumnCount(7); - gameList->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Icon"))); - gameList->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Name"))); - gameList->setHorizontalHeaderItem(2, new QTableWidgetItem(tr("Serial"))); - gameList->setHorizontalHeaderItem(3, new QTableWidgetItem(tr("FW"))); - gameList->setHorizontalHeaderItem(4, new QTableWidgetItem(tr("Version"))); - gameList->setHorizontalHeaderItem(5, new QTableWidgetItem(tr("Category"))); - gameList->setHorizontalHeaderItem(6, new QTableWidgetItem(tr("Path"))); - - setWidget(gameList); -} - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/gamelistframe.h b/rpcs3/rpcs3qt/gamelistframe.h deleted file mode 100644 index 0e83d8ff44..0000000000 --- a/rpcs3/rpcs3qt/gamelistframe.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef GAMELISTFRAME_H -#define GAMELISTFRAME_H - -#include -#include - -class GameListFrame : public QDockWidget -{ - Q_OBJECT - -public: - explicit GameListFrame(QWidget *parent = 0); - -private: - QTableWidget *gameList; -}; - -#endif // GAMELISTFRAME_H diff --git a/rpcs3/rpcs3qt/gl_gs_frame.cpp b/rpcs3/rpcs3qt/gl_gs_frame.cpp new file mode 100644 index 0000000000..7bc86d90ee --- /dev/null +++ b/rpcs3/rpcs3qt/gl_gs_frame.cpp @@ -0,0 +1,50 @@ +#include "stdafx.h" +#include "gl_gs_frame.h" +#include "Emu/System.h" + +#include +#include + +gl_gs_frame::gl_gs_frame(int w, int h, QIcon appIcon) + : gs_frame("OpenGL", w, h, appIcon) +{ + setSurfaceType(QSurface::OpenGLSurface); + + m_format.setMajorVersion(4); + m_format.setMinorVersion(3); + m_format.setProfile(QSurfaceFormat::CoreProfile); + m_format.setDepthBufferSize(16); + m_format.setSwapBehavior(QSurfaceFormat::SwapBehavior::DoubleBuffer); + if (g_cfg.video.debug_output) + { + m_format.setOption(QSurfaceFormat::FormatOption::DebugContext); + } + setFormat(m_format); +} + +void* gl_gs_frame::make_context() +{ + auto context = new QOpenGLContext(); + context->setFormat(m_format); + context->create(); + + return context; +} + +void gl_gs_frame::set_current(draw_context_t ctx) +{ + ((QOpenGLContext*)ctx.get())->makeCurrent(this); +} + +void gl_gs_frame::delete_context(void* ctx) +{ + delete (QOpenGLContext*)ctx; +} + +void gl_gs_frame::flip(draw_context_t context) +{ + gs_frame::flip(context); + + ((QOpenGLContext*)context.get())->makeCurrent(this); + ((QOpenGLContext*)context.get())->swapBuffers(this); +} diff --git a/rpcs3/rpcs3qt/gl_gs_frame.h b/rpcs3/rpcs3qt/gl_gs_frame.h new file mode 100644 index 0000000000..ec71d71449 --- /dev/null +++ b/rpcs3/rpcs3qt/gl_gs_frame.h @@ -0,0 +1,18 @@ +#pragma once + +#include "stdafx.h" +#include "gs_frame.h" + +class gl_gs_frame : public gs_frame +{ +private: + QSurfaceFormat m_format; + +public: + gl_gs_frame(int w, int h, QIcon appIcon); + + void* make_context() override; + void set_current(draw_context_t context) override; + void delete_context(void* context) override; + void flip(draw_context_t context) override; +}; diff --git a/rpcs3/rpcs3qt/glviewer.cpp b/rpcs3/rpcs3qt/glviewer.cpp deleted file mode 100644 index 67f06a8f2a..0000000000 --- a/rpcs3/rpcs3qt/glviewer.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#ifdef QT_UI -#include -#include -#include - -#include "glviewer.h" - -// This class hooks beforeRendering and allows us to draw a scene and reset GL state. -// In future, we will likely want to manually control the update rate. - -void GLRenderer::paint() -{ - // Do GL here - glViewport(0, 0, m_viewportSize.width(), m_viewportSize.height()); - - glDisable(GL_DEPTH_TEST); - - // Draw blue to the window to show that we work - glClearColor(0.2, 0, 0.8, 1); - glClear(GL_COLOR_BUFFER_BIT); - - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE); - // Put the GL state back to how it was in case it makes SceneGraph angry - ((QQuickWindow*)sender())->resetOpenGLState(); -} - -GLViewer::GLViewer() - : m_renderer(0) -{ - connect(this, SIGNAL(windowChanged(QQuickWindow*)), this, SLOT(handleWindowChanged(QQuickWindow*))); -} - -void GLViewer::handleWindowChanged(QQuickWindow *win) -{ - if (win) { - connect(win, SIGNAL(beforeSynchronizing()), this, SLOT(sync()), Qt::DirectConnection); - connect(win, SIGNAL(sceneGraphInvalidated()), this, SLOT(cleanup()), Qt::DirectConnection); - // We will take over from here - win->setClearBeforeRendering(false); - } -} - -void GLViewer::sync() -{ - if (!m_renderer) { - m_renderer = new GLRenderer(); - connect(window(), SIGNAL(beforeRendering()), m_renderer, SLOT(paint()), Qt::DirectConnection); - } - m_renderer->setViewportSize(window()->size() * window()->devicePixelRatio()); -} - -void GLViewer::cleanup() -{ - if (m_renderer) { - delete m_renderer; - m_renderer = 0; - } -} -#endif diff --git a/rpcs3/rpcs3qt/glviewer.h b/rpcs3/rpcs3qt/glviewer.h deleted file mode 100644 index 661b85bf31..0000000000 --- a/rpcs3/rpcs3qt/glviewer.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once - -#include - -class GLRenderer : public QObject -{ - Q_OBJECT -public: - GLRenderer() { } - - void setViewportSize(const QSize &size) { m_viewportSize = size; } - -public slots: - void paint(); - -private: - QSize m_viewportSize; -}; - -class GLViewer : public QQuickItem -{ - Q_OBJECT -public: - GLViewer(); - ~GLViewer() { cleanup(); } - -public slots: - void sync(); - void cleanup(); - -private slots: - void handleWindowChanged(QQuickWindow *win); - -private: - GLRenderer *m_renderer; -}; diff --git a/rpcs3/rpcs3qt/graphics_tab.cpp b/rpcs3/rpcs3qt/graphics_tab.cpp new file mode 100644 index 0000000000..eab4908aef --- /dev/null +++ b/rpcs3/rpcs3qt/graphics_tab.cpp @@ -0,0 +1,264 @@ +#include +#include +#include +#include +#include + +#include "graphics_tab.h" + +inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); } + +graphics_tab::graphics_tab(std::shared_ptr xSettings, Render_Creator r_Creator, QWidget *parent) : QWidget(parent), xemu_settings(xSettings) +{ + // Render + QGroupBox *render = new QGroupBox(tr("Render")); + + QComboBox *renderBox = xemu_settings->CreateEnhancedComboBox(emu_settings::Renderer, this); + + QVBoxLayout *renderVbox = new QVBoxLayout(); + renderVbox->addWidget(renderBox); + render->setLayout(renderVbox); + + // Resolution + QGroupBox *res = new QGroupBox(tr("Resolution")); + + QComboBox* resBox = xemu_settings->CreateEnhancedComboBox(emu_settings::Resolution, this); + + QVBoxLayout *resVbox = new QVBoxLayout(); + resVbox->addWidget(resBox); + res->setLayout(resVbox); + + // Graphics Adapter + QStringList D3D12Adapters = r_Creator.D3D12Adapters; + QStringList vulkanAdapters = r_Creator.vulkanAdapters; + bool supportsD3D12 = r_Creator.supportsD3D12; + bool supportsVulkan = r_Creator.supportsVulkan; + QString r_D3D12 = r_Creator.render_D3D12; + QString r_Vulkan = r_Creator.render_Vulkan; + QString r_OpenGL = r_Creator.render_OpenGL; + QString old_D3D12; + QString old_Vulkan; + QGroupBox *graphicsAdapter; + QComboBox *graphicsAdapterBox; + + if (supportsD3D12) + { + old_D3D12 = qstr(xemu_settings->GetSetting(emu_settings::D3D12Adapter)); + } + else + { + // Remove D3D12 option from render combobox + for (int i = 0; i < renderBox->count(); i++) + { + if (renderBox->itemText(i) == r_D3D12) + { + renderBox->removeItem(i); + break; + } + } + } + + if (supportsVulkan) + { + old_Vulkan = qstr(xemu_settings->GetSetting(emu_settings::VulkanAdapter)); + } + else + { + // Remove Vulkan option from render combobox + for (int i = 0; i < renderBox->count(); i++) + { + if (renderBox->itemText(i) == r_Vulkan) + { + renderBox->removeItem(i); + break; + } + } + } + + if (supportsD3D12 || supportsVulkan) + { + graphicsAdapter = new QGroupBox(tr("Select Graphics Device")); + graphicsAdapterBox = new QComboBox(this); + QVBoxLayout *graphicsAdapterVbox = new QVBoxLayout(); + graphicsAdapterVbox->addWidget(graphicsAdapterBox); + graphicsAdapter->setLayout(graphicsAdapterVbox); + QString oldRender = renderBox->itemText(renderBox->currentIndex()); + + auto switchGraphicsAdapter = [=](int index) + { + QString render = renderBox->itemText(index); + m_isD3D12 = render == r_D3D12; + m_isVulkan = render == r_Vulkan; + graphicsAdapter->setEnabled(m_isD3D12 || m_isVulkan); + + // D3D Adapter + if (m_isD3D12) + { + // Fill combobox + graphicsAdapterBox->clear(); + for (auto adapter : D3D12Adapters) + { + graphicsAdapterBox->addItem(adapter); + } + // Reset Adapter to old config + xemu_settings->SetSetting(emu_settings::D3D12Adapter, sstr(old_D3D12)); + int idx = graphicsAdapterBox->findText(old_D3D12); + if (idx == -1) + { + idx = 0; + LOG_WARNING(RSX, "Current %s adapter not available: resetting to default!", sstr(r_D3D12)); + } + graphicsAdapterBox->setCurrentIndex(idx); + } + + // Vulkan Adapter + else if (m_isVulkan) + { + // Fill combobox + graphicsAdapterBox->clear(); + for (auto adapter : vulkanAdapters) + { + graphicsAdapterBox->addItem(adapter); + } + // Reset Adapter to old config + xemu_settings->SetSetting(emu_settings::VulkanAdapter, sstr(old_Vulkan)); + int idx = graphicsAdapterBox->findText(old_Vulkan); + if (idx == -1) + { + idx = 0; + LOG_WARNING(RSX, "Current %s adapter not available: resetting to default!", sstr(r_Vulkan)); + } + graphicsAdapterBox->setCurrentIndex(idx); + } + + // Other Adapter + else + { + // Reset Adapters to old config + if (supportsD3D12) + { + xemu_settings->SetSetting(emu_settings::D3D12Adapter, sstr(old_D3D12)); + } + if (supportsVulkan) + { + xemu_settings->SetSetting(emu_settings::VulkanAdapter, sstr(old_Vulkan)); + } + + // Fill combobox with placeholder + graphicsAdapterBox->clear(); + graphicsAdapterBox->addItem(tr("Not needed for %1 renderer").arg(render)); + } + }; + + auto setAdapter = [=](QString text) + { + if (text.isEmpty()) return; + + // don't set adapter if signal was created by switching render + QString newRender = renderBox->itemText(renderBox->currentIndex()); + if (m_oldRender == newRender) + { + if (m_isD3D12 && D3D12Adapters.contains(text)) + { + xemu_settings->SetSetting(emu_settings::D3D12Adapter, sstr(text)); + } + else if (m_isVulkan && vulkanAdapters.contains(text)) + { + xemu_settings->SetSetting(emu_settings::VulkanAdapter, sstr(text)); + } + } + else + { + m_oldRender = newRender; + } + }; + + // Init + setAdapter(graphicsAdapterBox->currentText()); + switchGraphicsAdapter(renderBox->currentIndex()); + + // Events + connect(graphicsAdapterBox, &QComboBox::currentTextChanged, setAdapter); + connect(renderBox, static_cast(&QComboBox::currentIndexChanged), switchGraphicsAdapter); + } + + // Aspect ratio + QGroupBox *aspect = new QGroupBox(tr("Aspect ratio")); + + QComboBox *aspectBox = xemu_settings->CreateEnhancedComboBox(emu_settings::AspectRatio, this); + + QVBoxLayout *aspectVbox = new QVBoxLayout(); + aspectVbox->addWidget(aspectBox); + aspect->setLayout(aspectVbox); + + // Frame limit + QGroupBox *frameLimit = new QGroupBox(tr("Frame limit")); + + QComboBox *frameLimitBox = xemu_settings->CreateEnhancedComboBox(emu_settings::FrameLimit, this); + + QVBoxLayout *frameLimitVbox = new QVBoxLayout(); + frameLimitVbox->addWidget(frameLimitBox); + frameLimit->setLayout(frameLimitVbox); + + // Checkboxes + QCheckBox *dumpColor = xemu_settings->CreateEnhancedCheckBox(emu_settings::WriteColorBuffers, this); + QCheckBox *readColor = xemu_settings->CreateEnhancedCheckBox(emu_settings::ReadColorBuffers, this); + QCheckBox *dumpDepth = xemu_settings->CreateEnhancedCheckBox(emu_settings::WriteDepthBuffer, this); + QCheckBox *readDepth = xemu_settings->CreateEnhancedCheckBox(emu_settings::ReadDepthBuffer, this); + QCheckBox *glLegacyBuffers = xemu_settings->CreateEnhancedCheckBox(emu_settings::LegacyBuffers, this); + QCheckBox *debugOutput = xemu_settings->CreateEnhancedCheckBox(emu_settings::DebugOutput, this); + QCheckBox *debugOverlay = xemu_settings->CreateEnhancedCheckBox(emu_settings::DebugOverlay, this); + QCheckBox *logProg = xemu_settings->CreateEnhancedCheckBox(emu_settings::LogShaderPrograms, this); + QCheckBox *vsync = xemu_settings->CreateEnhancedCheckBox(emu_settings::VSync, this); + QCheckBox *gpuTextureScaling = xemu_settings->CreateEnhancedCheckBox(emu_settings::GPUTextureScaling, this); + + // Combobox Part + QHBoxLayout *hbox1 = new QHBoxLayout(); + QVBoxLayout *vbox11 = new QVBoxLayout(); + vbox11->addWidget(render); + vbox11->addWidget(res); + if (supportsD3D12 || supportsVulkan) + { + // be careful with layout changes due to render when adding new stuff + vbox11->addWidget(graphicsAdapter); + } + vbox11->addStretch(); + QVBoxLayout *vbox12 = new QVBoxLayout(); + vbox12->addWidget(aspect); + vbox12->addWidget(frameLimit); + vbox12->addStretch(); + hbox1->addLayout(vbox11); + hbox1->addLayout(vbox12); + + // Checkbox Part + QHBoxLayout *hbox2 = new QHBoxLayout(); + QVBoxLayout *vbox21 = new QVBoxLayout(); + vbox21->addWidget(dumpColor); + vbox21->addWidget(readColor); + vbox21->addWidget(dumpDepth); + vbox21->addWidget(readDepth); + vbox21->addWidget(glLegacyBuffers); + QVBoxLayout *vbox22 = new QVBoxLayout(); + vbox22->addWidget(debugOutput); + vbox22->addWidget(debugOverlay); + vbox22->addWidget(logProg); + vbox22->addWidget(vsync); + vbox22->addWidget(gpuTextureScaling); + hbox2->addLayout(vbox21); + hbox2->addLayout(vbox22); + + QVBoxLayout *vbox = new QVBoxLayout(); + vbox->addLayout(hbox1); + vbox->addSpacing(10); + vbox->addLayout(hbox2); + vbox->addStretch(); + setLayout(vbox); + + auto fixGLLegacy = [=](const QString& text) { + glLegacyBuffers->setEnabled(text == r_OpenGL); + }; + + // Handle connects to disable specific checkboxes that depend on GUI state. + fixGLLegacy(renderBox->currentText()); // Init + connect(renderBox, &QComboBox::currentTextChanged, fixGLLegacy); +} diff --git a/rpcs3/rpcs3qt/graphics_tab.h b/rpcs3/rpcs3qt/graphics_tab.h new file mode 100644 index 0000000000..95af7664ca --- /dev/null +++ b/rpcs3/rpcs3qt/graphics_tab.h @@ -0,0 +1,26 @@ +#ifndef GRAPHICSTAB_H +#define GRAPHICSTAB_H + +#include "emu_settings.h" + +#include + +#include + +class graphics_tab : public QWidget +{ + Q_OBJECT + +public: + explicit graphics_tab(std::shared_ptr xemu_settings, Render_Creator r_Creator, QWidget *parent = 0); + +signals: + +private: + std::shared_ptr xemu_settings; + QString m_oldRender = ""; + bool m_isD3D12 = false; + bool m_isVulkan = false; +}; + +#endif // GRAPHICSTAB_H diff --git a/rpcs3/rpcs3qt/graphicstab.cpp b/rpcs3/rpcs3qt/graphicstab.cpp deleted file mode 100644 index d0798cd993..0000000000 --- a/rpcs3/rpcs3qt/graphicstab.cpp +++ /dev/null @@ -1,147 +0,0 @@ -#ifdef QT_UI - -#include -#include -#include -#include -#include - -#ifdef _MSC_VER -#include -#undef GetHwnd -#include -#include -#include -#endif - -#include "graphicstab.h" - -GraphicsTab::GraphicsTab(QWidget *parent) : QWidget(parent) -{ - // Render - QGroupBox *render = new QGroupBox(tr("Render")); - - QComboBox *renderBox = new QComboBox; - renderBox->addItem(tr("Null")); - renderBox->addItem(tr("Opengl")); -#ifdef _MSC_VER - renderBox->addItem(tr("D3D12")); -#endif // _MSC_VER -#ifdef _WIN32 - renderBox->addItem(tr("Vulkan")); -#endif // _WIN32 - - QVBoxLayout *renderVbox = new QVBoxLayout; - renderVbox->addWidget(renderBox); - render->setLayout(renderVbox); - - // Resolution - QGroupBox *res = new QGroupBox(tr("Resolution")); - - QComboBox *resBox = new QComboBox; - resBox->addItem(tr("1920x1080")); - resBox->addItem(tr("1280x720")); - resBox->addItem(tr("720x480")); - resBox->addItem(tr("1600x1080")); - resBox->addItem(tr("1440x1080")); - resBox->addItem(tr("1280x1080")); - resBox->addItem(tr("960x1080")); - - QVBoxLayout *resVbox = new QVBoxLayout; - resVbox->addWidget(resBox); - res->setLayout(resVbox); - - // D3D Adapter - QGroupBox *d3dAdapter = new QGroupBox(tr("D3D Adapter")); - - QComboBox *d3dAdapterBox = new QComboBox; - - QVBoxLayout *d3dAdapterVbox = new QVBoxLayout; - d3dAdapterVbox->addWidget(d3dAdapterBox); - d3dAdapter->setLayout(d3dAdapterVbox); - - // Aspect ratio - QGroupBox *aspect = new QGroupBox(tr("Aspect ratio")); - - QComboBox *aspectBox = new QComboBox; - aspectBox->addItem(tr("4x3")); - aspectBox->addItem(tr("16x9")); - - QVBoxLayout *aspectVbox = new QVBoxLayout; - aspectVbox->addWidget(aspectBox); - aspect->setLayout(aspectVbox); - - // Frame limit - QGroupBox *frameLimit = new QGroupBox(tr("Frame limit")); - - QComboBox *frameLimitBox = new QComboBox; - frameLimitBox->addItem(tr("Off")); - frameLimitBox->addItem(tr("50")); - frameLimitBox->addItem(tr("60")); - frameLimitBox->addItem(tr("30")); - frameLimitBox->addItem(tr("Auto")); - - QVBoxLayout *frameLimitVbox = new QVBoxLayout; - frameLimitVbox->addWidget(frameLimitBox); - frameLimit->setLayout(frameLimitVbox); - - // Checkboxes - QCheckBox *dumpColor = new QCheckBox(tr("Write Color Buffers")); - QCheckBox *readColor = new QCheckBox(tr("Read Color Buffers")); - QCheckBox *dumpDepth = new QCheckBox(tr("Write Depth Buffer")); - QCheckBox *readDepth = new QCheckBox(tr("Read Depth Buffer")); - QCheckBox *glLegacyBuffers = new QCheckBox(tr("Use Legacy OpenGL Buffers")); - QCheckBox *debugOutput = new QCheckBox(tr("Debug Output")); - QCheckBox *debugOverlay = new QCheckBox(tr("Debug Overlay")); - QCheckBox *logProg = new QCheckBox(tr("Log shader programs")); - QCheckBox *vsync = new QCheckBox(tr("VSync")); - - // Main layout - QVBoxLayout *vbox1 = new QVBoxLayout; - vbox1->addWidget(render); - vbox1->addWidget(res); - vbox1->addWidget(d3dAdapter); - vbox1->addWidget(aspect); - vbox1->addWidget(frameLimit); - - QVBoxLayout *vbox2 = new QVBoxLayout; - vbox2->addWidget(dumpColor); - vbox2->addWidget(readColor); - vbox2->addWidget(dumpDepth); - vbox2->addWidget(readDepth); - vbox2->addWidget(glLegacyBuffers); - vbox2->addWidget(debugOutput); - vbox2->addWidget(debugOverlay); - vbox2->addWidget(logProg); - vbox2->addWidget(vsync); - vbox2->addStretch(); - - QHBoxLayout *hbox = new QHBoxLayout; - hbox->addLayout(vbox1); - hbox->addLayout(vbox2); - setLayout(hbox); - -#ifdef _MSC_VER - Microsoft::WRL::ComPtr dxgi_factory; - - if (SUCCEEDED(CreateDXGIFactory(IID_PPV_ARGS(&dxgi_factory)))) - { - Microsoft::WRL::ComPtr adapter; - - for (UINT id = 0; dxgi_factory->EnumAdapters(id, adapter.ReleaseAndGetAddressOf()) != DXGI_ERROR_NOT_FOUND; id++) - { - DXGI_ADAPTER_DESC desc; - adapter->GetDesc(&desc); - d3dAdapterBox->addItem(QString::fromWCharArray(desc.Description)); - } - - //pads.emplace_back(std::make_unique(cfg_location{ "Video", "D3D12", "Adapter" }, cbox_gs_d3d_adapter)); - } - else -#endif - { - d3dAdapter->setEnabled(false); - } -} - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/graphicstab.h b/rpcs3/rpcs3qt/graphicstab.h deleted file mode 100644 index d8383dcaaf..0000000000 --- a/rpcs3/rpcs3qt/graphicstab.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef GRAPHICSTAB_H -#define GRAPHICSTAB_H - -#include - -class GraphicsTab : public QWidget -{ - Q_OBJECT - -public: - explicit GraphicsTab(QWidget *parent = 0); - -signals: - -public slots: -}; - -#endif // GRAPHICSTAB_H diff --git a/rpcs3/rpcs3qt/gs_frame.cpp b/rpcs3/rpcs3qt/gs_frame.cpp new file mode 100644 index 0000000000..df3d55d8a9 --- /dev/null +++ b/rpcs3/rpcs3qt/gs_frame.cpp @@ -0,0 +1,205 @@ +#include "gs_frame.h" + +#include "Utilities/Config.h" +#include "Utilities/Timer.h" +#include "Emu/System.h" + +#include +#include +#include + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } + +gs_frame::gs_frame(const QString& title, int w, int h, QIcon appIcon) + : QWindow() +{ + m_windowTitle = title; + + if (!appIcon.isNull()) + { + setIcon(appIcon); + } + + g_cfg.misc.show_fps_in_title ? m_show_fps = true : m_show_fps = false; + + resize(w, h); + + // Change cursor when in fullscreen. + connect(this, &QWindow::visibilityChanged, this, &gs_frame::HandleCursor); +} + +void gs_frame::paintEvent(QPaintEvent *event) +{ + Q_UNUSED(event); +} + +void gs_frame::keyPressEvent(QKeyEvent *keyEvent) +{ + auto l_handleKeyEvent = [this ,keyEvent]() + { + switch (keyEvent->key()) + { + case Qt::Key_Return: if (keyEvent->modifiers() == Qt::AltModifier) { OnFullScreen(); return; } break; + case Qt::Key_Escape: if (visibility() == FullScreen) { setVisibility(Windowed); return; } break; + } + }; + Emu.CallAfter(l_handleKeyEvent); +} + +void gs_frame::OnFullScreen() +{ + auto l_setFullScreenVis = [=]() + { + if (visibility() == FullScreen) + { + setVisibility(Windowed); + } + else + { + setVisibility(FullScreen); + } + }; + Emu.CallAfter(l_setFullScreenVis); +} + +void gs_frame::close() +{ + Emu.Stop(); + Emu.CallAfter([=]() {QWindow::close(); }); +} + +bool gs_frame::shown() +{ + return QWindow::isVisible(); +} + +void gs_frame::hide() +{ + Emu.CallAfter([=]() {QWindow::hide(); }); +} + +void gs_frame::show() +{ + Emu.CallAfter([=]() { + QWindow::show(); + if (g_cfg.misc.start_fullscreen) + { + setVisibility(FullScreen); + } + }); +} + +void* gs_frame::handle() const +{ +#ifdef __linux__ + return (void *)this->winId(); +#elif _WIN32 + return (HWND) this->winId(); +#endif + +} + +void* gs_frame::make_context() +{ + return nullptr; +} + +void gs_frame::set_current(draw_context_t ctx) +{ + Q_UNUSED(ctx); +} + +void gs_frame::delete_context(void* ctx) +{ + Q_UNUSED(ctx); +} + +int gs_frame::client_width() +{ + return size().width(); +} + +int gs_frame::client_height() +{ + return size().height(); +} + +void gs_frame::flip(draw_context_t) +{ + QString title; + + if (!m_windowTitle.isEmpty()) + { + title += m_windowTitle; + } + + if (!Emu.GetTitle().empty()) + { + title += qstr(" | " + Emu.GetTitle()); + } + + if (!Emu.GetTitleID().empty()) + { + title += qstr(" | [" + Emu.GetTitleID() + ']'); + } + + if (m_show_fps) + { + ++m_frames; + + static Timer fps_t; + + if (fps_t.GetElapsedTimeInSec() >= 0.5) + { + QString fps_title = qstr(fmt::format("FPS: %.2f", (double)m_frames / fps_t.GetElapsedTimeInSec())); + + if (!title.isEmpty()) + { + fps_title += " | " + title; + } + + Emu.CallAfter([this, title = std::move(fps_title)]() {setTitle(title); }); + + m_frames = 0; + fps_t.Start(); + } + } + else + { + if (this->title() != title) + { + Emu.CallAfter([this, title = std::move(title)]() {setTitle(title); }); + } + } +} + +void gs_frame::mouseDoubleClickEvent(QMouseEvent* ev) +{ + if (ev->button() == Qt::LeftButton) + { + OnFullScreen(); + } +} + +void gs_frame::HandleCursor(QWindow::Visibility visibility) +{ + if (visibility == QWindow::Visibility::FullScreen) + { + setCursor(Qt::BlankCursor); + } + else + { + setCursor(Qt::ArrowCursor); + } +} + +/** Override qt hideEvent. + * For some reason beyond me, hitting X hides the game window instead of closes. To remedy this, I forcefully murder it for commiting this transgression. + * Closing the window has a side-effect of also stopping the emulator. +*/ +void gs_frame::hideEvent(QHideEvent* ev) +{ + Q_UNUSED(ev); + + close(); +} diff --git a/rpcs3/rpcs3qt/gs_frame.h b/rpcs3/rpcs3qt/gs_frame.h new file mode 100644 index 0000000000..033e288213 --- /dev/null +++ b/rpcs3/rpcs3qt/gs_frame.h @@ -0,0 +1,48 @@ +#ifndef GSFRAME_H +#define GSFRAME_H + +#include "stdafx.h" +#include "Emu/RSX/GSRender.h" + +#include +#include + +class gs_frame : public QWindow, public GSFrameBase +{ + Q_OBJECT + u64 m_frames = 0; + QString m_windowTitle; + bool m_show_fps; + +public: + gs_frame(const QString& title, int w, int h, QIcon appIcon); +protected: + virtual void paintEvent(QPaintEvent *event); + + void keyPressEvent(QKeyEvent *keyEvent); + void OnFullScreen(); + + void close() override; + + bool shown() override; + void hide() override; + void show() override; + void mouseDoubleClickEvent(QMouseEvent* ev) override; + + //void SetSize(int width, int height); + + void* handle() const override; + + void* make_context() override; + void set_current(draw_context_t context) override; + void delete_context(void* context) override; + void flip(draw_context_t context) override; + int client_width() override; + int client_height() override; + + void hideEvent(QHideEvent* ev) override; +private slots: + void HandleCursor(QWindow::Visibility visibility); +}; + +#endif diff --git a/rpcs3/rpcs3qt/gui_settings.cpp b/rpcs3/rpcs3qt/gui_settings.cpp new file mode 100644 index 0000000000..0596351b03 --- /dev/null +++ b/rpcs3/rpcs3qt/gui_settings.cpp @@ -0,0 +1,206 @@ +#include "gui_settings.h" + +#include "game_list_frame.h" + +#include +#include +#include + +inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); } + +gui_settings::gui_settings(QObject* parent) : QObject(parent), settings(ComputeSettingsDir() + tr("CurrentSettings") + ".ini", QSettings::Format::IniFormat, parent), + settingsDir(ComputeSettingsDir()) +{ +} + +gui_settings::~gui_settings() +{ + settings.sync(); +} + +QString gui_settings::ComputeSettingsDir() +{ + QString path = QDir(QDir::currentPath()).relativeFilePath(QCoreApplication::applicationDirPath()); + path += "/GuiConfigs/"; + return path; +} + +void gui_settings::ChangeToConfig(const QString& name) +{ + if (name != tr("CurrentSettings")) + { // don't try to change to yourself. + Reset(false); + + QSettings other(settingsDir.absoluteFilePath(name + ".ini"), QSettings::IniFormat); + + QStringList keys = other.allKeys(); + for (QStringList::iterator i = keys.begin(); i != keys.end(); i++) + { + settings.setValue(*i, other.value(*i)); + } + settings.sync(); + } +} + +void gui_settings::Reset(bool removeMeta) +{ + if (removeMeta) + { + settings.clear(); + } + else + { + settings.remove(GUI::logger); + settings.remove(GUI::main_window); + settings.remove(GUI::game_list); + } +} + +QVariant gui_settings::GetValue(const GUI_SAVE& entry) +{ + return settings.value(entry.key + "/" + entry.name, entry.def); +} + +void gui_settings::SetValue(const GUI_SAVE& entry, const QVariant& value) +{ + settings.beginGroup(entry.key); + settings.setValue(entry.name, value); + settings.endGroup(); +} + +QStringList gui_settings::GetGameListCategoryFilters() +{ + QStringList filterList; + if (GetCategoryVisibility(category::hdd_Game)) filterList.append(category::hdd_Game); + if (GetCategoryVisibility(category::disc_Game)) filterList.append(category::disc_Game); + if (GetCategoryVisibility(category::home)) filterList.append(category::home); + if (GetCategoryVisibility(category::audio_Video)) filterList.append(category::audio_Video); + if (GetCategoryVisibility(category::game_Data)) filterList.append(category::game_Data); + if (GetCategoryVisibility(category::unknown)) filterList.append(category::unknown); + return filterList; +} + +bool gui_settings::GetCategoryVisibility(QString cat) +{ + GUI_SAVE value; + + if (cat == category::hdd_Game) value = GUI::cat_hdd_game; + else if (cat == category::disc_Game) value = GUI::cat_disc_game; + else if (cat == category::home) value = GUI::cat_home; + else if (cat == category::audio_Video) value = GUI::cat_audio_video; + else if (cat == category::game_Data) value = GUI::cat_game_data; + else if (cat == category::unknown) value = GUI::cat_unknown; + else + { + value = GUI::cat_other; + LOG_WARNING(GENERAL, "Category %s is unknown. Entry %s was loaded", sstr(cat), sstr(value.name)); + } + + return GetValue(value).toBool(); +} + +void gui_settings::SetCategoryVisibility(const QString& cat, const bool& val) +{ + GUI_SAVE value; + + if (cat == category::hdd_Game) value = GUI::cat_hdd_game; + else if (cat == category::disc_Game) value = GUI::cat_disc_game; + else if (cat == category::home) value = GUI::cat_home; + else if (cat == category::audio_Video) value = GUI::cat_audio_video; + else if (cat == category::game_Data) value = GUI::cat_game_data; + else if (cat == category::unknown) value = GUI::cat_unknown; + else + { + value = GUI::cat_other; + LOG_WARNING(GENERAL, "Category %s is unknown. Entry %s has been set to %d", sstr(cat), sstr(value.name), val); + } + + SetValue(value, val); +} + +void gui_settings::ShowInfoBox(const GUI_SAVE& entry, const QString& title, const QString& text, QWidget* parent) +{ + if (GetValue(entry).toBool()) + { + QCheckBox* cb = new QCheckBox(tr("Don't show again")); + QMessageBox* mb = new QMessageBox(QMessageBox::Information, title, text, QMessageBox::Ok, parent); + mb->setCheckBox(cb); + mb->deleteLater(); + mb->exec(); + if (mb->checkBox()->isChecked()) + { + SetValue(entry, false); + LOG_WARNING(GENERAL, "Entry %s was set to false", sstr(entry.name)); + } + } + else LOG_WARNING(GENERAL, "Entry %s is false, Info Box not shown", sstr(entry.name)); +} + +void gui_settings::SetGamelistColVisibility(int col, bool val) +{ + SetValue(GUI_SAVE(GUI::game_list, "Col" + QString::number(col) + "visible", true), val); +} + +void gui_settings::SaveCurrentConfig(const QString& friendlyName) +{ + SetValue(GUI::m_currentConfig, friendlyName); + BackupSettingsToTarget(friendlyName); +} + +logs::level gui_settings::GetLogLevel() +{ + return (logs::level) GetValue(GUI::l_level).toUInt(); +} + +bool gui_settings::GetGamelistColVisibility(int col) +{ + return GetValue(GUI_SAVE(GUI::game_list, "Col" + QString::number(col) + "visible", true)).toBool(); +} + +QStringList gui_settings::GetConfigEntries() +{ + QStringList nameFilter; + nameFilter << "*.ini"; + QFileInfoList entries = settingsDir.entryInfoList(nameFilter, QDir::Files); + QStringList res; + for (QFileInfo entry : entries) + { + res.append(entry.baseName()); + } + + return res; +} + +void gui_settings::BackupSettingsToTarget(const QString& friendlyName) +{ + QSettings target(ComputeSettingsDir() + friendlyName + ".ini", QSettings::Format::IniFormat); + QStringList keys = settings.allKeys(); + for (QStringList::iterator i = keys.begin(); i != keys.end(); i++) + { + if (!i->startsWith(GUI::meta)) + { + target.setValue(*i, settings.value(*i)); + } + } + target.sync(); +} + +QStringList gui_settings::GetStylesheetEntries() +{ + QStringList nameFilter; + nameFilter << "*.qss"; + QString path = settingsDir.absolutePath(); + QFileInfoList entries = settingsDir.entryInfoList(nameFilter, QDir::Files); + QStringList res; + for (QFileInfo entry : entries) + { + res.append(entry.baseName()); + } + + return res; +} + +QString gui_settings::GetCurrentStylesheetPath() +{ + return settingsDir.absoluteFilePath(GetValue(GUI::m_currentStylesheet).toString() + ".qss"); +} diff --git a/rpcs3/rpcs3qt/gui_settings.h b/rpcs3/rpcs3qt/gui_settings.h new file mode 100644 index 0000000000..aca7854caf --- /dev/null +++ b/rpcs3/rpcs3qt/gui_settings.h @@ -0,0 +1,135 @@ +#ifndef GUI_SETTINGS_H +#define GUI_SETTINGS_H + +#include "Utilities/Log.h" + +#include +#include +#include +#include + +typedef struct GUI_SAVE +{ + QString key; + QString name; + QVariant def; + + GUI_SAVE() { + key = ""; + name = ""; + def = QVariant(); + }; + GUI_SAVE(const QString& k, const QString& n, const QVariant& d) { + key = k; + name = n; + def = d; + }; +}; + +typedef std::map icon_size; + +namespace GUI +{ + const QString gl_icon_key_small = "small"; + const QString gl_icon_key_medium = "medium"; + const QString gl_icon_key_large = "large"; + + const icon_size gl_icon_size = { + { gl_icon_key_small, QSize(80, 44) }, + { gl_icon_key_medium, QSize(160, 88) }, + { gl_icon_key_large, QSize(320, 176) } + }; + + const QString main_window = "main_window"; + const QString game_list = "GameList"; + const QString logger = "Logger"; + const QString meta = "Meta"; + + const GUI_SAVE ib_pkg_success = GUI_SAVE( main_window, "infoBoxEnabledInstallPKG", true ); + const GUI_SAVE ib_pup_success = GUI_SAVE( main_window, "infoBoxEnabledInstallPUP", true ); + const GUI_SAVE ib_show_welcome = GUI_SAVE(main_window, "infoBoxEnabledWelcome", true); + + const GUI_SAVE fd_install_pkg = GUI_SAVE( main_window, "lastExplorePathPKG", "" ); + const GUI_SAVE fd_install_pup = GUI_SAVE( main_window, "lastExplorePathPUP", "" ); + const GUI_SAVE fd_boot_elf = GUI_SAVE( main_window, "lastExplorePathELF", "" ); + const GUI_SAVE fd_boot_game = GUI_SAVE( main_window, "lastExplorePathGAME", "" ); + const GUI_SAVE fd_decrypt_sprx = GUI_SAVE( main_window, "lastExplorePathSPRX", "" ); + + const GUI_SAVE mw_debugger = GUI_SAVE( main_window, "debuggerVisible", false ); + const GUI_SAVE mw_logger = GUI_SAVE( main_window, "loggerVisible", true ); + const GUI_SAVE mw_gamelist = GUI_SAVE( main_window, "gamelistVisible", true ); + const GUI_SAVE mw_controls = GUI_SAVE( main_window, "controlsVisible", true ); + const GUI_SAVE mw_geometry = GUI_SAVE( main_window, "geometry", QByteArray() ); + const GUI_SAVE mw_windowState = GUI_SAVE( main_window, "windowState", QByteArray() ); + + const GUI_SAVE cat_hdd_game = GUI_SAVE( game_list, "categoryVisibleHDDGame", true ); + const GUI_SAVE cat_disc_game = GUI_SAVE( game_list, "categoryVisibleDiscGame", true ); + const GUI_SAVE cat_home = GUI_SAVE( game_list, "categoryVisibleHome", true ); + const GUI_SAVE cat_audio_video = GUI_SAVE( game_list, "categoryVisibleAudioVideo", true ); + const GUI_SAVE cat_game_data = GUI_SAVE( game_list, "categoryVisibleGameData", true ); + const GUI_SAVE cat_unknown = GUI_SAVE( game_list, "categoryVisibleUnknown", true ); + const GUI_SAVE cat_other = GUI_SAVE( game_list, "categoryVisibleOther", true ); + + const GUI_SAVE gl_sortAsc = GUI_SAVE( game_list, "sortAsc", true ); + const GUI_SAVE gl_sortCol = GUI_SAVE( game_list, "sortCol", 1 ); + const GUI_SAVE gl_state = GUI_SAVE( game_list, "state", QByteArray() ); + const GUI_SAVE gl_iconSize = GUI_SAVE( game_list, "iconSize", gl_icon_key_small); + + const GUI_SAVE l_tty = GUI_SAVE( logger, "TTY", true ); + const GUI_SAVE l_level = GUI_SAVE( logger, "level", (uint)(logs::level::success) ); + + const GUI_SAVE m_currentConfig = GUI_SAVE(meta, "currentConfig", QObject::tr("CurrentSettings")); + const GUI_SAVE m_currentStylesheet = GUI_SAVE(meta, "currentStylesheet", QObject::tr("default")); +} + +/** Class for GUI settings.. +*/ +class gui_settings : public QObject +{ + Q_OBJECT + +public: + explicit gui_settings(QObject* parent = nullptr); + ~gui_settings(); + + QString GetSettingsDir() { + return settingsDir.absolutePath(); + } + + /** Changes the settings file to the destination preset*/ + void ChangeToConfig(const QString& destination); + + bool GetCategoryVisibility(QString cat); + QVariant GetValue(const GUI_SAVE& entry); + + void ShowInfoBox(const GUI_SAVE& entry, const QString& title, const QString& text, QWidget* parent = 0); + + logs::level GetLogLevel(); + bool GetGamelistColVisibility(int col); + QStringList GetConfigEntries(); + QString GetCurrentStylesheetPath(); + QStringList GetStylesheetEntries(); + QStringList GetGameListCategoryFilters(); + +public slots: + void Reset(bool removeMeta = false); + + /** Write value to entry */ + void SetValue(const GUI_SAVE& entry, const QVariant& value); + + /** Sets the visibility of the chosen category. */ + void SetCategoryVisibility(const QString& cat, const bool& val); + + void SetGamelistColVisibility(int col, bool val); + + void SaveCurrentConfig(const QString& friendlyName); + +private: + QString ComputeSettingsDir(); + void BackupSettingsToTarget(const QString& destination); + + QSettings settings; + QDir settingsDir; +}; + +#endif diff --git a/rpcs3/rpcs3qt/gui_tab.cpp b/rpcs3/rpcs3qt/gui_tab.cpp new file mode 100644 index 0000000000..4def3bba06 --- /dev/null +++ b/rpcs3/rpcs3qt/gui_tab.cpp @@ -0,0 +1,208 @@ +#include "gui_tab.h" + +#include +#include +#include +#include +#include + +gui_tab::gui_tab(std::shared_ptr xSettings, QWidget *parent) : QWidget(parent), xgui_settings(xSettings) +{ + // Left Widgets + // configs + QGroupBox *gb_configs = new QGroupBox(tr("GUI Configs"), this); + QVBoxLayout *vbox_configs = new QVBoxLayout(); + QHBoxLayout *hbox_configs = new QHBoxLayout(); + combo_configs = new QComboBox(this); + QPushButton *pb_apply_config = new QPushButton(tr("Apply"), this); + // control buttons + QGroupBox *gb_controls = new QGroupBox(tr("GUI Controls"), this); + QVBoxLayout *vbox_controls = new QVBoxLayout(); + QPushButton *pb_reset_default = new QPushButton(tr("Reset GUI to Default"), this); + QPushButton *pb_backup_config = new QPushButton(tr("Save Current Configuration"), this); + QPushButton *pb_open_folder = new QPushButton(tr("Open Config/Sheet Folder"), this); + QCheckBox *cb_show_welcome = new QCheckBox(tr("Show Welcome Screen"), this); + cb_show_welcome->setChecked(xSettings->GetValue(GUI::ib_show_welcome).toBool()); + + // Right Widgets + QGroupBox *gb_stylesheets = new QGroupBox(tr("Stylesheets"), this); + QVBoxLayout *vbox_stylesheets = new QVBoxLayout(); + QHBoxLayout *hbox_stylesheets = new QHBoxLayout(); + combo_stylesheets = new QComboBox(this); + QPushButton *pb_apply_stylesheet = new QPushButton(tr("Apply"), this); + + // Left layout + QVBoxLayout *vbox_left = new QVBoxLayout(); + + hbox_configs->addWidget(pb_apply_config); + vbox_configs->addWidget(combo_configs); + vbox_configs->addLayout(hbox_configs); + gb_configs->setLayout(vbox_configs); + + vbox_controls->addWidget(cb_show_welcome); + vbox_controls->addWidget(pb_reset_default); + vbox_controls->addWidget(pb_backup_config); + vbox_controls->addWidget(pb_open_folder); + gb_controls->setLayout(vbox_controls); + + vbox_left->addWidget(gb_configs); + vbox_left->addWidget(gb_controls); + vbox_left->addStretch(1); + + // Right layout + QVBoxLayout *vbox_right = new QVBoxLayout(); + hbox_stylesheets->addWidget(pb_apply_stylesheet); + vbox_stylesheets->addWidget(combo_stylesheets); + vbox_stylesheets->addLayout(hbox_stylesheets); + gb_stylesheets->setLayout(vbox_stylesheets); + vbox_right->addWidget(gb_stylesheets); + vbox_right->addStretch(1); + + // Main Layout + QHBoxLayout *hbox = new QHBoxLayout(); + hbox->addLayout(vbox_left); + hbox->addLayout(vbox_right); + setLayout(hbox); + + // Connections + connect(pb_reset_default, &QAbstractButton::clicked, this, &gui_tab::OnResetDefault); + connect(pb_backup_config, &QAbstractButton::clicked, this, &gui_tab::OnBackupCurrentConfig); + connect(pb_apply_config, &QAbstractButton::clicked, this, &gui_tab::OnApplyConfig); + connect(pb_apply_stylesheet, &QAbstractButton::clicked, this, &gui_tab::OnApplyStylesheet); + connect(pb_open_folder, &QAbstractButton::clicked, [=]() {QDesktopServices::openUrl(xgui_settings->GetSettingsDir()); }); + connect(cb_show_welcome, &QCheckBox::clicked, [=](bool val) {xSettings->SetValue(GUI::ib_show_welcome, val); }); + + AddConfigs(); + AddStylesheets(); +} + +void gui_tab::Accept() +{ + // Only attempt to load a config if changes occurred. + if (m_startingConfig != xgui_settings->GetValue(GUI::m_currentConfig).toString()) + { + OnApplyConfig(); + } + if (m_startingStylesheet != xgui_settings->GetValue(GUI::m_currentStylesheet).toString()) + { + OnApplyStylesheet(); + } +} + +void gui_tab::AddConfigs() +{ + combo_configs->clear(); + + combo_configs->addItem(tr("default")); + + for (QString entry : xgui_settings->GetConfigEntries()) + { + if (entry != tr("default")) + { + combo_configs->addItem(entry); + } + } + + QString currentSelection = tr("CurrentSettings"); + m_startingConfig = currentSelection; + + int index = combo_configs->findText(currentSelection); + if (index != -1) + { + combo_configs->setCurrentIndex(index); + } + else + { + LOG_WARNING(GENERAL, "Trying to set an invalid config index ", index); + } +} + +void gui_tab::AddStylesheets() +{ + combo_stylesheets->clear(); + + combo_stylesheets->addItem(tr("default")); + + for (QString entry : xgui_settings->GetStylesheetEntries()) + { + if (entry != tr("default")) + { + combo_stylesheets->addItem(entry); + } + } + + QString currentSelection = xgui_settings->GetValue(GUI::m_currentStylesheet).toString(); + m_startingStylesheet = currentSelection; + + int index = combo_stylesheets->findText(currentSelection); + if (index != -1) + { + combo_stylesheets->setCurrentIndex(index); + } + else + { + LOG_WARNING(GENERAL, "Trying to set an invalid stylesheets index ", index); + } +} + +void gui_tab::OnResetDefault() +{ + if (QMessageBox::question(this, tr("Reset GUI to default?"), tr("This will include your stylesheet as well. Do you wish to proceed?"), + QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) + { + xgui_settings->Reset(true); + xgui_settings->ChangeToConfig(tr("default")); + emit GuiStylesheetRequest(tr("default")); + emit GuiSettingsSyncRequest(); + AddConfigs(); + AddStylesheets(); + } +} + +void gui_tab::OnBackupCurrentConfig() +{ + QInputDialog* dialog = new QInputDialog(this); + dialog->setWindowTitle(tr("Choose a unique name")); + dialog->setLabelText(tr("Configuration Name: ")); + dialog->resize(500, 100); + + while (dialog->exec() != QDialog::Rejected) + { + dialog->resize(500, 100); + QString friendlyName = dialog->textValue(); + if (friendlyName == "") + { + QMessageBox::warning(this, tr("Error"), tr("Name cannot be empty")); + continue; + } + if (friendlyName.contains(".")) + { + QMessageBox::warning(this, tr("Error"), tr("Must choose a name with no '.'")); + continue; + } + if (combo_configs->findText(friendlyName) != -1) + { + QMessageBox::warning(this, tr("Error"), tr("Please choose a non-existing name")); + continue; + } + emit GuiSettingsSaveRequest(); + xgui_settings->SaveCurrentConfig(friendlyName); + combo_configs->addItem(friendlyName); + combo_configs->setCurrentIndex(combo_configs->findText(friendlyName)); + break; + } +} + +void gui_tab::OnApplyConfig() +{ + QString name = combo_configs->currentText(); + xgui_settings->SetValue(GUI::m_currentConfig, name); + xgui_settings->ChangeToConfig(name); + emit GuiSettingsSyncRequest(); +} + +void gui_tab::OnApplyStylesheet() +{ + xgui_settings->SetValue(GUI::m_currentStylesheet, combo_stylesheets->currentText()); + emit GuiStylesheetRequest(xgui_settings->GetCurrentStylesheetPath()); +} diff --git a/rpcs3/rpcs3qt/gui_tab.h b/rpcs3/rpcs3qt/gui_tab.h new file mode 100644 index 0000000000..879b7a59fe --- /dev/null +++ b/rpcs3/rpcs3qt/gui_tab.h @@ -0,0 +1,48 @@ +#ifndef GUITAB_H +#define GUITAB_H + +#include "gui_settings.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +class gui_tab : public QWidget +{ + Q_OBJECT + +public: + explicit gui_tab(std::shared_ptr guiSettings, QWidget *parent = 0); + +public slots: + void Accept(); +signals: + void GuiSettingsSyncRequest(); + void GuiSettingsSaveRequest(); + void GuiStylesheetRequest(const QString& path); +private slots: + void OnResetDefault(); + void OnBackupCurrentConfig(); + void OnApplyConfig(); + void OnApplyStylesheet(); +private: + void AddConfigs(); + void AddStylesheets(); + + QComboBox *combo_configs; + QComboBox *combo_stylesheets; + + QString m_startingStylesheet; + QString m_startingConfig; + + std::shared_ptr xgui_settings; +}; + +#endif // GUITAB_H diff --git a/rpcs3/rpcs3qt/inputtab.cpp b/rpcs3/rpcs3qt/input_tab.cpp similarity index 64% rename from rpcs3/rpcs3qt/inputtab.cpp rename to rpcs3/rpcs3qt/input_tab.cpp index 1a51b8c145..f75bad803b 100644 --- a/rpcs3/rpcs3qt/inputtab.cpp +++ b/rpcs3/rpcs3qt/input_tab.cpp @@ -1,23 +1,16 @@ -#ifdef QT_UI - #include #include #include #include -#include "inputtab.h" +#include "input_tab.h" -InputTab::InputTab(QWidget *parent) : QWidget(parent) +input_tab::input_tab(std::shared_ptr xemu_settings, QWidget *parent) : QWidget(parent) { // Pad Handler QGroupBox *padHandler = new QGroupBox(tr("Pad Handler")); - QComboBox *padHandlerBox = new QComboBox; - padHandlerBox->addItem(tr("Null")); - padHandlerBox->addItem(tr("Keyboard")); -#ifdef _MSC_VER - padHandlerBox->addItem(tr("XInput")); -#endif // _MSC_VER + QComboBox *padHandlerBox = xemu_settings->CreateEnhancedComboBox(emu_settings::PadHandler, this); QVBoxLayout *padHandlerVbox = new QVBoxLayout; padHandlerVbox->addWidget(padHandlerBox); @@ -26,9 +19,7 @@ InputTab::InputTab(QWidget *parent) : QWidget(parent) // Keyboard Handler QGroupBox *keyboardHandler = new QGroupBox(tr("Keyboard Handler")); - QComboBox *keyboardHandlerBox = new QComboBox; - keyboardHandlerBox->addItem(tr("Null")); - keyboardHandlerBox->addItem(tr("Basic")); + QComboBox *keyboardHandlerBox = xemu_settings->CreateEnhancedComboBox(emu_settings::KeyboardHandler, this); QVBoxLayout *keyboardHandlerVbox = new QVBoxLayout; keyboardHandlerVbox->addWidget(keyboardHandlerBox); @@ -37,9 +28,7 @@ InputTab::InputTab(QWidget *parent) : QWidget(parent) // Mouse Handler QGroupBox *mouseHandler = new QGroupBox(tr("Mouse Handler")); - QComboBox *mouseHandlerBox = new QComboBox; - mouseHandlerBox->addItem(tr("Null")); - mouseHandlerBox->addItem(tr("Basic")); + QComboBox *mouseHandlerBox = xemu_settings->CreateEnhancedComboBox(emu_settings::MouseHandler, this); QVBoxLayout *mouseHandlerVbox = new QVBoxLayout; mouseHandlerVbox->addWidget(mouseHandlerBox); @@ -48,9 +37,7 @@ InputTab::InputTab(QWidget *parent) : QWidget(parent) // Camera QGroupBox *camera = new QGroupBox(tr("Camera")); - QComboBox *cameraBox = new QComboBox; - cameraBox->addItem(tr("Null")); - cameraBox->addItem(tr("Fake")); + QComboBox *cameraBox = xemu_settings->CreateEnhancedComboBox(emu_settings::Camera, this); QVBoxLayout *cameraVbox = new QVBoxLayout; cameraVbox->addWidget(cameraBox); @@ -59,11 +46,7 @@ InputTab::InputTab(QWidget *parent) : QWidget(parent) // Camera type QGroupBox *cameraType = new QGroupBox(tr("Camera type")); - QComboBox *cameraTypeBox = new QComboBox; - cameraTypeBox->addItem(tr("Unknown")); - cameraTypeBox->addItem(tr("EyeToy")); - cameraTypeBox->addItem(tr("PS Eye")); - cameraTypeBox->addItem(tr("UVC 1.1")); + QComboBox *cameraTypeBox = xemu_settings->CreateEnhancedComboBox(emu_settings::CameraType, this); QVBoxLayout *cameraTypeVbox = new QVBoxLayout; cameraTypeVbox->addWidget(cameraTypeBox); @@ -87,4 +70,3 @@ InputTab::InputTab(QWidget *parent) : QWidget(parent) setLayout(hbox); } -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/input_tab.h b/rpcs3/rpcs3qt/input_tab.h new file mode 100644 index 0000000000..3b4f7b9d02 --- /dev/null +++ b/rpcs3/rpcs3qt/input_tab.h @@ -0,0 +1,22 @@ +#ifndef INPUTTAB_H +#define INPUTTAB_H + +#include "emu_settings.h" + +#include + +#include + +class input_tab : public QWidget +{ + Q_OBJECT + +public: + explicit input_tab(std::shared_ptr xemu_settings, QWidget *parent = 0); + +signals: + +public slots: +}; + +#endif // INPUTTAB_H diff --git a/rpcs3/rpcs3qt/inputtab.h b/rpcs3/rpcs3qt/inputtab.h deleted file mode 100644 index 0c400758c7..0000000000 --- a/rpcs3/rpcs3qt/inputtab.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef INPUTTAB_H -#define INPUTTAB_H - -#include - -class InputTab : public QWidget -{ - Q_OBJECT - -public: - explicit InputTab(QWidget *parent = 0); - -signals: - -public slots: -}; - -#endif // INPUTTAB_H diff --git a/rpcs3/rpcs3qt/instruction_editor_dialog.cpp b/rpcs3/rpcs3qt/instruction_editor_dialog.cpp new file mode 100644 index 0000000000..48e71e8d76 --- /dev/null +++ b/rpcs3/rpcs3qt/instruction_editor_dialog.cpp @@ -0,0 +1,103 @@ + +#include "instruction_editor_dialog.h" +#include + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } + +instruction_editor_dialog::instruction_editor_dialog(QWidget *parent, u32 _pc, const std::shared_ptr& _cpu, CPUDisAsm* _disasm) + : QDialog(parent) + , pc(_pc) + , cpu(_cpu) + , disasm(_disasm) +{ + setWindowTitle(tr("Edit instruction")); + setAttribute(Qt::WA_DeleteOnClose); + setMinimumSize(300, sizeHint().height()); + + const auto cpu = _cpu.get(); + cpu_offset = g_system == system_type::ps3 && cpu->id_type() != 1 ? static_cast(*cpu).offset : 0; + QString instruction = qstr(fmt::format("%08x", vm::ps3::read32(cpu_offset + pc).value())); + + QVBoxLayout* vbox_panel(new QVBoxLayout()); + QHBoxLayout* hbox_panel(new QHBoxLayout()); + QVBoxLayout* vbox_left_panel(new QVBoxLayout()); + QVBoxLayout* vbox_right_panel(new QVBoxLayout()); + QHBoxLayout* hbox_b_panel(new QHBoxLayout()); + + QPushButton* button_ok(new QPushButton(tr("Ok"))); + QPushButton* button_cancel(new QPushButton(tr("Cancel"))); + button_ok->setFixedWidth(80); + button_cancel->setFixedWidth(80); + + QLabel* t1_text = new QLabel(tr("Address: "), this); + QLabel* t2_text = new QLabel(tr("Instruction: "), this); + QLabel* t3_text = new QLabel(tr("Preview: "), this); + QLabel* t1_addr = new QLabel(qstr(fmt::format("%08x", pc)), this); + t2_instr = new QLineEdit(this); + t2_instr->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont)); + t2_instr->setPlaceholderText(instruction); + t2_instr->setText(instruction); + t2_instr->setMaxLength(8); + t2_instr->setMaximumWidth(65); + t3_preview = new QLabel("", this); + + // Layouts + vbox_left_panel->addWidget(t1_text); + vbox_left_panel->addWidget(t2_text); + vbox_left_panel->addWidget(t3_text); + + vbox_right_panel->addWidget(t1_addr); + vbox_right_panel->addWidget(t2_instr); + vbox_right_panel->addWidget(t3_preview); + vbox_right_panel->setAlignment(Qt::AlignLeft); + + hbox_b_panel->addWidget(button_ok); + hbox_b_panel->addWidget(button_cancel); + hbox_b_panel->setAlignment(Qt::AlignCenter); + + // Main Layout + hbox_panel->addLayout(vbox_left_panel); + hbox_panel->addSpacing(10); + hbox_panel->addLayout(vbox_right_panel); + vbox_panel->addLayout(hbox_panel); + vbox_panel->addSpacing(10); + vbox_panel->addLayout(hbox_b_panel); + setLayout(vbox_panel); + setModal(true); + + // Events + connect(button_ok, &QAbstractButton::pressed, [=]() { + bool ok; + ulong opcode = t2_instr->text().toULong(&ok, 16); + if (!ok) + QMessageBox::critical(this, tr("Error"), tr("This instruction could not be parsed.\nNo changes were made.")); + else + vm::ps3::write32(cpu_offset + pc, (u32)opcode); + accept(); + }); + connect(button_cancel, &QAbstractButton::pressed, this, &instruction_editor_dialog::reject); + connect(t2_instr, &QLineEdit::textChanged, this, &instruction_editor_dialog::updatePreview); + + updatePreview(); +} + +void instruction_editor_dialog::updatePreview() +{ + bool ok; + ulong opcode = t2_instr->text().toULong(&ok, 16); + if (ok) + { + if (g_system == system_type::psv) + { + t3_preview->setText(tr("Preview for ARMv7Thread not implemented yet.")); + } + else + { + t3_preview->setText(tr("Preview disabled.")); + } + } + else + { + t3_preview->setText(tr("Could not parse instruction.")); + } +} diff --git a/rpcs3/rpcs3qt/instruction_editor_dialog.h b/rpcs3/rpcs3qt/instruction_editor_dialog.h new file mode 100644 index 0000000000..2dd0ae8fc1 --- /dev/null +++ b/rpcs3/rpcs3qt/instruction_editor_dialog.h @@ -0,0 +1,37 @@ + +#ifndef INSTRUCTIONEDITOR_H +#define INSTRUCTIONEDITOR_H + +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/Memory/Memory.h" +#include "Emu/CPU/CPUThread.h" +#include "Emu/CPU/CPUDisAsm.h" +#include "Emu/Cell/PPUThread.h" +#include "Emu/Cell/SPUThread.h" + +#include +#include +#include +#include +#include +#include + +class instruction_editor_dialog : public QDialog +{ + u32 pc; + u32 cpu_offset; + CPUDisAsm* disasm; + QLineEdit* t2_instr; + QLabel* t3_preview; + +public: + std::weak_ptr cpu; + +public: + instruction_editor_dialog(QWidget *parent, u32 _pc, const std::shared_ptr& _cpu, CPUDisAsm* _disasm); + + void updatePreview(); +}; + +#endif // !INSTRUCTIONEDITOR_H diff --git a/rpcs3/rpcs3qt/kernel_explorer.cpp b/rpcs3/rpcs3qt/kernel_explorer.cpp new file mode 100644 index 0000000000..027a487929 --- /dev/null +++ b/rpcs3/rpcs3qt/kernel_explorer.cpp @@ -0,0 +1,314 @@ +#include "stdafx.h" +#include "Emu/Memory/Memory.h" +#include "Emu/System.h" + +#include "Emu/IdManager.h" +#include "Emu/Cell/PPUThread.h" +#include "Emu/Cell/SPUThread.h" +#include "Emu/Cell/RawSPUThread.h" +#include "Emu/Cell/lv2/sys_lwmutex.h" +#include "Emu/Cell/lv2/sys_lwcond.h" +#include "Emu/Cell/lv2/sys_mutex.h" +#include "Emu/Cell/lv2/sys_cond.h" +#include "Emu/Cell/lv2/sys_semaphore.h" +#include "Emu/Cell/lv2/sys_event.h" +#include "Emu/Cell/lv2/sys_event_flag.h" +#include "Emu/Cell/lv2/sys_rwlock.h" +#include "Emu/Cell/lv2/sys_prx.h" +#include "Emu/Cell/lv2/sys_memory.h" +#include "Emu/Cell/lv2/sys_mmapper.h" +#include "Emu/Cell/lv2/sys_spu.h" +#include "Emu/Cell/lv2/sys_interrupt.h" +#include "Emu/Cell/lv2/sys_timer.h" +#include "Emu/Cell/lv2/sys_process.h" +#include "Emu/Cell/lv2/sys_fs.h" + +#include "kernel_explorer.h" + +kernel_explorer::kernel_explorer(QWidget* parent) : QDialog(parent) +{ + setWindowTitle(tr("Kernel Explorer")); + setAttribute(Qt::WA_DeleteOnClose); + setMinimumSize(QSize(700, 450)); + QPalette pal; + pal.setColor(QPalette::Background, QColor(240, 240, 240)); + setPalette(pal); //This fix the ugly background color under Windows + + QVBoxLayout* vbox_panel = new QVBoxLayout(); + QHBoxLayout* hbox_buttons = new QHBoxLayout(); + QPushButton* button_refresh = new QPushButton(tr("Refresh"), this); + hbox_buttons->addWidget(button_refresh); + hbox_buttons->addStretch(); + + m_tree = new QTreeWidget(this); + m_tree->setBaseSize(QSize(600, 300)); + m_tree->setWindowTitle(tr("Kernel")); + m_tree->header()->close(); + + // Merge and display everything + vbox_panel->addSpacing(10); + vbox_panel->addLayout(hbox_buttons); + vbox_panel->addSpacing(10); + vbox_panel->addWidget(m_tree); + vbox_panel->addSpacing(10); + setLayout(vbox_panel); + + // Events + connect(button_refresh, &QAbstractButton::clicked, this, &kernel_explorer::Update); + + // Fill the wxTreeCtrl + Update(); +}; + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } + +void kernel_explorer::Update() +{ + m_tree->clear(); + + const auto vm_block = vm::get(vm::user_space); + + if (!vm_block) + { + return; + } + + const u32 total_memory_usage = vm_block->used(); + + QTreeWidgetItem* root = new QTreeWidgetItem(); + root->setText(0, qstr(fmt::format("Process, ID = 0x00000001, Total Memory Usage = 0x%x (%0.2f MB)", total_memory_usage, (float)total_memory_usage / (1024 * 1024)))); + m_tree->addTopLevelItem(root); + + union name64 + { + u64 u64_data; + char string[8]; + + name64(u64 data) + : u64_data(data & 0x00ffffffffffffffull) + { + } + + const char* operator+() const + { + return string; + } + }; + + // TODO: FileSystem + + struct lv2_obj_rec + { + QTreeWidgetItem* node; + u32 count{ 0 }; + + lv2_obj_rec() = default; + lv2_obj_rec(QTreeWidgetItem* node) + : node(node) + { + } + }; + + auto l_addTreeChild = [=](QTreeWidgetItem *parent, QString text) + { + QTreeWidgetItem *treeItem = new QTreeWidgetItem(); + treeItem->setText(0, text); + parent->addChild(treeItem); + return treeItem; + }; + + std::vector lv2_types(256); + lv2_types[SYS_MEM_OBJECT] = l_addTreeChild(root, "Memory"); + lv2_types[SYS_MUTEX_OBJECT] = l_addTreeChild(root, "Mutexes"); + lv2_types[SYS_COND_OBJECT] = l_addTreeChild(root, "Condition Variables"); + lv2_types[SYS_RWLOCK_OBJECT] = l_addTreeChild(root, "Reader Writer Locks"); + lv2_types[SYS_INTR_TAG_OBJECT] = l_addTreeChild(root, "Interrupt Tags"); + lv2_types[SYS_INTR_SERVICE_HANDLE_OBJECT] = l_addTreeChild(root, "Interrupt Service Handles"); + lv2_types[SYS_EVENT_QUEUE_OBJECT] = l_addTreeChild(root, "Event Queues"); + lv2_types[SYS_EVENT_PORT_OBJECT] = l_addTreeChild(root, "Event Ports"); + lv2_types[SYS_TRACE_OBJECT] = l_addTreeChild(root, "Traces"); + lv2_types[SYS_SPUIMAGE_OBJECT] = l_addTreeChild(root, "SPU Images"); + lv2_types[SYS_PRX_OBJECT] = l_addTreeChild(root, "Modules"); + lv2_types[SYS_SPUPORT_OBJECT] = l_addTreeChild(root, "SPU Ports"); + lv2_types[SYS_LWMUTEX_OBJECT] = l_addTreeChild(root, "Light Weight Mutexes"); + lv2_types[SYS_TIMER_OBJECT] = l_addTreeChild(root, "Timers"); + lv2_types[SYS_SEMAPHORE_OBJECT] = l_addTreeChild(root, "Semaphores"); + lv2_types[SYS_LWCOND_OBJECT] = l_addTreeChild(root, "Light Weight Condition Variables"); + lv2_types[SYS_EVENT_FLAG_OBJECT] = l_addTreeChild(root, "Event Flags"); + + idm::select([&](u32 id, lv2_obj& obj) + { + lv2_types[id >> 24].count++; + + if (auto& node = lv2_types[id >> 24].node) switch (id >> 24) + { + case SYS_MEM_OBJECT: + { + auto& mem = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("Memory: ID = 0x%08x", id))); + break; + } + case SYS_MUTEX_OBJECT: + { + auto& mutex = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("Mutex: ID = 0x%08x \"%s\",%s Owner = 0x%x, Locks = %u, Conds = %u, Wq = %zu", id, +name64(mutex.name), + mutex.recursive == SYS_SYNC_RECURSIVE ? " Recursive," : "", mutex.owner >> 1, +mutex.lock_count, +mutex.cond_count, mutex.sq.size()))); + break; + } + case SYS_COND_OBJECT: + { + auto& cond = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("Cond: ID = 0x%08x \"%s\", Waiters = %u", id, +name64(cond.name), +cond.waiters))); + break; + } + case SYS_RWLOCK_OBJECT: + { + auto& rw = static_cast(obj); + const s64 val = rw.owner; + l_addTreeChild(node, qstr(fmt::format("RW Lock: ID = 0x%08x \"%s\", Owner = 0x%x(%d), Rq = %zu, Wq = %zu", id, +name64(rw.name), + std::max(0, val >> 1), -std::min(0, val >> 1), rw.rq.size(), rw.wq.size()))); + break; + } + case SYS_INTR_TAG_OBJECT: + { + auto& tag = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("Intr Tag: ID = 0x%08x", id))); + break; + } + case SYS_INTR_SERVICE_HANDLE_OBJECT: + { + auto& serv = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("Intr Svc: ID = 0x%08x", id))); + break; + } + case SYS_EVENT_QUEUE_OBJECT: + { + auto& eq = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("Event Queue: ID = 0x%08x \"%s\", %s, Key = %#llx, Events = %zu/%d, Waiters = %zu", id, +name64(eq.name), + eq.type == SYS_SPU_QUEUE ? "SPU" : "PPU", eq.key, eq.events.size(), eq.size, eq.sq.size()))); + break; + } + case SYS_EVENT_PORT_OBJECT: + { + auto& ep = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("Event Port: ID = 0x%08x, Name = %#llx", id, ep.name))); + break; + } + case SYS_TRACE_OBJECT: + { + l_addTreeChild(node, qstr(fmt::format("Trace: ID = 0x%08x", id))); + break; + } + case SYS_SPUIMAGE_OBJECT: + { + l_addTreeChild(node, qstr(fmt::format("SPU Image: ID = 0x%08x", id))); + break; + } + case SYS_PRX_OBJECT: + { + auto& prx = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("PRX: ID = 0x%08x '%s'", id, prx.name))); + break; + } + case SYS_SPUPORT_OBJECT: + { + l_addTreeChild(node, qstr(fmt::format("SPU Port: ID = 0x%08x", id))); + break; + } + case SYS_LWMUTEX_OBJECT: + { + auto& lwm = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("LWMutex: ID = 0x%08x \"%s\", Wq = %zu", id, +name64(lwm.name), lwm.sq.size()))); + break; + } + case SYS_TIMER_OBJECT: + { + auto& timer = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("Timer: ID = 0x%08x", id))); + break; + } + case SYS_SEMAPHORE_OBJECT: + { + auto& sema = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("Semaphore: ID = 0x%08x \"%s\", Count = %d, Max Count = %d, Waiters = %#zu", id, +name64(sema.name), + sema.val.load(), sema.max, sema.sq.size()))); + break; + } + case SYS_LWCOND_OBJECT: + { + auto& lwc = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("LWCond: ID = 0x%08x \"%s\", Waiters = %zu", id, +name64(lwc.name), +lwc.waiters))); + break; + } + case SYS_EVENT_FLAG_OBJECT: + { + auto& ef = static_cast(obj); + l_addTreeChild(node, qstr(fmt::format("Event Flag: ID = 0x%08x \"%s\", Type = 0x%x, Pattern = 0x%llx, Wq = %zu", id, +name64(ef.name), + ef.type, ef.pattern.load(), +ef.waiters))); + break; + } + default: + { + l_addTreeChild(node, qstr(fmt::format("Unknown object: ID = 0x%08x", id))); + } + } + }); + + lv2_types.emplace_back(l_addTreeChild(root, "Memory Containers")); + + idm::select([&](u32 id, lv2_memory_container&) + { + lv2_types.back().count++; + l_addTreeChild(lv2_types.back().node, qstr(fmt::format("Memory Container: ID = 0x%08x", id))); + }); + + lv2_types.emplace_back(l_addTreeChild(root, "PPU Threads")); + + idm::select([&](u32 id, ppu_thread& ppu) + { + lv2_types.back().count++; + l_addTreeChild(lv2_types.back().node, qstr(fmt::format("PPU Thread: ID = 0x%08x '%s'", id, ppu.get_name()))); + }); + + lv2_types.emplace_back(l_addTreeChild(root, "SPU Threads")); + + idm::select([&](u32 id, SPUThread& spu) + { + lv2_types.back().count++; + l_addTreeChild(lv2_types.back().node, qstr(fmt::format("SPU Thread: ID = 0x%08x '%s'", id, spu.get_name()))); + }); + + lv2_types.emplace_back(l_addTreeChild(root, "SPU Thread Groups")); + + idm::select([&](u32 id, lv2_spu_group& tg) + { + lv2_types.back().count++; + l_addTreeChild(lv2_types.back().node, qstr(fmt::format("SPU Thread Group: ID = 0x%08x '%s'", id, tg.name))); + }); + + lv2_types.emplace_back(l_addTreeChild(root, "File Descriptors")); + + idm::select([&](u32 id, lv2_fs_object& fo) + { + lv2_types.back().count++; + l_addTreeChild(lv2_types.back().node, qstr(fmt::format("FD: ID = 0x%08x '%s'", id, fo.name.data()))); + }); + + for (auto&& entry : lv2_types) + { + if (entry.node && entry.count) + { + // Append object count + entry.node->setText(0, entry.node->text(0) + qstr(fmt::format(" (%zu)", entry.count))); + } + else if (entry.node) + { + // Delete node otherwise + delete entry.node; + } + } + + // RawSPU Threads (TODO) + + root->setExpanded(true); +} diff --git a/rpcs3/rpcs3qt/kernel_explorer.h b/rpcs3/rpcs3qt/kernel_explorer.h new file mode 100644 index 0000000000..4d9861259a --- /dev/null +++ b/rpcs3/rpcs3qt/kernel_explorer.h @@ -0,0 +1,22 @@ +#ifndef KERNELEXPLORER_H +#define KERNELEXPLORER_H + +#include +#include +#include +#include +#include + +class kernel_explorer : public QDialog +{ + Q_OBJECT + + QTreeWidget* m_tree; + +public: + kernel_explorer(QWidget* parent); +private slots: + void Update(); +}; + +#endif // KERNELEXPLORER_H diff --git a/rpcs3/rpcs3qt/log_frame.cpp b/rpcs3/rpcs3qt/log_frame.cpp new file mode 100644 index 0000000000..c01fbfa6bc --- /dev/null +++ b/rpcs3/rpcs3qt/log_frame.cpp @@ -0,0 +1,345 @@ +#include "log_frame.h" + +#include +#include "rpcs3_version.h" + +#include +#include + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } + +struct gui_listener : logs::listener +{ + atomic_t enabled{}; + + struct packet + { + atomic_t next{}; + + logs::level sev{}; + std::string msg; + + ~packet() + { + for (auto ptr = next.raw(); UNLIKELY(ptr);) + { + delete std::exchange(ptr, std::exchange(ptr->next.raw(), nullptr)); + } + } + }; + + atomic_t last; // Packet for writing another packet + atomic_t read; // Packet for reading + + gui_listener() + : logs::listener() + { + // Initialize packets + read = new packet; + last = new packet; + read->next = last.load(); + last->msg = fmt::format("RPCS3 v%s\n", rpcs3::version.to_string()); + + // Self-registration + logs::listener::add(this); + } + + ~gui_listener() + { + delete read; + } + + void log(u64 stamp, const logs::message& msg, const std::string& prefix, const std::string& text) + { + Q_UNUSED(stamp); + + if (msg.sev <= enabled) + { + const auto _new = new packet; + _new->sev = msg.sev; + + if (prefix.size() > 0) + { + _new->msg += "{"; + _new->msg += prefix; + _new->msg += "} "; + } + + if (msg.ch->name) + { + _new->msg += msg.ch->name; + _new->msg += msg.sev == logs::level::todo ? " TODO: " : ": "; + } + else if (msg.sev == logs::level::todo) + { + _new->msg += "TODO: "; + } + + _new->msg += text; + _new->msg += '\n'; + + last.exchange(_new)->next = _new; + } + } + + void pop() + { + if (const auto head = read->next.exchange(nullptr)) + { + delete read.exchange(head); + } + } + + void clear() + { + while (read->next) + { + pop(); + } + } +}; + +// GUI Listener instance +static gui_listener s_gui_listener; + +log_frame::log_frame(std::shared_ptr guiSettings, QWidget *parent) : QDockWidget(tr("Log"), parent), xgui_settings(guiSettings) +{ + tabWidget = new QTabWidget; + + log = new QTextEdit(tabWidget); + QPalette logPalette = log->palette(); + logPalette.setColor(QPalette::Base, Qt::black); + log->setPalette(logPalette); + log->setReadOnly(true); + + tty = new QTextEdit(tabWidget); + QPalette ttyPalette = log->palette(); + ttyPalette.setColor(QPalette::Base, Qt::black); + ttyPalette.setColor(QPalette::Text, Qt::white); + tty->setPalette(ttyPalette); + tty->setReadOnly(true); + + tabWidget->addTab(log, tr("Log")); + tabWidget->addTab(tty, tr("TTY")); + + setWidget(tabWidget); + + // Open or create TTY.log + tty_file.open(fs::get_config_dir() + "TTY.log", fs::read + fs::create); + + CreateAndConnectActions(); + log->setContextMenuPolicy(Qt::CustomContextMenu); + connect(log, &QWidget::customContextMenuRequested, [=](const QPoint& pos){ + QMenu* menu = log->createStandardContextMenu(); + menu->addAction(clearAct); + menu->addSeparator(); + menu->addActions({ nothingAct, fatalAct, errorAct, todoAct, successAct, warningAct, noticeAct, traceAct }); + menu->addSeparator(); + menu->addAction(TTYAct); + menu->exec(mapToGlobal(pos)); + }); + + // Check for updates every ~10 ms + QTimer *timer = new QTimer(this); + connect(timer, &QTimer::timeout, this, &log_frame::UpdateUI); + timer->start(10); +} + +void log_frame::SetLogLevel(logs::level lev) +{ + switch (lev) + { + case logs::level::always: + { + nothingAct->trigger(); + break; + } + case logs::level::fatal: + { + fatalAct->trigger(); + break; + } + case logs::level::error: + { + errorAct->trigger(); + break; + } + case logs::level::todo: + { + todoAct->trigger(); + break; + } + case logs::level::success: + { + successAct->trigger(); + break; + } + case logs::level::warning: + { + warningAct->trigger(); + break; + } + case logs::level::notice: + { + noticeAct->trigger(); + break; + } + case logs::level::trace: + { + traceAct->trigger(); + break; + } + default: + warningAct->trigger(); + } +} + +void log_frame::SetTTYLogging(bool val) +{ + TTYAct->setChecked(val); +} + +void log_frame::CreateAndConnectActions() +{ + // I, for one, welcome our lambda overlord + // It's either this or a signal mapper + // Then, probably making a list of these actions so that it's easier to iterate to generate the mapper. + auto l_initAct = [this](QAction* act, logs::level logLevel) + { + act->setCheckable(true); + + // This sets the log level properly when the action is triggered. + auto l_callback = [this, logLevel]() { + s_gui_listener.enabled = logLevel; + xgui_settings->SetValue(GUI::l_level, static_cast(logLevel)); + }; + + connect(act, &QAction::triggered, l_callback); + }; + + clearAct = new QAction(tr("Clear"), this); + connect(clearAct, &QAction::triggered, log, &QTextEdit::clear); + + // Action groups make these actions mutually exclusive. + logLevels = new QActionGroup(this); + nothingAct = new QAction(tr("Nothing"), logLevels); + fatalAct = new QAction(tr("Fatal"), logLevels); + errorAct = new QAction(tr("Error"), logLevels); + todoAct = new QAction(tr("Todo"), logLevels); + successAct = new QAction(tr("Success"), logLevels); + warningAct = new QAction(tr("Warning"), logLevels); + noticeAct = new QAction(tr("Notice"), logLevels); + traceAct = new QAction(tr("Trace"), logLevels); + + TTYAct = new QAction(tr("TTY"), this); + TTYAct->setCheckable(true); + connect(TTYAct, &QAction::triggered, xgui_settings.get(), [=](bool checked){ + xgui_settings->SetValue(GUI::l_tty, checked); + }); + + l_initAct(nothingAct, logs::level::always); + l_initAct(fatalAct, logs::level::fatal); + l_initAct(errorAct, logs::level::error); + l_initAct(todoAct, logs::level::todo); + l_initAct(successAct, logs::level::success); + l_initAct(warningAct, logs::level::warning); + l_initAct(noticeAct, logs::level::notice); + l_initAct(traceAct, logs::level::trace); + + LoadSettings(); +} + +void log_frame::LoadSettings() +{ + SetLogLevel(xgui_settings->GetLogLevel()); + SetTTYLogging(xgui_settings->GetValue(GUI::l_tty).toBool()); +} + +void log_frame::UpdateUI() +{ + std::vector buf(4096); + + // Get UTF-8 string from file + auto get_utf8 = [&](const fs::file& file, u64 size) -> QString + { + size = file.read(buf.data(), size); + + for (u64 i = 0; i < size; i++) + { + // Get UTF-8 sequence length (no real validation performed) + const u64 tail = + (buf[i] & 0xF0) == 0xF0 ? 3 : + (buf[i] & 0xE0) == 0xE0 ? 2 : + (buf[i] & 0xC0) == 0xC0 ? 1 : 0; + + if (i + tail >= size) + { // Copying is expensive-- O(i)-- but I suspect this corruption will be exceptionally unlikely. + file.seek(i - size, fs::seek_cur); + std::vector sub(&buf[0], &buf[i]); + return QString(sub.data()); + } + } + return QString(buf.data()); + }; + + const auto start = steady_clock::now(); + + // Check TTY logs + + while (const u64 size = std::min(buf.size(), tty_file.size() - tty_file.pos())) + { + QString text = get_utf8(tty_file, size); + + // Hackily used the state of the check.. be better if I actually stored this value. + if (TTYAct->isChecked()) + { + text.chop(1); // remove newline since Qt automatically adds a newline. + tty->append(text); + } + // Limit processing time + if (steady_clock::now() >= start + 4ms || text.isEmpty()) break; + } + + // Check main logs + while (const auto packet = s_gui_listener.read->next.load()) + { + // Confirm log level + if (packet->sev <= s_gui_listener.enabled) + { + // Get text color + QColor color; + QString text; + switch (packet->sev) + { + case logs::level::always: color = QColor(0x00, 0xFF, 0xFF); break; // Cyan + case logs::level::fatal: text = "F "; color = QColor(0xFF, 0x00, 0xFF); break; // Fuchsia + case logs::level::error: text = "E "; color = QColor(0xFF, 0x00, 0x00); break; // Red + case logs::level::todo: text = "U "; color = QColor(0xFF, 0x60, 0x00); break; // Orange + case logs::level::success: text = "S "; color = QColor(0x00, 0xFF, 0x00); break; // Green + case logs::level::warning: text = "W "; color = QColor(0xFF, 0xFF, 0x00); break; // Yellow + case logs::level::notice: text = "! "; color = QColor(0xFF, 0xFF, 0xFF); break; // White + case logs::level::trace: text = "T "; color = QColor(0x80, 0x80, 0x80); break; // Gray + default: continue; + } + + // Print UTF-8 text. + text += qstr(packet->msg); + log->setTextColor(color); + // remove the new line because Qt's append adds a new line already. + text.chop(1); + log->append(text); + } + + // Drop packet + s_gui_listener.pop(); + + // Limit processing time + if (steady_clock::now() >= start + 7ms) break; + } +} + +void log_frame::closeEvent(QCloseEvent *event) +{ + QDockWidget::closeEvent(event); + emit log_frameClosed(); +} diff --git a/rpcs3/rpcs3qt/log_frame.h b/rpcs3/rpcs3qt/log_frame.h new file mode 100644 index 0000000000..049185c542 --- /dev/null +++ b/rpcs3/rpcs3qt/log_frame.h @@ -0,0 +1,62 @@ +#ifndef LOGFRAME_H +#define LOGFRAME_H + +#include "Utilities/File.h" +#include "Utilities/Log.h" + +#include "gui_settings.h" + +#include + +#include +#include +#include +#include +#include + +class log_frame : public QDockWidget +{ + Q_OBJECT + +public: + explicit log_frame(std::shared_ptr guiSettings, QWidget *parent = nullptr); + + /** Loads from settings. Public so that main_window can call this easily. */ + void LoadSettings(); +signals: + void log_frameClosed(); +protected: + /** Override inherited method from Qt to allow signalling when close happened.*/ + void closeEvent(QCloseEvent* event); +private slots: + void UpdateUI(); +private: + void SetLogLevel(logs::level lev); + void SetTTYLogging(bool val); + + void CreateAndConnectActions(); + + QTabWidget *tabWidget; + QTextEdit *log; + QTextEdit *tty; + + fs::file tty_file; + + QAction* clearAct; + + QActionGroup* logLevels; + QAction* nothingAct; + QAction* fatalAct; + QAction* errorAct; + QAction* todoAct; + QAction* successAct; + QAction* warningAct; + QAction* noticeAct; + QAction* traceAct; + + QAction* TTYAct; + + std::shared_ptr xgui_settings; +}; + +#endif // LOGFRAME_H diff --git a/rpcs3/rpcs3qt/logframe.cpp b/rpcs3/rpcs3qt/logframe.cpp deleted file mode 100644 index 79f7fb7a54..0000000000 --- a/rpcs3/rpcs3qt/logframe.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#ifdef QT_UI - -#include "logframe.h" - -LogFrame::LogFrame(QWidget *parent) : QDockWidget(tr("Log"), parent) -{ - tabWidget = new QTabWidget; - - log = new QTextEdit(tabWidget); - QPalette logPalette = log->palette(); - logPalette.setColor(QPalette::Base, Qt::black); - log->setPalette(logPalette); - log->setReadOnly(true); - - tty = new QTextEdit(tabWidget); - QPalette ttyPalette = log->palette(); - ttyPalette.setColor(QPalette::Base, Qt::black); - ttyPalette.setColor(QPalette::Text, Qt::white); - tty->setPalette(ttyPalette); - tty->setReadOnly(true); - - tabWidget->addTab(log, tr("Log")); - tabWidget->addTab(tty, tr("TTY")); - - setWidget(tabWidget); - - // Check for updates every ~10 ms - QTimer *timer = new QTimer(this); - connect(timer, &QTimer::timeout, this, &LogFrame::Update); - timer->start(10); -} - -void LogFrame::Update() -{ - -} - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/logframe.h b/rpcs3/rpcs3qt/logframe.h deleted file mode 100644 index fc40814727..0000000000 --- a/rpcs3/rpcs3qt/logframe.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef LOGFRAME_H -#define LOGFRAME_H - -#include -#include -#include -#include - -class LogFrame : public QDockWidget -{ - Q_OBJECT - -public: - explicit LogFrame(QWidget *parent = 0); - -private slots: - void Update(); - -private: - QTabWidget *tabWidget; - QTextEdit *log; - QTextEdit *tty; -}; - -#endif // LOGFRAME_H diff --git a/rpcs3/rpcs3qt/main.cpp b/rpcs3/rpcs3qt/main.cpp deleted file mode 100644 index 831afd2265..0000000000 --- a/rpcs3/rpcs3qt/main.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// Qt5.2+ frontend implementation for rpcs3. Known to work on Windows, Linux, Mac -// by Sacha Refshauge -#ifdef QT_UI - -#include - -#include "mainwindow.h" - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - MainWindow mainWin; - mainWin.show(); - - return app.exec(); -} - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp new file mode 100644 index 0000000000..792d5da31a --- /dev/null +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -0,0 +1,1196 @@ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "save_data_utility.h" +#include "kernel_explorer.h" +#include "game_list_frame.h" +#include "debugger_frame.h" +#include "log_frame.h" +#include "settings_dialog.h" +#include "pad_settings_dialog.h" +#include "auto_pause_settings_dialog.h" +#include "cg_disasm_window.h" +#include "memory_string_searcher.h" +#include "memory_viewer_panel.h" +#include "rsx_debugger.h" +#include "main_window.h" +#include "emu_settings.h" + +#include + +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/Memory/Memory.h" + +#include "Crypto/unpkg.h" +#include "Crypto/unself.h" + +#include "Loader/PUP.h" +#include "Loader/TAR.h" + +#include "Utilities/Thread.h" +#include "Utilities/StrUtil.h" + +#include "rpcs3_version.h" + +inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); } + +main_window::main_window(QWidget *parent) : QMainWindow(parent), m_sys_menu_opened(false) +{ + guiSettings.reset(new gui_settings()); + + setDockNestingEnabled(true); + + // Get Render Adapters + m_Render_Creator = Render_Creator(); + + //Load Icons: This needs to happen before any actions or buttons are created + icon_play = QIcon(":/Icons/play.png"); + icon_pause = QIcon(":/Icons/pause.png"); + icon_stop = QIcon(":/Icons/stop.png"); + icon_restart = QIcon(":/Icons/restart.png"); + appIcon = QIcon(":/rpcs3.ico"); + + CreateActions(); + CreateMenus(); + CreateDockWindows(); + + setMinimumSize(350, minimumSizeHint().height()); // seems fine on win 10 + + ConfigureGuiFromSettings(true); + CreateConnects(); + + setWindowTitle(QString::fromStdString("RPCS3 v" + rpcs3::version.to_string())); + !appIcon.isNull() ? setWindowIcon(appIcon) : LOG_WARNING(GENERAL, "AppImage could not be loaded!"); + + QTimer::singleShot(1, [=]() { + // Need to have this happen fast, but not now because connects aren't created yet. + // So, a tricky balance in terms of time but this works. + emit RequestGlobalStylesheetChange(guiSettings->GetCurrentStylesheetPath()); + }); +} + +main_window::~main_window() +{ +} + +auto Pause = []() +{ + if (Emu.IsReady()) Emu.Run(); + else if (Emu.IsPaused()) Emu.Resume(); + else if (Emu.IsRunning()) Emu.Pause(); + else if (!Emu.GetPath().empty()) Emu.Load(); +}; + +void main_window::CreateThumbnailToolbar() +{ +#ifdef _WIN32 + thumb_bar = new QWinThumbnailToolBar(this); + thumb_bar->setWindow(windowHandle()); + + thumb_playPause = new QWinThumbnailToolButton(thumb_bar); + thumb_playPause->setToolTip(tr("Start")); + thumb_playPause->setIcon(icon_play); + thumb_playPause->setEnabled(false); + + thumb_stop = new QWinThumbnailToolButton(thumb_bar); + thumb_stop->setToolTip(tr("Stop")); + thumb_stop->setIcon(icon_stop); + thumb_stop->setEnabled(false); + + thumb_restart = new QWinThumbnailToolButton(thumb_bar); + thumb_restart->setToolTip(tr("Restart")); + thumb_restart->setIcon(icon_restart); + thumb_restart->setEnabled(false); + + thumb_bar->addButton(thumb_playPause); + thumb_bar->addButton(thumb_stop); + thumb_bar->addButton(thumb_restart); + + connect(thumb_stop, &QWinThumbnailToolButton::clicked, [=]() { Emu.Stop(); }); + connect(thumb_restart, &QWinThumbnailToolButton::clicked, [=]() { Emu.Stop(); Emu.Load(); }); + connect(thumb_playPause, &QWinThumbnailToolButton::clicked, Pause); +#endif +} + +// returns appIcon +QIcon main_window::GetAppIcon() +{ + return appIcon; +} + +// loads the appIcon from path and embeds it centered into an empty square icon +void main_window::SetAppIconFromPath(const std::string path) +{ + // get Icon for the gs_frame from path. this handles presumably all possible use cases + QString qpath = QString::fromUtf8(path.data(), path.size()); + std::string icon_list[] = { "/ICON0.PNG", "/PS3_GAME/ICON0.PNG" }; + std::string path_list[] = { path, sstr(qpath.section("/", 0, -2)) ,sstr(qpath.section("/", 0, -3)) }; + for (std::string pth : path_list) + { + for (std::string ico : icon_list) + { + ico = pth + ico; + if (fs::is_file(ico)) + { + // load the image from path. It will most likely be a rectangle + QImage source = QImage(QString::fromUtf8(ico.data(), ico.size())); + int edgeMax = std::max(source.width(), source.height()); + + // create a new transparent image with square size and same format as source (maybe handle other formats than RGB32 as well?) + QImage::Format format = source.format() == QImage::Format_RGB32 ? QImage::Format_ARGB32 : source.format(); + QImage dest = QImage(edgeMax, edgeMax, format); + dest.fill(QColor("transparent")); + + // get the location to draw the source image centered within the dest image. + QPoint destPos = source.width() > source.height() ? QPoint(0, (source.width() - source.height()) / 2) + : QPoint((source.height() - source.width()) / 2, 0); + + // Paint the source into/over the dest + QPainter painter(&dest); + painter.drawImage(destPos, source); + painter.end(); + + // set Icon + appIcon = QIcon(QPixmap::fromImage(dest)); + return; + } + } + } + // if nothing was found reset the icon to default + appIcon = QIcon(":/rpcs3.ico"); +} + +void main_window::BootElf() +{ + bool stopped = false; + + if (Emu.IsRunning()) + { + Emu.Pause(); + stopped = true; + } + + QString path_last_ELF = guiSettings->GetValue(GUI::fd_boot_elf).toString(); + QString filePath = QFileDialog::getOpenFileName(this, tr("Select (S)ELF To Boot"), path_last_ELF, tr( + "(S)ELF files (*BOOT.BIN *.elf *.self);;" + "ELF files (BOOT.BIN *.elf);;" + "SELF files (EBOOT.BIN *.self);;" + "BOOT files (*BOOT.BIN);;" + "BIN files (*.bin);;" + "All files (*.*)"), + Q_NULLPTR, QFileDialog::DontResolveSymlinks); + + if (filePath == NULL) + { + if (stopped) Emu.Resume(); + return; + } + + LOG_NOTICE(LOADER, "(S)ELF: booting..."); + + // If we resolved the filepath earlier we would end up setting the last opened dir to the unwanted + // game folder in case of having e.g. a Game Folder with collected links to elf files. + // Don't set last path earlier in case of cancelled dialog + guiSettings->SetValue(GUI::fd_boot_elf, filePath); + const std::string path = sstr(QFileInfo(filePath).canonicalFilePath()); + + SetAppIconFromPath(path); + Emu.Stop(); + Emu.SetPath(path); + Emu.Load(); + + if (Emu.IsReady()) LOG_SUCCESS(LOADER, "(S)ELF: boot done."); +} + +void main_window::BootGame() +{ + bool stopped = false; + + if (Emu.IsRunning()) + { + Emu.Pause(); + stopped = true; + } + + QString path_last_Game = guiSettings->GetValue(GUI::fd_boot_game).toString(); + QString dirPath = QFileDialog::getExistingDirectory(this, tr("Select Game Folder"), path_last_Game, QFileDialog::ShowDirsOnly); + + if (dirPath == NULL) + { + if (stopped) Emu.Resume(); + return; + } + Emu.Stop(); + guiSettings->SetValue(GUI::fd_boot_game, QFileInfo(dirPath).path()); + const std::string path = sstr(dirPath); + SetAppIconFromPath(path); + + if (!Emu.BootGame(path)) + { + LOG_ERROR(GENERAL, "PS3 executable not found in selected folder (%s)", path); + } +} + +void main_window::InstallPkg() +{ + QString path_last_PKG = guiSettings->GetValue(GUI::fd_install_pkg).toString(); + QString filePath = QFileDialog::getOpenFileName(this, tr("Select PKG To Install"), path_last_PKG, tr("PKG files (*.pkg);;All files (*.*)")); + + if (filePath == NULL) + { + return; + } + Emu.Stop(); + + guiSettings->SetValue(GUI::fd_install_pkg, QFileInfo(filePath).path()); + const std::string fileName = sstr(QFileInfo(filePath).fileName()); + const std::string path = sstr(filePath); + + // Open PKG file + fs::file pkg_f(path); + + if (!pkg_f || pkg_f.size() < 64) + { + LOG_ERROR(LOADER, "PKG: Failed to open %s", path); + return; + } + + // Get title ID + std::vector title_id(9); + pkg_f.seek(55); + pkg_f.read(title_id); + pkg_f.seek(0); + + // Get full path + const auto& local_path = Emu.GetGameDir() + std::string(std::begin(title_id), std::end(title_id)); + + if (!fs::create_dir(local_path)) + { + if (fs::is_dir(local_path)) + { + if (QMessageBox::question(this, tr("PKG Decrypter / Installer"), tr("Another installation found. Do you want to overwrite it?"), + QMessageBox::Yes | QMessageBox::No, QMessageBox::No) != QMessageBox::Yes) + { + LOG_ERROR(LOADER, "PKG: Cancelled installation to existing directory %s", local_path); + return; + } + } + else + { + LOG_ERROR(LOADER, "PKG: Could not create the installation directory %s", local_path); + return; + } + } + + QProgressDialog pdlg(tr("Installing package ... please wait ..."), tr("Cancel"), 0, 1000, this); + + pdlg.setWindowTitle(tr("RPCS3 Package Installer")); + pdlg.setWindowModality(Qt::WindowModal); + pdlg.setFixedSize(500, pdlg.height()); + pdlg.show(); + +#ifdef _WIN32 + QWinTaskbarButton *taskbar_button = new QWinTaskbarButton(); + taskbar_button->setWindow(windowHandle()); + QWinTaskbarProgress *taskbar_progress = taskbar_button->progress(); + taskbar_progress->setRange(0, 1000); + taskbar_progress->setVisible(true); + +#endif + + // Synchronization variable + atomic_t progress(0.); + { + // Run PKG unpacking asynchronously + scope_thread worker("PKG Installer", [&] + { + if (pkg_install(pkg_f, local_path + '/', progress)) + { + progress = 1.; + return; + } + + // TODO: Ask user to delete files on cancellation/failure? + progress = -1.; + }); + // Wait for the completion + while (std::this_thread::sleep_for(5ms), std::abs(progress) < 1.) + { + if (pdlg.wasCanceled()) + { + progress -= 1.; +#ifdef _WIN32 + taskbar_progress->hide(); + taskbar_button->~QWinTaskbarButton(); +#endif + if (QMessageBox::question(this, tr("PKG Decrypter / Installer"), tr("Remove incomplete folder?"), + QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) + { + fs::remove_all(local_path); + gameListFrame->Refresh(); + LOG_SUCCESS(LOADER, "PKG: removed incomplete installation in %s", local_path); + return; + } + break; + } + // Update progress window + pdlg.setValue(static_cast(progress * pdlg.maximum())); +#ifdef _WIN32 + taskbar_progress->setValue(static_cast(progress * taskbar_progress->maximum())); +#endif + QCoreApplication::processEvents(); + } + + if (progress > 0.) + { + pdlg.setValue(pdlg.maximum()); +#ifdef _WIN32 + taskbar_progress->setValue(taskbar_progress->maximum()); +#endif + std::this_thread::sleep_for(100ms); + } + } + + if (progress >= 1.) + { + gameListFrame->Refresh(); + LOG_SUCCESS(GENERAL, "Successfully installed %s.", fileName); + guiSettings->ShowInfoBox(GUI::ib_pkg_success, tr("Success!"), tr("Successfully installed software from package!"), this); + +#ifdef _WIN32 + taskbar_progress->hide(); + taskbar_button->~QWinTaskbarButton(); +#endif + } +} + +void main_window::InstallPup() +{ + QString path_last_PUP = guiSettings->GetValue(GUI::fd_install_pup).toString(); + QString filePath = QFileDialog::getOpenFileName(this, tr("Select PS3UPDAT.PUP To Install"), path_last_PUP, tr("PS3 update file (PS3UPDAT.PUP)")); + + if (filePath == NULL) + { + return; + } + + Emu.Stop(); + + guiSettings->SetValue(GUI::fd_install_pup, QFileInfo(filePath).path()); + const std::string path = sstr(filePath); + + fs::file pup_f(path); + pup_object pup(pup_f); + if (!pup) + { + LOG_ERROR(GENERAL, "Error while installing firmware: PUP file is invalid."); + QMessageBox::critical(this, tr("Failure!"), tr("Error while installing firmware: PUP file is invalid.")); + return; + } + + fs::file update_files_f = pup.get_file(0x300); + tar_object update_files(update_files_f); + auto updatefilenames = update_files.get_filenames(); + + updatefilenames.erase(std::remove_if( + updatefilenames.begin(), updatefilenames.end(), [](std::string s) { return s.find("dev_flash_") == std::string::npos; }), + updatefilenames.end()); + + QProgressDialog pdlg(tr("Installing firmware ... please wait ..."), tr("Cancel"), 0, static_cast(updatefilenames.size()), this); + pdlg.setWindowTitle(tr("RPCS3 Firmware Installer")); + pdlg.setWindowModality(Qt::WindowModal); + pdlg.setFixedSize(500, pdlg.height()); + pdlg.show(); + +#ifdef _WIN32 + QWinTaskbarButton *taskbar_button = new QWinTaskbarButton(); + taskbar_button->setWindow(windowHandle()); + QWinTaskbarProgress *taskbar_progress = taskbar_button->progress(); + taskbar_progress->setRange(0, static_cast(updatefilenames.size())); + taskbar_progress->setVisible(true); +#endif + + // Synchronization variable + atomic_t progress(0); + { + // Run asynchronously + scope_thread worker("Firmware Installer", [&] + { + for (auto updatefilename : updatefilenames) + { + if (progress == -1) break; + + fs::file updatefile = update_files.get_file(updatefilename); + + SCEDecrypter self_dec(updatefile); + self_dec.LoadHeaders(); + self_dec.LoadMetadata(SCEPKG_ERK, SCEPKG_RIV); + self_dec.DecryptData(); + + auto dev_flash_tar_f = self_dec.MakeFile(); + if (dev_flash_tar_f.size() < 3) { + LOG_ERROR(GENERAL, "Error while installing firmware: PUP contents are invalid."); + QMessageBox::critical(this, tr("Failure!"), tr("Error while installing firmware: PUP contents are invalid.")); + progress = -1; + } + + tar_object dev_flash_tar(dev_flash_tar_f[2]); + if (!dev_flash_tar.extract(fs::get_config_dir())) + { + LOG_ERROR(GENERAL, "Error while installing firmware: TAR contents are invalid."); + QMessageBox::critical(this, tr("Failure!"), tr("Error while installing firmware: TAR contents are invalid.")); + progress = -1; + } + + if (progress >= 0) + progress += 1; + } + }); + + // Wait for the completion + while (std::this_thread::sleep_for(5ms), std::abs(progress) < pdlg.maximum()) + { + if (pdlg.wasCanceled()) + { + progress = -1; +#ifdef _WIN32 + taskbar_progress->hide(); + taskbar_button->~QWinTaskbarButton(); +#endif + break; + } + // Update progress window + pdlg.setValue(static_cast(progress)); +#ifdef _WIN32 + taskbar_progress->setValue(static_cast(progress)); +#endif + QCoreApplication::processEvents(); + } + + update_files_f.close(); + pup_f.close(); + + if (progress > 0) + { + pdlg.setValue(pdlg.maximum()); +#ifdef _WIN32 + taskbar_progress->setValue(taskbar_progress->maximum()); +#endif + std::this_thread::sleep_for(100ms); + } + } + + if (progress > 0) + { + LOG_SUCCESS(GENERAL, "Successfully installed PS3 firmware."); + guiSettings->ShowInfoBox(GUI::ib_pup_success, tr("Success!"), tr("Successfully installed PS3 firmware and LLE Modules!"), this); + +#ifdef _WIN32 + taskbar_progress->hide(); + taskbar_button->~QWinTaskbarButton(); +#endif + } +} + +// This is ugly, but PS3 headers shall not be included there. +extern void sysutil_send_system_cmd(u64 status, u64 param); + +void main_window::DecryptSPRXLibraries() +{ + QString path_last_SPRX = guiSettings->GetValue(GUI::fd_decrypt_sprx).toString(); + QStringList modules = QFileDialog::getOpenFileNames(this, tr("Select SPRX files"), path_last_SPRX, tr("SPRX files (*.sprx)")); + + if (modules.isEmpty()) + { + return; + } + + Emu.Stop(); + + guiSettings->SetValue(GUI::fd_decrypt_sprx, QFileInfo(modules.first()).path()); + + LOG_NOTICE(GENERAL, "Decrypting SPRX libraries..."); + + for (QString& module : modules) + { + std::string prx_path = sstr(module); + const std::string& prx_dir = fs::get_parent_dir(prx_path); + + fs::file elf_file(prx_path); + + if (elf_file && elf_file.size() >= 4 && elf_file.read() == "SCE\0"_u32) + { + const std::size_t prx_ext_pos = prx_path.find_last_of('.'); + const std::string& prx_ext = fmt::to_upper(prx_path.substr(prx_ext_pos != -1 ? prx_ext_pos : prx_path.size())); + const std::string& prx_name = prx_path.substr(prx_dir.size()); + + elf_file = decrypt_self(std::move(elf_file)); + + prx_path.erase(prx_path.size() - 4, 1); // change *.sprx to *.prx + + if (elf_file) + { + if (fs::file new_file{ prx_path, fs::rewrite }) + { + new_file.write(elf_file.to_string()); + LOG_SUCCESS(GENERAL, "Decrypted %s", prx_dir + prx_name); + } + else + { + LOG_ERROR(GENERAL, "Failed to create %s", prx_path); + } + } + else + { + LOG_ERROR(GENERAL, "Failed to decrypt %s", prx_dir + prx_name); + } + } + } + + LOG_NOTICE(GENERAL, "Finished decrypting all SPRX libraries."); +} + +void main_window::About() +{ + QDialog* about = new QDialog(this); + + QPushButton* gitHub = new QPushButton(tr("GitHub"), about); + QPushButton* website = new QPushButton(tr("Website"), about); + QPushButton* forum = new QPushButton(tr("Forum"), about); + QPushButton* patreon = new QPushButton(tr("Patreon"), about); + QPushButton* close = new QPushButton(tr("Close"), about); + close->setDefault(true); + + QLabel* icon = new QLabel(this); + icon->setPixmap(appIcon.pixmap(96, 96)); + + QLabel* caption = new QLabel(tr( + "

RPCS3

" + "A PlayStation 3 emulator and debugger.
" + "RPCS3 Version: %1").arg(qstr(rpcs3::version.to_string()) + )); + QLabel* developers = new QLabel( + "

Developers:
¬DH
¬AlexAltea
¬Hykem
Oil
Nekotekina
Bigpet
¬gopalsr83
¬tambry
" + "vlj
kd-11
jarveson
raven02
AniLeo
cornytrace
ssshadow
Numan

" + ); + QLabel* contributors = new QLabel( + "

Contributors:
BlackDaemon
elisha464
Aishou
krofna
xsacha
danilaml
unknownbrackets
Zangetsu38
" + "lioncash
achurch
darkf
Syphurith
Blaypeg
Survanium90
georgemoralis
ikki84
hcorion
Megamouse
flash-fire

" + ); + QLabel* supporters = new QLabel( + "

Supporters:
Howard Garrison
EXPotemkin
Marko V.
danhp
Jake (5315825)
Ian Reid
Tad Sherlock
Tyler Friesen
" + "Folzar
Payton Williams
RedPill Australia
yanghong
Mohammed El-Serougi
Дима ~Ximer13~ Кулин
James Reed
BaroqueSonata

" + ); + icon->setAlignment(Qt::AlignLeft); + caption->setAlignment(Qt::AlignLeft); + developers->setAlignment(Qt::AlignTop); + contributors->setAlignment(Qt::AlignTop); + supporters->setAlignment(Qt::AlignTop); + + // Caption Layout + QVBoxLayout* caption_layout = new QVBoxLayout(); + caption_layout->setAlignment(Qt::AlignLeft); + caption_layout->addSpacing(15); + caption_layout->addWidget(caption); + + // Header Section + QHBoxLayout* header_layout = new QHBoxLayout(); + header_layout->setAlignment(Qt::AlignCenter); + header_layout->addLayout(caption_layout); + header_layout->addStretch(); + header_layout->addWidget(icon); + header_layout->addStretch(); + + // Names Section + QHBoxLayout* text_layout = new QHBoxLayout(); + text_layout->setAlignment(Qt::AlignTop); + text_layout->addWidget(developers); + text_layout->addWidget(contributors); + text_layout->addWidget(supporters); + + // Button Section + QHBoxLayout* button_layout = new QHBoxLayout(); + button_layout->addWidget(gitHub); + button_layout->addWidget(website); + button_layout->addWidget(forum); + button_layout->addWidget(patreon); + button_layout->addStretch(); + button_layout->addWidget(close); + + // Main Layout + QVBoxLayout* layout = new QVBoxLayout(); + layout->addLayout(header_layout); + layout->addLayout(text_layout); + layout->addSpacing(20); + layout->addLayout(button_layout); + + // Events + connect(gitHub, &QAbstractButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://www.github.com/RPCS3")); }); + connect(website, &QAbstractButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://www.rpcs3.net")); }); + connect(forum, &QAbstractButton::clicked, [] { QDesktopServices::openUrl(QUrl("http://www.emunewz.net/forum/forumdisplay.php?fid=172")); }); + connect(patreon, &QAbstractButton::clicked, [] { QDesktopServices::openUrl(QUrl("https://www.patreon.com/Nekotekina")); }); + connect(close, &QAbstractButton::clicked, about, &QWidget::close); + + // Create About Dialog + about->setWindowTitle(tr("About RPCS3")); + about->setWindowFlags(about->windowFlags() & ~Qt::WindowContextHelpButtonHint); + about->setMinimumWidth(500); + about->setLayout(layout); + about->setFixedSize(about->sizeHint()); + about->exec(); +} + +/** Needed so that when a backup occurs of window state in guisettings, the state is current. +* Also, so that on close, the window state is preserved. +*/ +void main_window::SaveWindowState() +{ + // Save gui settings + guiSettings->SetValue(GUI::mw_geometry, saveGeometry()); + guiSettings->SetValue(GUI::mw_windowState, saveState()); + + // Save column settings + gameListFrame->SaveSettings(); +} + +void main_window::OnEmuRun() +{ + debuggerFrame->EnableButtons(true); +#ifdef _WIN32 + thumb_playPause->setToolTip(tr("Pause")); + thumb_playPause->setIcon(icon_pause); +#endif + sysPauseAct->setText(tr("&Pause\tCtrl+P")); + sysPauseAct->setIcon(icon_pause); + menu_run->setText(tr("&Pause")); + menu_run->setIcon(icon_pause); + EnableMenus(true); +} + +void main_window::OnEmuResume() +{ +#ifdef _WIN32 + thumb_playPause->setToolTip(tr("Pause")); + thumb_playPause->setIcon(icon_pause); +#endif + sysPauseAct->setText(tr("&Pause\tCtrl+P")); + sysPauseAct->setIcon(icon_pause); + menu_run->setText(tr("&Pause")); + menu_run->setIcon(icon_pause); +} + +void main_window::OnEmuPause() +{ +#ifdef _WIN32 + thumb_playPause->setToolTip(tr("Resume")); + thumb_playPause->setIcon(icon_play); +#endif + sysPauseAct->setText(tr("&Resume\tCtrl+E")); + sysPauseAct->setIcon(icon_play); + menu_run->setText(tr("&Resume")); + menu_run->setIcon(icon_play); +} + +void main_window::OnEmuStop() +{ + debuggerFrame->EnableButtons(false); +#ifdef _WIN32 + thumb_playPause->setToolTip(Emu.IsReady() ? tr("Start") : tr("Resume")); + thumb_playPause->setIcon(icon_play); +#endif + menu_run->setText(Emu.IsReady() ? tr("&Start") : tr("&Resume")); + menu_run->setIcon(icon_play); + EnableMenus(false); + if (!Emu.GetPath().empty()) + { + sysPauseAct->setText(tr("&Restart\tCtrl+E")); + sysPauseAct->setIcon(icon_restart); + sysPauseAct->setEnabled(true); + menu_restart->setEnabled(true); +#ifdef _WIN32 + thumb_restart->setEnabled(true); +#endif + } + else + { + sysPauseAct->setText(Emu.IsReady() ? tr("&Start\tCtrl+E") : tr("&Resume\tCtrl+E")); + sysPauseAct->setIcon(icon_play); + } +} + +void main_window::OnEmuReady() +{ +#ifdef _WIN32 + thumb_playPause->setToolTip(Emu.IsReady() ? tr("Start") : tr("Resume")); + thumb_playPause->setIcon(icon_play); +#endif + sysPauseAct->setText(Emu.IsReady() ? tr("&Start\tCtrl+E") : tr("&Resume\tCtrl+E")); + sysPauseAct->setIcon(icon_play); + menu_run->setText(Emu.IsReady() ? tr("&Start") : tr("&Resume")); + menu_run->setIcon(icon_play); + EnableMenus(true); +} + +extern bool user_asked_for_frame_capture; + +void main_window::EnableMenus(bool enabled) +{ + // Thumbnail Buttons +#ifdef _WIN32 + thumb_playPause->setEnabled(enabled); + thumb_stop->setEnabled(enabled); + thumb_restart->setEnabled(enabled); +#endif + + // Buttons + menu_run->setEnabled(enabled); + menu_stop->setEnabled(enabled); + menu_restart->setEnabled(enabled); + + // Emulation + sysPauseAct->setEnabled(enabled); + sysStopAct->setEnabled(enabled); + + // PS3 Commands + sysSendOpenMenuAct->setEnabled(enabled); + sysSendExitAct->setEnabled(enabled); + + // Tools + toolskernel_explorerAct->setEnabled(enabled); + toolsmemory_viewerAct->setEnabled(enabled); + toolsRsxDebuggerAct->setEnabled(enabled); + toolsStringSearchAct->setEnabled(enabled); +} + +void main_window::CreateActions() +{ + bootElfAct = new QAction(tr("Boot (S)ELF file"), this); + bootGameAct = new QAction(tr("Boot &Game"), this); + bootInstallPkgAct = new QAction(tr("&Install PKG"), this); + bootInstallPupAct = new QAction(tr("&Install Firmware"), this); + + exitAct = new QAction(tr("E&xit"), this); + exitAct->setShortcuts(QKeySequence::Quit); + exitAct->setStatusTip(tr("Exit the application")); + + sysPauseAct = new QAction(tr("&Pause"), this); + sysPauseAct->setEnabled(false); + sysPauseAct->setIcon(icon_pause); + + sysStopAct = new QAction(tr("&Stop"), this); + sysStopAct->setShortcut(tr("Ctrl+S")); + sysStopAct->setEnabled(false); + sysStopAct->setIcon(icon_stop); + + sysSendOpenMenuAct = new QAction(tr("Send &open system menu cmd"), this); + sysSendOpenMenuAct->setEnabled(false); + + sysSendExitAct = new QAction(tr("Send &exit cmd"), this); + sysSendExitAct->setEnabled(false); + + confSettingsAct = new QAction(tr("&Settings"), this); + confPadAct = new QAction(tr("&Keyboard Settings"), this); + + confAutopauseManagerAct = new QAction(tr("&Auto Pause Settings"), this); + confAutopauseManagerAct->setEnabled(false); + + confSavedataManagerAct = new QAction(tr("Save &Data Utility"), this); + confSavedataManagerAct->setEnabled(false); + + toolsCgDisasmAct = new QAction(tr("&Cg Disasm"), this); + toolsCgDisasmAct->setEnabled(true); + + toolskernel_explorerAct = new QAction(tr("&Kernel Explorer"), this); + toolskernel_explorerAct->setEnabled(false); + + toolsmemory_viewerAct = new QAction(tr("&Memory Viewer"), this); + toolsmemory_viewerAct->setEnabled(false); + + toolsRsxDebuggerAct = new QAction(tr("&RSX Debugger"), this); + toolsRsxDebuggerAct->setEnabled(false); + + toolsStringSearchAct = new QAction(tr("&String Search"), this); + toolsStringSearchAct->setEnabled(false); + + toolsDecryptSprxLibsAct = new QAction(tr("SPRX &Decryption"), this); + + showDebuggerAct = new QAction(tr("Show Debugger"), this); + showDebuggerAct->setCheckable(true); + + showLogAct = new QAction(tr("Show Log/TTY"), this); + showLogAct->setCheckable(true); + + showGameListAct = new QAction(tr("Show Game List"), this); + showGameListAct->setCheckable(true); + + showControlsAct = new QAction(tr("Show Controls"), this); + showControlsAct->setCheckable(true); + + refreshGameListAct = new QAction(tr("&Refresh Game List"), this); + + showCatHDDGameAct = new QAction(category::hdd_Game, this); + showCatHDDGameAct->setCheckable(true); + + showCatDiscGameAct = new QAction(category::disc_Game, this); + showCatDiscGameAct->setCheckable(true); + + showCatHomeAct = new QAction(category::home, this); + showCatHomeAct->setCheckable(true); + + showCatAudioVideoAct = new QAction(category::audio_Video, this); + showCatAudioVideoAct->setCheckable(true); + + showCatGameDataAct = new QAction(category::game_Data, this); + showCatGameDataAct->setCheckable(true); + + showCatUnknownAct = new QAction(category::unknown, this); + showCatUnknownAct->setCheckable(true); + + setIconSizeSmallAct = new QAction(tr("Small"), this); + setIconSizeSmallAct->setCheckable(true); + + setIconSizeMediumAct = new QAction(tr("Medium"), this); + setIconSizeMediumAct->setCheckable(true); + + setIconSizeLargeAct = new QAction(tr("Large"), this); + setIconSizeLargeAct->setCheckable(true); + + iconSizeActGroup = new QActionGroup(this); + iconSizeActGroup->addAction(setIconSizeSmallAct); + iconSizeActGroup->addAction(setIconSizeMediumAct); + iconSizeActGroup->addAction(setIconSizeLargeAct); + setIconSizeSmallAct->setChecked(true); + + aboutAct = new QAction(tr("&About"), this); + aboutAct->setStatusTip(tr("Show the application's About box")); + + aboutQtAct = new QAction(tr("About &Qt"), this); + aboutQtAct->setStatusTip(tr("Show the Qt library's About box")); +} + +void main_window::CreateConnects() +{ + connect(bootElfAct, &QAction::triggered, this, &main_window::BootElf); + connect(bootGameAct, &QAction::triggered, this, &main_window::BootGame); + connect(bootInstallPkgAct, &QAction::triggered, this, &main_window::InstallPkg); + connect(bootInstallPupAct, &QAction::triggered, this, &main_window::InstallPup); + connect(exitAct, &QAction::triggered, this, &QWidget::close); + connect(sysPauseAct, &QAction::triggered, Pause); + connect(sysStopAct, &QAction::triggered, [=]() { Emu.Stop(); }); + connect(sysSendOpenMenuAct, &QAction::triggered, [=](){ + sysutil_send_system_cmd(m_sys_menu_opened ? 0x0132 /* CELL_SYSUTIL_SYSTEM_MENU_CLOSE */ : 0x0131 /* CELL_SYSUTIL_SYSTEM_MENU_OPEN */, 0); + m_sys_menu_opened = !m_sys_menu_opened; + sysSendOpenMenuAct->setText(tr("Send &%0 system menu cmd").arg(m_sys_menu_opened ? tr("close") : tr("open"))); + }); + connect(sysSendExitAct, &QAction::triggered, [=](){ + sysutil_send_system_cmd(0x0101 /* CELL_SYSUTIL_REQUEST_EXITGAME */, 0); + }); + connect(confSettingsAct, &QAction::triggered, [=](){ + settings_dialog dlg(guiSettings, m_Render_Creator, this); + connect(&dlg, &settings_dialog::GuiSettingsSaveRequest, this, &main_window::SaveWindowState); + connect(&dlg, &settings_dialog::GuiSettingsSyncRequest, [=]() {ConfigureGuiFromSettings(true); }); + connect(&dlg, &settings_dialog::GuiStylesheetRequest, this, &main_window::RequestGlobalStylesheetChange); + dlg.exec(); + }); + connect(confPadAct, &QAction::triggered, this, [=](){ + pad_settings_dialog dlg(this); + dlg.exec(); + }); + connect(confAutopauseManagerAct, &QAction::triggered, [=](){ + auto_pause_settings_dialog dlg(this); + dlg.exec(); + }); + connect(confSavedataManagerAct, &QAction::triggered, [=](){ + save_data_list_dialog* sdid = new save_data_list_dialog(this, true); + sdid->show(); + }); + connect(toolsCgDisasmAct, &QAction::triggered, [=](){ + cg_disasm_window* cgdw = new cg_disasm_window(this); + cgdw->show(); + }); + connect(toolskernel_explorerAct, &QAction::triggered, [=](){ + kernel_explorer* kernelExplorer = new kernel_explorer(this); + kernelExplorer->show(); + }); + connect(toolsmemory_viewerAct, &QAction::triggered, [=](){ + memory_viewer_panel* mvp = new memory_viewer_panel(this); + mvp->show(); + }); + connect(toolsRsxDebuggerAct, &QAction::triggered, [=](){ + rsx_debugger* rsx = new rsx_debugger(this); + rsx->show(); + }); + connect(toolsStringSearchAct, &QAction::triggered, [=](){ + memory_string_searcher* mss = new memory_string_searcher(this); + mss->show(); + }); + connect(toolsDecryptSprxLibsAct, &QAction::triggered, this, &main_window::DecryptSPRXLibraries); + connect(showDebuggerAct, &QAction::triggered, [=](bool checked){ + checked ? debuggerFrame->show() : debuggerFrame->hide(); + guiSettings->SetValue(GUI::mw_debugger, checked); + }); + connect(showLogAct, &QAction::triggered, [=](bool checked){ + checked ? logFrame->show() : logFrame->hide(); + guiSettings->SetValue(GUI::mw_logger, checked); + }); + connect(showGameListAct, &QAction::triggered, [=](bool checked){ + checked ? gameListFrame->show() : gameListFrame->hide(); + guiSettings->SetValue(GUI::mw_gamelist, checked); + }); + connect(showControlsAct, &QAction::triggered, this, [=](bool checked){ + checked ? controls->show() : controls->hide(); + guiSettings->SetValue(GUI::mw_controls, checked); + }); + connect(refreshGameListAct, &QAction::triggered, [=](){ + gameListFrame->Refresh(); + }); + connect(showCatHDDGameAct, &QAction::triggered, [=](bool checked){ + gameListFrame->ToggleCategoryFilter(category::hdd_Game, checked); + guiSettings->SetCategoryVisibility(category::hdd_Game, checked); + }); + connect(showCatDiscGameAct, &QAction::triggered, [=](bool checked){ + gameListFrame->ToggleCategoryFilter(category::disc_Game, checked); + guiSettings->SetCategoryVisibility(category::disc_Game, checked); + }); + connect(showCatHomeAct, &QAction::triggered, [=](bool checked){ + gameListFrame->ToggleCategoryFilter(category::home, checked); + guiSettings->SetCategoryVisibility(category::home, checked); + }); + connect(showCatAudioVideoAct, &QAction::triggered, [=](bool checked){ + gameListFrame->ToggleCategoryFilter(category::audio_Video, checked); + guiSettings->SetCategoryVisibility(category::audio_Video, checked); + }); + connect(showCatGameDataAct, &QAction::triggered, [=](bool checked){ + gameListFrame->ToggleCategoryFilter(category::game_Data, checked); + guiSettings->SetCategoryVisibility(category::game_Data, checked); + }); + connect(showCatUnknownAct, &QAction::triggered, [=](bool checked) { + gameListFrame->ToggleCategoryFilter(category::unknown, checked); + guiSettings->SetCategoryVisibility(category::unknown, checked); + }); + connect(aboutAct, &QAction::triggered, this, &main_window::About); + connect(aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt); + connect(menu_run, &QAbstractButton::clicked, Pause); + connect(menu_stop, &QAbstractButton::clicked, [=]() { Emu.Stop(); }); + connect(menu_restart, &QAbstractButton::clicked, [=]() { Emu.Stop(); Emu.Load(); }); + connect(menu_capture_frame, &QAbstractButton::clicked, [=](){ + user_asked_for_frame_capture = true; + }); + connect(iconSizeActGroup, &QActionGroup::triggered, [=](QAction* act) + { + QString key; + + if (act == setIconSizeLargeAct) key = GUI::gl_icon_key_large; + else if (act == setIconSizeMediumAct) key = GUI::gl_icon_key_medium; + else key = GUI::gl_icon_key_small; + + guiSettings->SetValue(GUI::gl_iconSize, key); + gameListFrame->ResizeIcons(GUI::gl_icon_size.at(key)); + }); +} + +void main_window::CreateMenus() +{ + QMenu *bootMenu = menuBar()->addMenu(tr("&Boot")); + bootMenu->addAction(bootElfAct); + bootMenu->addAction(bootGameAct); + bootMenu->addSeparator(); + bootMenu->addAction(bootInstallPkgAct); + bootMenu->addAction(bootInstallPupAct); + bootMenu->addSeparator(); + bootMenu->addAction(exitAct); + + QMenu *sysMenu = menuBar()->addMenu(tr("&System")); + sysMenu->addAction(sysPauseAct); + sysMenu->addAction(sysStopAct); + sysMenu->addSeparator(); + sysMenu->addAction(sysSendOpenMenuAct); + sysMenu->addAction(sysSendExitAct); + + QMenu *confMenu = menuBar()->addMenu(tr("&Config")); + confMenu->addAction(confSettingsAct); + confMenu->addAction(confPadAct); + confMenu->addSeparator(); + confMenu->addAction(confAutopauseManagerAct); + confMenu->addSeparator(); + confMenu->addAction(confSavedataManagerAct); + + QMenu *toolsMenu = menuBar()->addMenu(tr("&Utilities")); + toolsMenu->addAction(toolsCgDisasmAct); + toolsMenu->addAction(toolskernel_explorerAct); + toolsMenu->addAction(toolsmemory_viewerAct); + toolsMenu->addAction(toolsRsxDebuggerAct); + toolsMenu->addAction(toolsStringSearchAct); + toolsMenu->addAction(toolsDecryptSprxLibsAct); + + QMenu *viewMenu = menuBar()->addMenu(tr("&View")); + viewMenu->addAction(showLogAct); + viewMenu->addAction(showDebuggerAct); + viewMenu->addAction(showControlsAct); + viewMenu->addSeparator(); + viewMenu->addAction(showGameListAct); + viewMenu->addAction(refreshGameListAct); + + QMenu *categoryMenu = viewMenu->addMenu(tr("Show Categories")); + categoryMenu->addAction(showCatHDDGameAct); + categoryMenu->addAction(showCatDiscGameAct); + categoryMenu->addAction(showCatHomeAct); + categoryMenu->addAction(showCatAudioVideoAct); + categoryMenu->addAction(showCatGameDataAct); + categoryMenu->addAction(showCatUnknownAct); + + QMenu *iconSizeMenu = viewMenu->addMenu(tr("Icon Size")); + iconSizeMenu->addAction(setIconSizeSmallAct); + iconSizeMenu->addAction(setIconSizeMediumAct); + iconSizeMenu->addAction(setIconSizeLargeAct); + + QMenu *helpMenu = menuBar()->addMenu(tr("&Help")); + helpMenu->addAction(aboutAct); + helpMenu->addAction(aboutQtAct); + + QHBoxLayout* controls_layout = new QHBoxLayout(); + menu_run = new QPushButton(tr("Start")); + menu_stop = new QPushButton(tr("Stop")); + menu_restart = new QPushButton(tr("Restart")); + menu_capture_frame = new QPushButton(tr("Capture Frame")); + menu_run->setEnabled(false); + menu_stop->setEnabled(false); + menu_restart->setEnabled(false); + menu_run->setIcon(icon_play); + menu_stop->setIcon(icon_stop); + menu_restart->setIcon(icon_restart); + controls_layout->addWidget(menu_run); + controls_layout->addWidget(menu_stop); + controls_layout->addWidget(menu_restart); + controls_layout->addWidget(menu_capture_frame); + controls_layout->addSpacing(5); + controls_layout->setContentsMargins(0, 0, 0, 0); + controls = new QWidget(this); + controls->setLayout(controls_layout); + menuBar()->setCornerWidget(controls, Qt::TopRightCorner); +} + +void main_window::CreateDockWindows() +{ + gameListFrame = new game_list_frame(guiSettings, m_Render_Creator, this); + gameListFrame->setObjectName("gamelist"); + debuggerFrame = new debugger_frame(this); + debuggerFrame->setObjectName("debugger"); + logFrame = new log_frame(guiSettings, this); + logFrame->setObjectName("logger"); + + addDockWidget(Qt::LeftDockWidgetArea, gameListFrame); + addDockWidget(Qt::LeftDockWidgetArea, logFrame); + addDockWidget(Qt::RightDockWidgetArea, debuggerFrame); + + connect(logFrame, &log_frame::log_frameClosed, [=]() + { + if (showLogAct->isChecked()) + { + showLogAct->setChecked(false); + guiSettings->SetValue(GUI::mw_logger, false); + } + }); + connect(debuggerFrame, &debugger_frame::DebugFrameClosed, [=](){ + if (showDebuggerAct->isChecked()) + { + showDebuggerAct->setChecked(false); + guiSettings->SetValue(GUI::mw_debugger, false); + } + }); + connect(gameListFrame, &game_list_frame::game_list_frameClosed, [=]() + { + if (showGameListAct->isChecked()) + { + showGameListAct->setChecked(false); + guiSettings->SetValue(GUI::mw_gamelist, false); + } + }); + connect(gameListFrame, &game_list_frame::RequestIconPathSet, this, &main_window::SetAppIconFromPath); +} + +void main_window::ConfigureGuiFromSettings(bool configureAll) +{ + // Restore GUI state if needed. We need to if they exist. + QByteArray geometry = guiSettings->GetValue(GUI::mw_geometry).toByteArray(); + if (geometry.isEmpty() == false) + { + restoreGeometry(geometry); + } + else + { // By default, set the window to 70% of the screen and the debugger frame is hidden. + debuggerFrame->hide(); + + QSize defaultSize = QDesktopWidget().availableGeometry().size() * 0.7; + resize(defaultSize); + } + + restoreState(guiSettings->GetValue(GUI::mw_windowState).toByteArray()); + + showLogAct->setChecked(guiSettings->GetValue(GUI::mw_logger).toBool()); + showGameListAct->setChecked(guiSettings->GetValue(GUI::mw_gamelist).toBool()); + showDebuggerAct->setChecked(guiSettings->GetValue(GUI::mw_debugger).toBool()); + showControlsAct->setChecked(guiSettings->GetValue(GUI::mw_controls).toBool()); + guiSettings->GetValue(GUI::mw_controls).toBool() ? controls->show() : controls->hide(); + + showCatHDDGameAct->setChecked(guiSettings->GetCategoryVisibility(category::hdd_Game)); + showCatDiscGameAct->setChecked(guiSettings->GetCategoryVisibility(category::disc_Game)); + showCatHomeAct->setChecked(guiSettings->GetCategoryVisibility(category::home)); + showCatAudioVideoAct->setChecked(guiSettings->GetCategoryVisibility(category::audio_Video)); + showCatGameDataAct->setChecked(guiSettings->GetCategoryVisibility(category::game_Data)); + showCatUnknownAct->setChecked(guiSettings->GetCategoryVisibility(category::unknown)); + + QString key = guiSettings->GetValue(GUI::gl_iconSize).toString(); + if (key == GUI::gl_icon_key_large) setIconSizeLargeAct->setChecked(true); + else if (key == GUI::gl_icon_key_medium) setIconSizeMediumAct->setChecked(true); + else setIconSizeSmallAct->setChecked(true); + + if (configureAll) + { + // Handle log settings + logFrame->LoadSettings(); + + // Gamelist + gameListFrame->LoadSettings(); + } +} + +void main_window::keyPressEvent(QKeyEvent *keyEvent) +{ + switch (keyEvent->key()) + { + case 'E': case 'e': if (Emu.IsPaused()) Emu.Resume(); else if (Emu.IsReady()) Emu.Run(); return; + case 'P': case 'p': if (Emu.IsRunning()) Emu.Pause(); return; + case 'S': case 's': if (!Emu.IsStopped()) Emu.Stop(); return; + case 'R': case 'r': if (!Emu.GetPath().empty()) { Emu.Stop(); Emu.Run(); } return; + } +} + +/** Override the Qt close event to have the emulator stop and the application die. May add a warning dialog in future. +*/ +void main_window::closeEvent(QCloseEvent* closeEvent) +{ + Q_UNUSED(closeEvent); + + // Cleanly stop the emulator. + Emu.Stop(); + + SaveWindowState(); + + // I need the gui settings to sync, and that means having the destructor called as guiSetting's parent is main_window. + setAttribute(Qt::WA_DeleteOnClose); + QMainWindow::close(); + + + // It's possible to have other windows open, like games. So, force the application to die. + QApplication::quit(); +} diff --git a/rpcs3/rpcs3qt/main_window.h b/rpcs3/rpcs3qt/main_window.h new file mode 100644 index 0000000000..295ad8f633 --- /dev/null +++ b/rpcs3/rpcs3qt/main_window.h @@ -0,0 +1,137 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#ifdef _WIN32 +#include +#include +#include +#include +#endif + +#include +#include +#include + +#include "log_frame.h" +#include "debugger_frame.h" +#include "game_list_frame.h" +#include "gui_settings.h" + +#include + +class main_window : public QMainWindow +{ + Q_OBJECT + + bool m_sys_menu_opened; + + Render_Creator m_Render_Creator; + + QWidget* controls; + + QIcon appIcon; + QIcon icon_play; + QIcon icon_pause; + QIcon icon_stop; + QIcon icon_restart; + + QPushButton* menu_run; + QPushButton* menu_stop; + QPushButton* menu_restart; + QPushButton* menu_capture_frame; + +#ifdef _WIN32 + QWinThumbnailToolBar *thumb_bar; + QWinThumbnailToolButton *thumb_playPause; + QWinThumbnailToolButton *thumb_stop; + QWinThumbnailToolButton *thumb_restart; + QStringList m_vulkan_adapters; +#endif +#ifdef _MSC_VER + QStringList m_d3d12_adapters; +#endif + +public: + explicit main_window(QWidget *parent = 0); + ~main_window(); + void CreateThumbnailToolbar(); + QIcon GetAppIcon(); + +signals: + void RequestGlobalStylesheetChange(const QString& sheetFilePath); + +public slots: + void OnEmuStop(); + void OnEmuRun(); + void OnEmuResume(); + void OnEmuPause(); + void OnEmuReady(); + +private slots: + void BootElf(); + void BootGame(); + void InstallPkg(); + void InstallPup(); + void DecryptSPRXLibraries(); + void About(); + + void SaveWindowState(); + +protected: + void closeEvent(QCloseEvent *event) override; + void SetAppIconFromPath(const std::string path); +private: + void CreateActions(); + void CreateConnects(); + void CreateMenus(); + void CreateDockWindows(); + void ConfigureGuiFromSettings(bool configureAll = false); + void EnableMenus(bool enabled); + void keyPressEvent(QKeyEvent *keyEvent); + + QActionGroup* iconSizeActGroup; + + QAction *bootElfAct; + QAction *bootGameAct; + QAction *bootInstallPkgAct; + QAction *bootInstallPupAct; + QAction *sysPauseAct; + QAction *sysStopAct; + QAction *sysSendOpenMenuAct; + QAction *sysSendExitAct; + QAction *confSettingsAct; + QAction *confPadAct; + QAction *confAutopauseManagerAct; + QAction *confSavedataManagerAct; + QAction *toolsCgDisasmAct; + QAction *toolskernel_explorerAct; + QAction *toolsmemory_viewerAct; + QAction *toolsRsxDebuggerAct; + QAction *toolsStringSearchAct; + QAction *toolsDecryptSprxLibsAct; + QAction *exitAct; + QAction *showDebuggerAct; + QAction *showLogAct; + QAction *showGameListAct; + QAction *showControlsAct; + QAction *refreshGameListAct; + QAction* showCatHDDGameAct; + QAction* showCatDiscGameAct; + QAction* showCatHomeAct; + QAction* showCatAudioVideoAct; + QAction* showCatGameDataAct; + QAction* showCatUnknownAct; + QAction* setIconSizeSmallAct; + QAction* setIconSizeMediumAct; + QAction* setIconSizeLargeAct; + QAction *aboutAct; + QAction *aboutQtAct; + + // Dockable widget frames + log_frame *logFrame; + debugger_frame *debuggerFrame; + game_list_frame *gameListFrame; + std::shared_ptr guiSettings; +}; + +#endif // MAINWINDOW_H diff --git a/rpcs3/rpcs3qt/mainwindow.cpp b/rpcs3/rpcs3qt/mainwindow.cpp deleted file mode 100644 index b55c299faf..0000000000 --- a/rpcs3/rpcs3qt/mainwindow.cpp +++ /dev/null @@ -1,362 +0,0 @@ -#ifdef QT_UI - -#include -#include -#include -#include -#include -#include -#include - -#include "gamelistframe.h" -#include "debuggerframe.h" -#include "logframe.h" -#include "settingsdialog.h" -#include "padsettingsdialog.h" -#include "AutoPauseSettingsDialog.h" -#include "mainwindow.h" - -MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) -{ - CreateActions(); - CreateMenus(); - CreateDockWindows(); - - setGeometry(0, 0, 900, 600); - setWindowTitle("RPCS3 v"); -} - -MainWindow::~MainWindow() -{ -} - -void MainWindow::BootElf() -{ - bool stopped = false; - - QFileDialog dlg(this, "Select (S)ELF", "", "(S)ELF files (*BOOT.BIN *.elf *.self);;" - "ELF files (BOOT.BIN *.elf);;" - "SELF files (EBOOT.BIN *.self);;" - "BOOT files (*BOOT.BIN);;" - "BIN files (*.bin);;" - "All files (*.*)"); - dlg.setAcceptMode(QFileDialog::AcceptOpen); - dlg.setFileMode(QFileDialog::ExistingFile); - - if (dlg.exec() == QDialog::Rejected) - { - qDebug() << "Rejected!"; - return; - } -} - -void MainWindow::BootGame() -{ - bool stopped = false; - - QFileDialog dlg(this, "Select game folder"); - dlg.setAcceptMode(QFileDialog::AcceptOpen); - dlg.setFileMode(QFileDialog::Directory); - dlg.setOptions(QFileDialog::ShowDirsOnly); - - if (dlg.exec() == QDialog::Rejected) - { - qDebug() << "Rejected!"; - return; - } -} - -void MainWindow::InstallPkg() -{ - QFileDialog dlg(this, "Select PKG", "", "PKG files (*.pkg);;All files (*.*)"); - dlg.setAcceptMode(QFileDialog::AcceptOpen); - dlg.setFileMode(QFileDialog::ExistingFile); - - if (dlg.exec() == QDialog::Rejected) - { - qDebug() << "Rejected!"; - return; - } -} - -void MainWindow::Pause() -{ - qDebug() << "MainWindow::Pause()"; -} - -void MainWindow::Stop() -{ - qDebug() << "MainWindow::Stop()"; -} - -void MainWindow::SendOpenSysMenu() -{ - qDebug() << "MainWindow::SendOpenSysMenu()"; -} - -void MainWindow::SendExit() -{ - qDebug() << "MainWindow::SendExit()"; -} - -void MainWindow::Settings() -{ - SettingsDialog dlg(this); - dlg.exec(); -} - -void MainWindow::PadSettings() -{ - PadSettingsDialog dlg(this); - dlg.exec(); -} - -void MainWindow::AutoPauseSettings() -{ - AutoPauseSettingsDialog dlg(this); - dlg.exec(); -} - -void MainWindow::VFSManager() -{ - qDebug() << "MainWindow::VFSManager()"; -} - -void MainWindow::VHDDManager() -{ - qDebug() << "MainWindow::VHDDManager()"; -} - -void MainWindow::SaveData() -{ - qDebug() << "MainWindow::SaveData()"; -} - -void MainWindow::ELFCompiler() -{ - qDebug() << "MainWindow::ELFCompiler()"; -} - -void MainWindow::CgDisasm() -{ - qDebug() << "MainWindow::CgDisasm()"; -} - -void MainWindow::KernelExplorer() -{ - qDebug() << "MainWindow::KernelExplorer()"; -} - -void MainWindow::MemoryViewer() -{ - qDebug() << "MainWindow::MemoryViewer()"; -} - -void MainWindow::RSXDebugger() -{ - qDebug() << "MainWindow::RSXDebugger()"; -} - -void MainWindow::StringSearch() -{ - qDebug() << "MainWindow::StringSearch()"; -} - -void MainWindow::DecryptSPRXLibraries() -{ - QFileDialog dlg(this, "Select SPRX files", "", "SPRX files (*.sprx)"); - dlg.setAcceptMode(QFileDialog::AcceptOpen); - dlg.setFileMode(QFileDialog::ExistingFiles); - - if (dlg.exec() == QDialog::Rejected) - { - return; - } - - QStringList modules = dlg.selectedFiles(); - - qDebug() << "Decrypting SPRX libraries..."; - - for (QString& module : modules) - { - qDebug() << module; - } - - qDebug() << "Finished decrypting all SPRX libraries."; -} - -void MainWindow::About() -{ - QString translatedTextAboutCaption; - translatedTextAboutCaption = tr( - "

RPCS3

" - "

A PlayStation 3 emulator and debugger.
" - "RPCS3 Version: VER_STUB

"); - QString translatedTextAboutText; - translatedTextAboutText = tr( - "

Developers: DH, AlexAltea, Hykem, Oil, Nekotekina, elisha464, Bigpet, vlj

" - "

Thanks: BlackDaemon, Aishou, krofna, xsacha

" - "

Please see " - "GitHub, " - "Website, " - "Forum or " - "Patreon" - " for more information.

" - ).arg("github.com/RPCS3", - "rpcs3.net", - "www.emunewz.net/forum/forumdisplay.php?fid=172", - "www.patreon.com/Nekotekina"); - - QMessageBox about(this); - about.setStyleSheet("QLabel{min-width: 500px;}"); // ¯\_(ツ)_/¯ - about.setWindowTitle(tr("About RPCS3")); - about.setText(translatedTextAboutCaption); - about.setInformativeText(translatedTextAboutText); - - about.exec(); -} - -void MainWindow::CreateActions() -{ - bootElfAct = new QAction(tr("Boot (S)ELF file"), this); - connect(bootElfAct, &QAction::triggered, this, &MainWindow::BootElf); - - bootGameAct = new QAction(tr("Boot &game"), this); - connect(bootGameAct, &QAction::triggered, this, &MainWindow::BootGame); - - bootInstallAct = new QAction(tr("&Install PKG"), this); - connect(bootInstallAct, &QAction::triggered, this, &MainWindow::InstallPkg); - - exitAct = new QAction(tr("E&xit"), this); - exitAct->setShortcuts(QKeySequence::Quit); - exitAct->setStatusTip(tr("Exit the application")); - connect(exitAct, &QAction::triggered, this, &QWidget::close); - - sysPauseAct = new QAction(tr("&Pause"), this); - sysPauseAct->setEnabled(false); - connect(sysPauseAct, &QAction::triggered, this, &MainWindow::Pause); - - sysStopAct = new QAction(tr("&Stop"), this); - sysStopAct->setShortcut(tr("Ctrl+S")); - sysStopAct->setEnabled(false); - connect(sysStopAct, &QAction::triggered, this, &MainWindow::Stop); - - sysSendOpenMenuAct = new QAction(tr("Send &open system menu cmd"), this); - sysSendOpenMenuAct->setEnabled(false); - connect(sysSendOpenMenuAct, &QAction::triggered, this, &MainWindow::SendOpenSysMenu); - - sysSendExitAct = new QAction(tr("Send &exit cmd"), this); - sysSendExitAct->setEnabled(false); - connect(sysSendExitAct, &QAction::triggered, this, &MainWindow::SendExit); - - confSettingsAct = new QAction(tr("&Settings"), this); - connect(confSettingsAct, &QAction::triggered, this, &MainWindow::Settings); - - confPadAct = new QAction(tr("&PAD Settings"), this); - connect(confPadAct, &QAction::triggered, this, &MainWindow::PadSettings); - - confAutopauseManagerAct = new QAction(tr("&Auto Pause Settings"), this); - connect(confAutopauseManagerAct, &QAction::triggered, this, &MainWindow::AutoPauseSettings); - - confVfsManagerAct = new QAction(tr("Virtual &File System Manager"), this); - confVfsManagerAct->setEnabled(false); - connect(confVfsManagerAct, &QAction::triggered, this, &MainWindow::VFSManager); - - confVhddManagerAct = new QAction(tr("Virtual &HDD Manager"), this); - confVhddManagerAct->setEnabled(false); - connect(confVhddManagerAct, &QAction::triggered, this, &MainWindow::VHDDManager); - - confSavedataManagerAct = new QAction(tr("Save &Data Utility"), this); - confSavedataManagerAct->setEnabled(false); - connect(confSavedataManagerAct, &QAction::triggered, this, &MainWindow::SaveData); - - toolsCompilerAct = new QAction(tr("&ELF Compiler"), this); - toolsCompilerAct->setEnabled(false); - connect(toolsCompilerAct, &QAction::triggered, this, &MainWindow::ELFCompiler); - - toolsCgDisasmAct = new QAction(tr("&Cg Disasm"), this); - toolsCgDisasmAct->setEnabled(false); - connect(toolsCgDisasmAct, &QAction::triggered, this, &MainWindow::CgDisasm); - - toolsKernelExplorerAct = new QAction(tr("&Kernel Explorer"), this); - toolsKernelExplorerAct->setEnabled(false); - connect(toolsKernelExplorerAct, &QAction::triggered, this, &MainWindow::KernelExplorer); - - toolsMemoryViewerAct = new QAction(tr("&Memory Viewer"), this); - toolsMemoryViewerAct->setEnabled(false); - connect(toolsMemoryViewerAct, &QAction::triggered, this, &MainWindow::MemoryViewer); - - toolsRsxDebuggerAct = new QAction(tr("&RSX Debugger"), this); - toolsRsxDebuggerAct->setEnabled(false); - connect(toolsRsxDebuggerAct, &QAction::triggered, this, &MainWindow::RSXDebugger); - - toolsStringSearchAct = new QAction(tr("&String Search"), this); - toolsStringSearchAct->setEnabled(false); - connect(toolsStringSearchAct, &QAction::triggered, this, &MainWindow::StringSearch); - - toolsSecryptSprxLibsAct = new QAction(tr("&Decrypt SPRX libraries"), this); - connect(toolsSecryptSprxLibsAct, &QAction::triggered, this, &MainWindow::DecryptSPRXLibraries); - - aboutAct = new QAction(tr("&About"), this); - aboutAct->setStatusTip(tr("Show the application's About box")); - connect(aboutAct, &QAction::triggered, this, &MainWindow::About); - - aboutQtAct = new QAction(tr("About &Qt"), this); - aboutQtAct->setStatusTip(tr("Show the Qt library's About box")); - connect(aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt); -} - -void MainWindow::CreateMenus() -{ - QMenu *bootMenu = menuBar()->addMenu(tr("&Boot")); - bootMenu->addAction(bootElfAct); - bootMenu->addAction(bootGameAct); - bootMenu->addSeparator(); - bootMenu->addAction(bootInstallAct); - bootMenu->addSeparator(); - bootMenu->addAction(exitAct); - - QMenu *sysMenu = menuBar()->addMenu(tr("&System")); - sysMenu->addAction(sysPauseAct); - sysMenu->addAction(sysStopAct); - sysMenu->addSeparator(); - sysMenu->addAction(sysSendOpenMenuAct); - sysMenu->addAction(sysSendExitAct); - - QMenu *confMenu = menuBar()->addMenu(tr("&Config")); - confMenu->addAction(confSettingsAct); - confMenu->addAction(confPadAct); - confMenu->addSeparator(); - confMenu->addAction(confAutopauseManagerAct); - confMenu->addSeparator(); - confMenu->addAction(confVfsManagerAct); - confMenu->addAction(confVhddManagerAct); - confMenu->addAction(confSavedataManagerAct); - - QMenu *toolsMenu = menuBar()->addMenu(tr("&Tools")); - toolsMenu->addAction(toolsCompilerAct); - toolsMenu->addAction(toolsCgDisasmAct); - toolsMenu->addAction(toolsKernelExplorerAct); - toolsMenu->addAction(toolsMemoryViewerAct); - toolsMenu->addAction(toolsRsxDebuggerAct); - toolsMenu->addAction(toolsStringSearchAct); - toolsMenu->addSeparator(); - toolsMenu->addAction(toolsSecryptSprxLibsAct); - - QMenu *helpMenu = menuBar()->addMenu(tr("&Help")); - helpMenu->addAction(aboutAct); - helpMenu->addAction(aboutQtAct); -} - -void MainWindow::CreateDockWindows() -{ - GameListFrame *gameList = new GameListFrame(this); - DebuggerFrame *debugger = new DebuggerFrame(this); - LogFrame *log = new LogFrame(this); - - addDockWidget(Qt::LeftDockWidgetArea, gameList); - addDockWidget(Qt::LeftDockWidgetArea, log); - addDockWidget(Qt::RightDockWidgetArea, debugger); -} - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/mainwindow.h b/rpcs3/rpcs3qt/mainwindow.h deleted file mode 100644 index 4a50716c13..0000000000 --- a/rpcs3/rpcs3qt/mainwindow.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include - -class MainWindow : public QMainWindow -{ - Q_OBJECT - -public: - explicit MainWindow(QWidget *parent = 0); - ~MainWindow(); - -signals: - -private slots: - void BootElf(); - void BootGame(); - void InstallPkg(); - void Pause(); - void Stop(); - void SendOpenSysMenu(); - void SendExit(); - void Settings(); - void PadSettings(); - void AutoPauseSettings(); - void VFSManager(); - void VHDDManager(); - void SaveData(); - void ELFCompiler(); - void CgDisasm(); - void KernelExplorer(); - void MemoryViewer(); - void RSXDebugger(); - void StringSearch(); - void DecryptSPRXLibraries(); - void About(); - -private: - void CreateActions(); - void CreateMenus(); - void CreateDockWindows(); - - QAction *bootElfAct; - QAction *bootGameAct; - QAction *bootInstallAct; - QAction *sysPauseAct; - QAction *sysStopAct; - QAction *sysSendOpenMenuAct; - QAction *sysSendExitAct; - QAction *confSettingsAct; - QAction *confPadAct; - QAction *confAutopauseManagerAct; - QAction *confVfsManagerAct; - QAction *confVhddManagerAct; - QAction *confSavedataManagerAct; - QAction *toolsCompilerAct; - QAction *toolsCgDisasmAct; - QAction *toolsKernelExplorerAct; - QAction *toolsMemoryViewerAct; - QAction *toolsRsxDebuggerAct; - QAction *toolsStringSearchAct; - QAction *toolsSecryptSprxLibsAct; - QAction *exitAct; - QAction *aboutAct; - QAction *aboutQtAct; -}; - -#endif // MAINWINDOW_H diff --git a/rpcs3/rpcs3qt/memory_string_searcher.cpp b/rpcs3/rpcs3qt/memory_string_searcher.cpp new file mode 100644 index 0000000000..8fc1ee02e4 --- /dev/null +++ b/rpcs3/rpcs3qt/memory_string_searcher.cpp @@ -0,0 +1,66 @@ + +#include "memory_string_searcher.h" + +memory_string_searcher::memory_string_searcher(QWidget* parent) + : QDialog(parent) +{ + setWindowTitle(tr("String Searcher")); + setAttribute(Qt::WA_DeleteOnClose); + setFixedSize(QSize(545, 64)); + + le_addr = new QLineEdit(this); + le_addr->setFixedWidth(460); + le_addr->setPlaceholderText(tr("Search...")); + + button_search = new QPushButton(tr("&Search"), this); + button_search->setFixedWidth(60); + + hbox_panel = new QHBoxLayout(); + hbox_panel->addWidget(le_addr); + hbox_panel->addWidget(button_search); + + setLayout(hbox_panel); + + connect(button_search, &QAbstractButton::clicked, this, &memory_string_searcher::OnSearch); +}; + +void memory_string_searcher::OnSearch() +{ + const QString wstr = le_addr->text(); + const char *str = wstr.toStdString().c_str(); + const u32 len = wstr.length(); + + LOG_NOTICE(GENERAL, "Searching for string %s", str); + + // Search the address space for the string + u32 strIndex = 0; + u32 numFound = 0; + const auto area = vm::get(vm::main); + for (u32 addr = area->addr; addr < area->addr + area->size; addr++) { + if (!vm::check_addr(addr)) { + strIndex = 0; + continue; + } + + u8 byte = vm::read8(addr); + if (byte == str[strIndex]) { + if (strIndex == len) { + // Found it + LOG_NOTICE(GENERAL, "Found @ %04x", addr - len); + numFound++; + strIndex = 0; + continue; + } + + strIndex++; + } + else + strIndex = 0; + + if (addr % (1024 * 1024 * 64) == 0) { // Log every 64mb + LOG_NOTICE(GENERAL, "Searching %04x ...", addr); + } + } + + LOG_NOTICE(GENERAL, "Search completed (found %d matches)", numFound); +} diff --git a/rpcs3/rpcs3qt/memory_string_searcher.h b/rpcs3/rpcs3qt/memory_string_searcher.h new file mode 100644 index 0000000000..f9ba4580dd --- /dev/null +++ b/rpcs3/rpcs3qt/memory_string_searcher.h @@ -0,0 +1,29 @@ +#ifndef MEMORYSTRINGSEARCHER_H +#define MEMORYSTRINGSEARCHER_H + +#include "stdafx.h" +#include "Emu/Memory/Memory.h" +#include "Emu/System.h" + +#include +#include +#include +#include +#include + +class memory_string_searcher : public QDialog +{ + Q_OBJECT + + QLineEdit* le_addr; + QHBoxLayout* hbox_panel; + QPushButton* button_search; + +public: + memory_string_searcher(QWidget* parent); + +private slots: + void OnSearch(); +}; + +#endif // MEMORYSTRINGSEARCHER_H diff --git a/rpcs3/rpcs3qt/memory_viewer_panel.cpp b/rpcs3/rpcs3qt/memory_viewer_panel.cpp new file mode 100644 index 0000000000..a4feef98d0 --- /dev/null +++ b/rpcs3/rpcs3qt/memory_viewer_panel.cpp @@ -0,0 +1,381 @@ +#include "stdafx.h" +#include "Emu/Memory/Memory.h" + +#include "memory_viewer_panel.h" + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } + +memory_viewer_panel::memory_viewer_panel(QWidget* parent) + : QDialog(parent) +{ + setWindowTitle(tr("Memory Viewer")); + setAttribute(Qt::WA_DeleteOnClose); + exit = false; + m_addr = 0; + m_colcount = 16; + m_rowcount = 16; + pSize = 10; + + //Font and Colors + mono = QFontDatabase::systemFont(QFontDatabase::FixedFont); + mono.setPointSize(pSize); + fontMetrics = new QFontMetrics(mono); + pal_bg.setColor(QPalette::Background, QColor(240, 240, 240)); + setPalette(pal_bg); + + //Layout: + QVBoxLayout* vbox_panel = new QVBoxLayout(); + + //Tools + QHBoxLayout* hbox_tools = new QHBoxLayout(); + + //Tools: Memory Viewer Options + QGroupBox* tools_mem = new QGroupBox(tr("Memory Viewer Options")); + QHBoxLayout* hbox_tools_mem = new QHBoxLayout(); + + //Tools: Memory Viewer Options: Address + QGroupBox* tools_mem_addr = new QGroupBox(tr("Address")); + QHBoxLayout* hbox_tools_mem_addr = new QHBoxLayout(); + t_addr = new QLineEdit(this); + t_addr->setPlaceholderText("00000000"); + t_addr->setFont(mono); + t_addr->setMaxLength(8); + t_addr->setFixedWidth(75); + t_addr->setFocus(); + hbox_tools_mem_addr->addWidget(t_addr); + tools_mem_addr->setLayout(hbox_tools_mem_addr); + + //Tools: Memory Viewer Options: Bytes + QGroupBox* tools_mem_bytes = new QGroupBox(tr("Bytes")); + QHBoxLayout* hbox_tools_mem_bytes = new QHBoxLayout(); + sb_bytes = new QSpinBox(this); + sb_bytes->setRange(1, 16); + sb_bytes->setValue(16); + hbox_tools_mem_bytes->addWidget(sb_bytes); + tools_mem_bytes->setLayout(hbox_tools_mem_bytes); + + //Tools: Memory Viewer Options: Control + QGroupBox* tools_mem_buttons = new QGroupBox(tr("Control")); + QHBoxLayout* hbox_tools_mem_buttons = new QHBoxLayout(); + QPushButton* b_fprev = new QPushButton("<<", this); + QPushButton* b_prev = new QPushButton("<", this); + QPushButton* b_next = new QPushButton(">", this); + QPushButton* b_fnext = new QPushButton(">>", this); + b_fprev->setFixedWidth(20); + b_prev->setFixedWidth(20); + b_next->setFixedWidth(20); + b_fnext->setFixedWidth(20); + b_fprev->setAutoDefault(false); + b_prev->setAutoDefault(false); + b_next->setAutoDefault(false); + b_fnext->setAutoDefault(false); + hbox_tools_mem_buttons->addWidget(b_fprev); + hbox_tools_mem_buttons->addWidget(b_prev); + hbox_tools_mem_buttons->addWidget(b_next); + hbox_tools_mem_buttons->addWidget(b_fnext); + tools_mem_buttons->setLayout(hbox_tools_mem_buttons); + + //Merge Tools: Memory Viewer + hbox_tools_mem->addWidget(tools_mem_addr); + hbox_tools_mem->addWidget(tools_mem_bytes); + hbox_tools_mem->addWidget(tools_mem_buttons); + tools_mem->setLayout(hbox_tools_mem); + + //Tools: Raw Image Preview Options + QGroupBox* tools_img = new QGroupBox(tr("Raw Image Preview Options")); + QHBoxLayout* hbox_tools_img = new QHBoxLayout();; + + //Tools: Raw Image Preview Options : Size + QGroupBox* tools_img_size = new QGroupBox(tr("Size")); + QHBoxLayout* hbox_tools_img_size = new QHBoxLayout(); + QLabel* l_x = new QLabel(" x "); + sb_img_size_x = new QSpinBox(this); + sb_img_size_y = new QSpinBox(this); + sb_img_size_x->setRange(1, 8192); + sb_img_size_y->setRange(1, 8192); + sb_img_size_x->setValue(256); + sb_img_size_y->setValue(256); + hbox_tools_img_size->addWidget(sb_img_size_x); + hbox_tools_img_size->addWidget(l_x); + hbox_tools_img_size->addWidget(sb_img_size_y); + tools_img_size->setLayout(hbox_tools_img_size); + + //Tools: Raw Image Preview Options: Mode + QGroupBox* tools_img_mode = new QGroupBox(tr("Mode")); + QHBoxLayout* hbox_tools_img_mode = new QHBoxLayout(); + cbox_img_mode = new QComboBox(this); + cbox_img_mode->addItem("RGB"); + cbox_img_mode->addItem("ARGB"); + cbox_img_mode->addItem("RGBA"); + cbox_img_mode->addItem("ABGR"); + cbox_img_mode->setCurrentIndex(1); //ARGB + hbox_tools_img_mode->addWidget(cbox_img_mode); + tools_img_mode->setLayout(hbox_tools_img_mode); + + //Merge Tools: Raw Image Preview Options + hbox_tools_img->addWidget(tools_img_size); + hbox_tools_img->addWidget(tools_img_mode); + tools_img->setLayout(hbox_tools_img); + + //Tools: Tool Buttons + QGroupBox* tools_buttons = new QGroupBox(tr("Tools")); + QVBoxLayout* hbox_tools_buttons = new QVBoxLayout(this); + QPushButton* b_img = new QPushButton(tr("View\nimage"), this); + b_img->setAutoDefault(false); + hbox_tools_buttons->addWidget(b_img); + tools_buttons->setLayout(hbox_tools_buttons); + + //Merge Tools = Memory Viewer Options + Raw Image Preview Options + Tool Buttons + hbox_tools->addSpacing(10); + hbox_tools->addWidget(tools_mem); + hbox_tools->addWidget(tools_img); + hbox_tools->addWidget(tools_buttons); + hbox_tools->addSpacing(10); + + //Memory Panel: + QHBoxLayout* hbox_mem_panel = new QHBoxLayout(); + + //Memory Panel: Address Panel + t_mem_addr = new QLabel(""); + t_mem_addr->setFont(mono); + t_mem_addr->setAutoFillBackground(true); + t_mem_addr->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); + QPalette palette_addr = t_mem_addr->palette(); + palette_addr.setColor(t_mem_addr->backgroundRole(), QColor(240, 240, 240)); + palette_addr.setColor(t_mem_addr->foregroundRole(), QColor(75, 135, 150)); + t_mem_addr->setPalette(palette_addr); + + //Memory Panel: Hex Panel + t_mem_hex = new QLabel(""); + t_mem_hex->setFont(mono); + t_mem_hex->setAutoFillBackground(true); + t_mem_hex->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); + QPalette palette_hex = t_mem_hex->palette(); + palette_hex.setColor(t_mem_hex->backgroundRole(), QColor(240, 240, 240)); + palette_hex.setColor(t_mem_hex->foregroundRole(), Qt::black); + t_mem_hex->setPalette(palette_hex); + + //Memory Panel: ASCII Panel + t_mem_ascii = new QLabel(""); + t_mem_ascii->setFont(mono); + t_mem_ascii->setAutoFillBackground(true); + t_mem_ascii->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); + QPalette palette_ascii = t_mem_ascii->palette(); + palette_ascii.setColor(t_mem_ascii->backgroundRole(), QColor(240, 240, 240)); + palette_ascii.setColor(t_mem_ascii->foregroundRole(), Qt::black); + t_mem_ascii->setPalette(palette_ascii); + + //Merge Memory Panel: + hbox_mem_panel->setAlignment(Qt::AlignLeft); + hbox_mem_panel->addSpacing(20); + hbox_mem_panel->addWidget(t_mem_addr); + hbox_mem_panel->addSpacing(10); + hbox_mem_panel->addWidget(t_mem_hex); + hbox_mem_panel->addSpacing(10); + hbox_mem_panel->addWidget(t_mem_ascii); + hbox_mem_panel->addSpacing(10); + + //Memory Panel: Set size of the QTextEdits + t_mem_hex->setFixedSize(QSize(pSize * 3 * m_colcount + 6, 228)); + t_mem_ascii->setFixedSize(QSize(pSize * m_colcount + 6, 228)); + + //Set Margins to adjust WindowSize + vbox_panel->setContentsMargins(0, 0, 0, 0); + hbox_tools->setContentsMargins(0, 0, 0, 0); + tools_mem_addr->setContentsMargins(0, 10, 0, 0); + tools_mem_bytes->setContentsMargins(0, 10, 0, 0); + tools_mem_buttons->setContentsMargins(0, 10, 0, 0); + tools_img_mode->setContentsMargins(0, 10, 0, 0); + tools_img_size->setContentsMargins(0, 10, 0, 0); + tools_mem->setContentsMargins(0, 10, 0, 0); + tools_img->setContentsMargins(0, 10, 0, 0); + tools_buttons->setContentsMargins(0, 10, 0, 0); + hbox_mem_panel->setContentsMargins(0, 0, 0, 0); + + //Merge and display everything + vbox_panel->addSpacing(10); + vbox_panel->addLayout(hbox_tools); + vbox_panel->addSpacing(10); + vbox_panel->addLayout(hbox_mem_panel); + vbox_panel->addSpacing(10); + setLayout(vbox_panel); + + //Events + connect(t_addr, &QLineEdit::returnPressed, [=](){ + bool ok; + m_addr = t_addr->text().toULong(&ok, 16); + t_addr->setText(QString("%1").arg(m_addr, 8, 16, QChar('0'))); // get 8 digits in input line + ShowMemory(); + }); + connect(sb_bytes, static_cast(&QSpinBox::valueChanged), [=](){ + m_colcount = sb_bytes->value(); + t_mem_hex->setFixedSize(QSize(pSize * 3 * m_colcount + 6, 228)); + t_mem_ascii->setFixedSize(QSize(pSize * m_colcount + 6, 228)); + ShowMemory(); + }); + + connect(b_prev, &QAbstractButton::clicked, [=]() { m_addr -= m_colcount; ShowMemory(); }); + connect(b_next, &QAbstractButton::clicked, [=]() { m_addr += m_colcount; ShowMemory(); }); + connect(b_fprev, &QAbstractButton::clicked, [=]() { m_addr -= m_rowcount * m_colcount; ShowMemory(); }); + connect(b_fnext, &QAbstractButton::clicked, [=]() { m_addr += m_rowcount * m_colcount; ShowMemory(); }); + connect(b_img, &QAbstractButton::clicked, [=]() { + u32 addr = m_addr; + int mode = cbox_img_mode->currentIndex(); + int sizex = sb_img_size_x->value(); + int sizey = sb_img_size_y->value(); + ShowImage(this, m_addr, mode, sizex, sizey, false); + }); + + //Fill the QTextEdits + ShowMemory(); + setFixedSize(sizeHint()); +}; + +void memory_viewer_panel::wheelEvent(QWheelEvent *event) +{ + // Set some scrollspeed modifiers: + u32 stepSize = 1; + if (event->modifiers().testFlag(Qt::ControlModifier)) + stepSize *= m_rowcount; + + QPoint numSteps = event->angleDelta() / 8 / 15; // http://doc.qt.io/qt-5/qwheelevent.html#pixelDelta + m_addr -= stepSize * m_colcount * numSteps.y(); + + t_addr->setText(qstr(fmt::format("%08x", m_addr))); + ShowMemory(); +} + +void memory_viewer_panel::ShowMemory() +{ + QString t_mem_addr_str; + QString t_mem_hex_str; + QString t_mem_ascii_str; + + for(u32 addr = m_addr; addr != m_addr + m_rowcount * m_colcount; addr += m_colcount) + { + t_mem_addr_str += qstr(fmt::format("%08x", addr)); + if (addr != m_addr + m_rowcount * m_colcount - m_colcount) t_mem_addr_str += "\r\n"; + } + + for (u32 row = 0; row < m_rowcount; row++) + { + for (u32 col = 0; col < m_colcount; col++) + { + u32 addr = m_addr + row * m_colcount + col; + + if (vm::check_addr(addr)) + { + const u8 rmem = vm::read8(addr); + t_mem_hex_str += qstr(fmt::format("%02x ", rmem)); + const bool isPrintable = rmem >= 32 && rmem <= 126; + t_mem_ascii_str += qstr(isPrintable ? std::string(1, rmem) : "."); + } + else + { + t_mem_hex_str += "??"; + t_mem_ascii_str += "?"; + if (col != m_colcount - 1) t_mem_hex_str += " "; + } + } + if (row != m_rowcount - 1) + { + t_mem_hex_str += "\r\n"; + t_mem_ascii_str += "\r\n"; + } + } + + t_mem_addr->setText(t_mem_addr_str); + t_mem_hex->setText(t_mem_hex_str); + t_mem_ascii->setText(t_mem_ascii_str); + + // Adjust Text Boxes + textSize = fontMetrics->size(0, t_mem_addr->text()); + t_mem_addr->setFixedSize(textSize.width() + 10, textSize.height() + 10); + + textSize = fontMetrics->size(0, t_mem_hex->text()); + t_mem_hex->setFixedSize(textSize.width() + 10, textSize.height() + 10); + + textSize = fontMetrics->size(0, t_mem_ascii->text()); + t_mem_ascii->setFixedSize(textSize.width() + 10, textSize.height() + 10); +} + +void memory_viewer_panel::ShowImage(QWidget* parent, u32 addr, int mode, u32 width, u32 height, bool flipv) +{ + QImage::Format format; + unsigned char* originalBuffer = (unsigned char*)vm::base(addr); + unsigned char* convertedBuffer = (unsigned char*)malloc(width * height * 4); + switch(mode) + { + case(0): // RGB + for (u32 y = 0; y < height; y++) { + for (u32 i = 0, j = 0; j < width * 4; i += 4, j += 3) { + convertedBuffer[i + 0 + y * width * 4] = originalBuffer[j + 2 + y * width * 3]; + convertedBuffer[i + 1 + y * width * 4] = originalBuffer[j + 1 + y * width * 3]; + convertedBuffer[i + 2 + y * width * 4] = originalBuffer[j + 0 + y * width * 3]; + convertedBuffer[i + 3 + y * width * 4] = 255; + } + } + break; + + case(1): // ARGB + for (u32 y = 0; y < height; y++) { + for (u32 i = 0, j = 0; j < width * 4; i += 4, j += 4) { + convertedBuffer[i + 0 + y * width * 4] = originalBuffer[j + 3 + y * width * 4]; + convertedBuffer[i + 1 + y * width * 4] = originalBuffer[j + 2 + y * width * 4]; + convertedBuffer[i + 2 + y * width * 4] = originalBuffer[j + 1 + y * width * 4]; + convertedBuffer[i + 3 + y * width * 4] = originalBuffer[j + 0 + y * width * 4]; + } + } + break; + + case(2): // RGBA + for (u32 y = 0; y < height; y++) { + for (u32 i = 0, j = 0; j < width * 4; i += 4, j += 4) { + convertedBuffer[i + 0 + y * width * 4] = originalBuffer[j + 2 + y * width * 4]; + convertedBuffer[i + 1 + y * width * 4] = originalBuffer[j + 1 + y * width * 4]; + convertedBuffer[i + 2 + y * width * 4] = originalBuffer[j + 0 + y * width * 4]; + convertedBuffer[i + 3 + y * width * 4] = originalBuffer[j + 3 + y * width * 4]; + } + } + break; + + case(3): // ABGR + for (u32 y = 0; y < height; y++) { + for (u32 i = 0, j = 0; j < width * 4; i += 4, j += 4) { + convertedBuffer[i + 0 + y * width * 4] = originalBuffer[j + 1 + y * width * 4]; + convertedBuffer[i + 1 + y * width * 4] = originalBuffer[j + 2 + y * width * 4]; + convertedBuffer[i + 2 + y * width * 4] = originalBuffer[j + 3 + y * width * 4]; + convertedBuffer[i + 3 + y * width * 4] = originalBuffer[j + 0 + y * width * 4]; + } + } + break; + } + + // Flip vertically + if (flipv) { + for (u32 y = 0; y < height / 2; y++) { + for (u32 x = 0; x < width * 4; x++) { + const u8 t = convertedBuffer[x + y * width * 4]; + convertedBuffer[x + y * width * 4] = convertedBuffer[x + (height - y - 1) * width * 4]; + convertedBuffer[x + (height - y - 1) * width * 4] = t; + } + } + } + + QImage image = QImage(convertedBuffer, width, height, QImage::Format_ARGB32); + if (image.isNull()) return; + + QLabel* canvas = new QLabel(); + canvas->setFixedSize(width, height); + canvas->setPixmap(QPixmap::fromImage(image.scaled(width, height, Qt::KeepAspectRatio, Qt::SmoothTransformation))); + + QHBoxLayout* layout = new QHBoxLayout(); + layout->setContentsMargins(0, 0, 0, 0); + layout->addWidget(canvas); + + QDialog* f_image_viewer = new QDialog(parent); + f_image_viewer->setWindowTitle(qstr(fmt::format("Raw Image @ 0x%x", addr))); + f_image_viewer->setFixedSize(QSize(width, height)); + f_image_viewer->setLayout(layout); + f_image_viewer->show(); +} diff --git a/rpcs3/rpcs3qt/memory_viewer_panel.h b/rpcs3/rpcs3qt/memory_viewer_panel.h new file mode 100644 index 0000000000..5d65685618 --- /dev/null +++ b/rpcs3/rpcs3qt/memory_viewer_panel.h @@ -0,0 +1,59 @@ +#ifndef MEMORYVIEWER_H +#define MEMORYVIEWER_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class memory_viewer_panel : public QDialog +{ + u32 m_addr; + u32 m_colcount; + u32 m_rowcount; + u32 pSize; + + QLineEdit* t_addr; + QSpinBox* sb_bytes; + + QSpinBox* sb_img_size_x; + QSpinBox* sb_img_size_y; + QComboBox* cbox_img_mode; + + QLabel* t_mem_addr; + QLabel* t_mem_hex; + QLabel* t_mem_ascii; + QFont mono; + QFontMetrics* fontMetrics; + QSize textSize; + QPalette pal_bg; + QPalette pal_fg; + +public: + bool exit; + memory_viewer_panel(QWidget* parent); + ~memory_viewer_panel() + { + exit = true; + } + + virtual void wheelEvent(QWheelEvent *event); + + virtual void ShowMemory(); + void SetPC(const uint pc) { m_addr = pc; } + + //Static methods + static void ShowImage(QWidget* parent, u32 addr, int mode, u32 sizex, u32 sizey, bool flipv); +}; + +#endif // !MEMORYVIEWER_H diff --git a/rpcs3/rpcs3qt/misc_tab.cpp b/rpcs3/rpcs3qt/misc_tab.cpp new file mode 100644 index 0000000000..28c73a38d4 --- /dev/null +++ b/rpcs3/rpcs3qt/misc_tab.cpp @@ -0,0 +1,31 @@ +#include +#include +#include +#include +#include +#include + +#include "misc_tab.h" +#include "main_window.h" + +misc_tab::misc_tab(std::shared_ptr xemu_settings, QWidget *parent) : QWidget(parent) +{ + // Left Widgets + QCheckBox *exitOnStop = xemu_settings->CreateEnhancedCheckBox(emu_settings::ExitRPCS3OnFinish, this); + QCheckBox *alwaysStart = xemu_settings->CreateEnhancedCheckBox(emu_settings::StartOnBoot, this); + QCheckBox *startGameFullscreen = xemu_settings->CreateEnhancedCheckBox(emu_settings::StartGameFullscreen, this); + QCheckBox *showFPSInTitle = xemu_settings->CreateEnhancedCheckBox(emu_settings::ShowFPSInTitle, this); + + // Left layout + QVBoxLayout *vbox_left = new QVBoxLayout; + vbox_left->addWidget(exitOnStop); + vbox_left->addWidget(alwaysStart); + vbox_left->addWidget(startGameFullscreen); + vbox_left->addWidget(showFPSInTitle); + vbox_left->addStretch(1); + + // Main Layout + QHBoxLayout *hbox = new QHBoxLayout; + hbox->addLayout(vbox_left); + setLayout(hbox); +} \ No newline at end of file diff --git a/rpcs3/rpcs3qt/misc_tab.h b/rpcs3/rpcs3qt/misc_tab.h new file mode 100644 index 0000000000..8b1530600d --- /dev/null +++ b/rpcs3/rpcs3qt/misc_tab.h @@ -0,0 +1,18 @@ +#ifndef MISCTAB_H +#define MISCTAB_H + +#include "emu_settings.h" + +#include + +#include + +class misc_tab : public QWidget +{ + Q_OBJECT + +public: + explicit misc_tab(std::shared_ptr xemu_settings, QWidget *parent = 0); +}; + +#endif // MISCTAB_H diff --git a/rpcs3/rpcs3qt/misctab.cpp b/rpcs3/rpcs3qt/misctab.cpp deleted file mode 100644 index 74d609c485..0000000000 --- a/rpcs3/rpcs3qt/misctab.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#ifdef QT_UI - -#include -#include -#include -#include - -#include "misctab.h" - -MiscTab::MiscTab(QWidget *parent) : QWidget(parent) -{ - // Checkboxes - QCheckBox *exitOnStop = new QCheckBox(tr("Exit RPCS3 when process finishes")); - QCheckBox *alwaysStart = new QCheckBox(tr("Always start after boot")); - QCheckBox *apSystemcall = new QCheckBox(tr("Auto Pause at System Call")); - QCheckBox *apFunctioncall = new QCheckBox(tr("Auto Pause at Function Call")); - - // Main layout - QVBoxLayout *vbox = new QVBoxLayout; - vbox->addWidget(exitOnStop); - vbox->addWidget(alwaysStart); - vbox->addWidget(apSystemcall); - vbox->addWidget(apFunctioncall); - vbox->addStretch(1); - - QHBoxLayout *hbox = new QHBoxLayout; - hbox->addLayout(vbox); - hbox->addStretch(1); - setLayout(hbox); -} - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/misctab.h b/rpcs3/rpcs3qt/misctab.h deleted file mode 100644 index a7f715f7ab..0000000000 --- a/rpcs3/rpcs3qt/misctab.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MISCTAB_H -#define MISCTAB_H - -#include - -class MiscTab : public QWidget -{ - Q_OBJECT - -public: - explicit MiscTab(QWidget *parent = 0); - -signals: - -public slots: -}; - -#endif // MISCTAB_H diff --git a/rpcs3/rpcs3qt/msg_dialog_frame.cpp b/rpcs3/rpcs3qt/msg_dialog_frame.cpp new file mode 100644 index 0000000000..d60e923ee3 --- /dev/null +++ b/rpcs3/rpcs3qt/msg_dialog_frame.cpp @@ -0,0 +1,230 @@ + +#include "msg_dialog_frame.h" + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } + +void msg_dialog_frame::Create(const std::string& msg) +{ + if (m_dialog) + { + m_dialog->close(); + delete m_dialog; + } + + m_dialog = new custom_dialog(type.disable_cancel); + m_dialog->setWindowTitle(type.se_normal ? "Normal dialog" : "Error dialog"); + m_dialog->setWindowFlags(m_dialog->windowFlags() & ~Qt::WindowContextHelpButtonHint); + m_dialog->setWindowOpacity(type.bg_invisible ? 1.0 : 192.0 / 255.0); + + m_text = new QLabel(qstr(msg)); + m_text->setAlignment(Qt::AlignCenter); + + //Layout + QFormLayout* layout = new QFormLayout(m_dialog); + layout->setFormAlignment(Qt::AlignHCenter); + layout->addRow(m_text); + + auto l_AddGauge = [=] (QProgressBar* &bar, QLabel* &text) + { + text = new QLabel("", m_dialog); + bar = new QProgressBar(m_dialog); + bar->setRange(0, m_gauge_max); + bar->setFixedWidth(300); + bar->setAlignment(Qt::AlignCenter); + + QHBoxLayout* barLayout = new QHBoxLayout; + barLayout->addStretch(); + barLayout->addWidget(bar); + barLayout->addStretch(); + + QHBoxLayout* textLayout = new QHBoxLayout; + textLayout->setAlignment(Qt::AlignCenter); + textLayout->addWidget(text); + + layout->addRow(textLayout); + layout->addRow(barLayout); + }; + + if (type.progress_bar_count >= 1) + { + l_AddGauge(m_gauge1, m_text1); + +#ifdef _WIN32 + m_tb_button = new QWinTaskbarButton(); + m_tb_button->setWindow(m_taskbarTarget); + m_tb_progress = m_tb_button->progress(); + m_tb_progress->setRange(0, m_gauge_max); + m_tb_progress->setVisible(true); +#endif + } + + if (type.progress_bar_count >= 2) + { + l_AddGauge(m_gauge2, m_text2); + } + + if (type.button_type.unshifted() == CELL_MSGDIALOG_TYPE_BUTTON_TYPE_YESNO) + { + m_dialog->setModal(true); + + m_button_yes = new QPushButton("&Yes", m_dialog); + m_button_no = new QPushButton("&No", m_dialog); + + QHBoxLayout* hBoxButtons = new QHBoxLayout; + hBoxButtons->setAlignment(Qt::AlignCenter); + hBoxButtons->addWidget(m_button_yes); + hBoxButtons->addWidget(m_button_no); + layout->addRow(hBoxButtons); + + if (type.default_cursor == 1) + { + m_button_no->setFocus(); + } + else + { + m_button_yes->setFocus(); + } + connect(m_button_yes, &QAbstractButton::clicked, [=] {on_close(CELL_MSGDIALOG_BUTTON_YES); m_dialog->accept(); }); + connect(m_button_no, &QAbstractButton::clicked, [=] {on_close(CELL_MSGDIALOG_BUTTON_NO); m_dialog->accept(); }); + } + + if (type.button_type.unshifted() == CELL_MSGDIALOG_TYPE_BUTTON_TYPE_OK) + { + m_dialog->setModal(true); + + m_button_ok = new QPushButton("&OK", m_dialog); + m_button_ok->setFixedWidth(50); + + QHBoxLayout* hBoxButtons = new QHBoxLayout; + hBoxButtons->setAlignment(Qt::AlignCenter); + hBoxButtons->addWidget(m_button_ok); + layout->addRow(hBoxButtons); + + if (type.default_cursor == 0) + { + m_button_ok->setFocus(); + } + connect(m_button_ok, &QAbstractButton::clicked, [=] { on_close(CELL_MSGDIALOG_BUTTON_OK); m_dialog->accept(); }); + } + + m_dialog->setLayout(layout); + + connect(m_dialog, &QDialog::rejected, [=] {if (!type.disable_cancel) { on_close(CELL_MSGDIALOG_BUTTON_ESCAPE); }}); + + //Fix size + m_dialog->setFixedSize(m_dialog->sizeHint()); + m_dialog->show(); +} + +void msg_dialog_frame::CreateOsk(const std::string& msg, char16_t* osk_text) +{ + if (osk_dialog) + { + osk_dialog->close(); + delete osk_dialog; + } + + osk_dialog = new custom_dialog(type.disable_cancel); + osk_dialog->setModal(true); + osk_text_return = osk_text; + + //Title + osk_dialog->setWindowTitle(qstr(msg)); + osk_dialog->setWindowFlags(osk_dialog->windowFlags() & ~Qt::WindowContextHelpButtonHint); + + //Text Input + QLineEdit* input = new QLineEdit(osk_dialog); + input->setFixedWidth(200); + input->setFocus(); + + //Ok Button + QPushButton* button_ok = new QPushButton("Ok", osk_dialog); + button_ok->setFixedWidth(50); + + //Layout + QHBoxLayout* buttonsLayout = new QHBoxLayout; + buttonsLayout->setAlignment(Qt::AlignCenter); + buttonsLayout->addWidget(button_ok); + + QFormLayout* layout = new QFormLayout(osk_dialog); + layout->setFormAlignment(Qt::AlignHCenter); + layout->addRow(input); + layout->addRow(buttonsLayout); + osk_dialog->setLayout(layout); + + //Events + connect(input, &QLineEdit::textChanged, [=] { + std::memcpy(osk_text_return, reinterpret_cast(input->text().constData()), input->text().size() * 2); + on_osk_input_entered(); + }); + connect(input, &QLineEdit::returnPressed, [=] { on_close(CELL_MSGDIALOG_BUTTON_OK); osk_dialog->accept(); }); + connect(button_ok, &QAbstractButton::clicked, [=] { on_close(CELL_MSGDIALOG_BUTTON_OK); osk_dialog->accept(); }); + connect(osk_dialog, &QDialog::rejected, [=] {if (!type.disable_cancel) { on_close(CELL_MSGDIALOG_BUTTON_ESCAPE); }}); + + //Fix size + osk_dialog->setFixedSize(osk_dialog->sizeHint()); + osk_dialog->show(); +} + +msg_dialog_frame::msg_dialog_frame(QWindow* taskbarTarget) : m_taskbarTarget(taskbarTarget) {} + +msg_dialog_frame::~msg_dialog_frame() { +#ifdef _WIN32 + if (m_tb_progress) + { + m_tb_progress->hide(); + } + if (m_tb_button) + { + m_tb_button->deleteLater(); + } +#endif + if (m_dialog) + { + m_dialog->deleteLater(); + } +} + +void msg_dialog_frame::ProgressBarSetMsg(u32 index, const std::string& msg) +{ + if (m_dialog) + { + if (index == 0 && m_text1) m_text1->setText(qstr(msg)); + if (index == 1 && m_text2) m_text2->setText(qstr(msg)); + } +} + +void msg_dialog_frame::ProgressBarReset(u32 index) +{ + if (index == 0 && m_gauge1) + { + m_gauge1->reset(); +#ifdef _WIN32 + m_tb_progress->reset(); +#endif + } + + if (index == 1 && m_gauge2) + { + m_gauge2->reset(); + } +} + +void msg_dialog_frame::ProgressBarInc(u32 index, u32 delta) +{ + if (m_dialog) + { + if (index == 0 && m_gauge1) + { + m_gauge1->setValue(m_gauge1->value() + delta); +#ifdef _WIN32 + m_tb_progress->setValue(m_tb_progress->value() + delta); +#endif + } + + if (index == 1 && m_gauge2) + { + m_gauge2->setValue(m_gauge2->value() + delta); + } + } +} diff --git a/rpcs3/rpcs3qt/msg_dialog_frame.h b/rpcs3/rpcs3qt/msg_dialog_frame.h new file mode 100644 index 0000000000..a769438583 --- /dev/null +++ b/rpcs3/rpcs3qt/msg_dialog_frame.h @@ -0,0 +1,99 @@ +#ifndef MSGDIALOG_H +#define MSGDIALOG_H + +#include "stdafx.h" +#include "Emu/Memory/vm.h" +#include "Emu/Cell/Modules/cellMsgDialog.h" +#include "Emu/System.h" +#include "Emu/Memory/Memory.h" +#include "Emu/Cell/lv2/sys_time.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef _WIN32 +#include +#include +#include +#include +#endif + +class custom_dialog; + +class msg_dialog_frame : public QObject, public MsgDialogBase +{ + Q_OBJECT + +#ifdef _WIN32 + QWinTaskbarButton* m_tb_button = nullptr; + QWinTaskbarProgress* m_tb_progress = nullptr; +#endif + custom_dialog* m_dialog =nullptr; + QLabel* m_text = nullptr; + QLabel* m_text1 = nullptr; + QLabel* m_text2 = nullptr; + QPushButton* m_button_ok = nullptr; + QPushButton* m_button_yes = nullptr; + QPushButton* m_button_no = nullptr; + QProgressBar* m_gauge1 = nullptr; + QProgressBar* m_gauge2 = nullptr; + + custom_dialog* osk_dialog = nullptr; + char16_t* osk_text_return; + + const int m_gauge_max = 100; + +public: + msg_dialog_frame(QWindow* taskbarTarget); + ~msg_dialog_frame(); + virtual void Create(const std::string& msg) override; + virtual void CreateOsk(const std::string& msg, char16_t* osk_text) override; + virtual void ProgressBarSetMsg(u32 progressBarIndex, const std::string& msg) override; + virtual void ProgressBarReset(u32 progressBarIndex) override; + virtual void ProgressBarInc(u32 progressBarIndex, u32 delta) override; +private: + QWindow* m_taskbarTarget; // Window which will be targeted by custom taskbars. +}; + +class custom_dialog : public QDialog +{ + Q_OBJECT + + bool m_disable_cancel; +public: + explicit custom_dialog(bool disableCancel, QWidget* parent = 0) + : QDialog(parent), m_disable_cancel(disableCancel) + { + if (m_disable_cancel) + { + setWindowFlags(windowFlags() & ~Qt::WindowCloseButtonHint); + } + } +private: + void keyPressEvent(QKeyEvent* event) + { + // this won't work with Alt+F4, the window still closes + if (m_disable_cancel && event->key() == Qt::Key_Escape) + { + event->ignore(); + } + } + void closeEvent(QCloseEvent* event) + { + // spontaneous: don't close on external system level events like Alt+F4 + if (m_disable_cancel && event->spontaneous()) + { + event->ignore(); + } + } +}; + +#endif // !MSGDIALOG_H diff --git a/rpcs3/rpcs3qt/networkingtab.cpp b/rpcs3/rpcs3qt/networking_tab.cpp similarity index 60% rename from rpcs3/rpcs3qt/networkingtab.cpp rename to rpcs3/rpcs3qt/networking_tab.cpp index 702b1219e5..bf8e7fe264 100644 --- a/rpcs3/rpcs3qt/networkingtab.cpp +++ b/rpcs3/rpcs3qt/networking_tab.cpp @@ -1,22 +1,16 @@ -#ifdef QT_UI - #include #include #include #include -#include "networkingtab.h" +#include "networking_tab.h" -NetworkingTab::NetworkingTab(QWidget *parent) : QWidget(parent) +networking_tab::networking_tab(std::shared_ptr xemu_settings, QWidget *parent) : QWidget(parent) { // Connection status QGroupBox *netStatus = new QGroupBox(tr("Connection status")); - QComboBox *netStatusBox = new QComboBox; - netStatusBox->addItem(tr("Disconnected")); - netStatusBox->addItem(tr("Connecting")); - netStatusBox->addItem(tr("Obtaining IP")); - netStatusBox->addItem(tr("IP obtained")); + QComboBox *netStatusBox = xemu_settings->CreateEnhancedComboBox(emu_settings::ConnectionStatus, this); QVBoxLayout *netStatusVbox = new QVBoxLayout; netStatusVbox->addWidget(netStatusBox); @@ -32,5 +26,3 @@ NetworkingTab::NetworkingTab(QWidget *parent) : QWidget(parent) hbox->addStretch(); setLayout(hbox); } - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/networking_tab.h b/rpcs3/rpcs3qt/networking_tab.h new file mode 100644 index 0000000000..5b8c02bf02 --- /dev/null +++ b/rpcs3/rpcs3qt/networking_tab.h @@ -0,0 +1,22 @@ +#ifndef NETWORKINGTAB_H +#define NETWORKINGTAB_H + +#include "emu_settings.h" + +#include + +#include + +class networking_tab : public QWidget +{ + Q_OBJECT + +public: + explicit networking_tab(std::shared_ptr xemu_settings, QWidget *parent = 0); + +signals: + +public slots: +}; + +#endif // NETWORKINGTAB_H diff --git a/rpcs3/rpcs3qt/networkingtab.h b/rpcs3/rpcs3qt/networkingtab.h deleted file mode 100644 index 1c4e6f10fa..0000000000 --- a/rpcs3/rpcs3qt/networkingtab.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef NETWORKINGTAB_H -#define NETWORKINGTAB_H - -#include - -class NetworkingTab : public QWidget -{ - Q_OBJECT - -public: - explicit NetworkingTab(QWidget *parent = 0); - -signals: - -public slots: -}; - -#endif // NETWORKINGTAB_H diff --git a/rpcs3/rpcs3qt/pad_settings_dialog.cpp b/rpcs3/rpcs3qt/pad_settings_dialog.cpp new file mode 100644 index 0000000000..96cc057a4b --- /dev/null +++ b/rpcs3/rpcs3qt/pad_settings_dialog.cpp @@ -0,0 +1,554 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "stdafx.h" +#include "pad_settings_dialog.h" + +// TODO: rewrite with std::chrono or QTimer +#include + +static const int PadButtonWidth = 60; + +extern keyboard_pad_config g_kbpad_config; + +pad_settings_dialog::pad_settings_dialog(QWidget *parent) : QDialog(parent) +{ + // Left Analog Stick + QGroupBox *roundStickL = new QGroupBox(tr("Left Analog Stick")); + QVBoxLayout *roundStickLMainVBox = new QVBoxLayout; + QVBoxLayout *roundStickLVBox = new QVBoxLayout; + QHBoxLayout *roundStickLHBox1 = new QHBoxLayout; + QHBoxLayout *roundStickLHBox2 = new QHBoxLayout; + QHBoxLayout *roundStickLHBox3 = new QHBoxLayout; + b_up_lstick = new QPushButton(tr("W")); + b_left_lstick = new QPushButton(tr("A")); + b_right_lstick = new QPushButton(tr("D")); + b_down_lstick = new QPushButton(tr("S")); + roundStickLHBox1->addWidget(b_up_lstick); + roundStickLHBox2->addWidget(b_left_lstick); + roundStickLHBox2->addWidget(b_right_lstick); + roundStickLHBox3->addWidget(b_down_lstick); + roundStickLVBox->addLayout(roundStickLHBox1); + roundStickLVBox->addLayout(roundStickLHBox2); + roundStickLVBox->addLayout(roundStickLHBox3); + roundStickL->setLayout(roundStickLVBox); + roundStickLMainVBox->addWidget(roundStickL); + roundStickLMainVBox->addStretch(); + b_up_lstick->setFixedWidth(PadButtonWidth); + b_left_lstick->setFixedWidth(PadButtonWidth); + b_right_lstick->setFixedWidth(PadButtonWidth); + b_down_lstick->setFixedWidth(PadButtonWidth); + + // D-Pad + QGroupBox *roundPadControls = new QGroupBox(tr("D-Pad")); + QVBoxLayout *roundPadControlsMainVBox = new QVBoxLayout; + QVBoxLayout *roundPadControlsVBox = new QVBoxLayout; + QHBoxLayout *roundPadControlsHBox1 = new QHBoxLayout; + QHBoxLayout *roundPadControlsHBox2 = new QHBoxLayout; + QHBoxLayout *roundPadControlsHBox3 = new QHBoxLayout; + b_up = new QPushButton(tr("Up")); + b_left = new QPushButton(tr("Left")); + b_right = new QPushButton(tr("Right")); + b_down = new QPushButton(tr("Down")); + roundPadControlsHBox1->addWidget(b_up); + roundPadControlsHBox2->addWidget(b_left); + roundPadControlsHBox2->addWidget(b_right); + roundPadControlsHBox3->addWidget(b_down); + roundPadControlsVBox->addLayout(roundPadControlsHBox1); + roundPadControlsVBox->addLayout(roundPadControlsHBox2); + roundPadControlsVBox->addLayout(roundPadControlsHBox3); + roundPadControls->setLayout(roundPadControlsVBox); + roundPadControlsMainVBox->addWidget(roundPadControls); + roundPadControlsMainVBox->addStretch(); + b_up->setFixedWidth(PadButtonWidth); + b_left->setFixedWidth(PadButtonWidth); + b_right->setFixedWidth(PadButtonWidth); + b_down->setFixedWidth(PadButtonWidth); + + // Left Shifts + QGroupBox *roundPadShiftsL = new QGroupBox(tr("Left Shifts")); + QGroupBox *roundPadL1 = new QGroupBox(tr("L1")); + QGroupBox *roundPadL2 = new QGroupBox(tr("L2")); + QGroupBox *roundPadL3 = new QGroupBox(tr("L3")); + QVBoxLayout *roundPadShiftsLVbox = new QVBoxLayout; + QVBoxLayout *roundPadL1Vbox = new QVBoxLayout; + QVBoxLayout *roundPadL2Vbox = new QVBoxLayout; + QVBoxLayout *roundPadL3Vbox = new QVBoxLayout; + b_shift_l1 = new QPushButton(tr("Q")); + b_shift_l2 = new QPushButton(tr("R")); + b_shift_l3 = new QPushButton(tr("F")); + roundPadL1Vbox->addWidget(b_shift_l1); + roundPadL2Vbox->addWidget(b_shift_l2); + roundPadL3Vbox->addWidget(b_shift_l3); + roundPadL1->setLayout(roundPadL1Vbox); + roundPadL2->setLayout(roundPadL2Vbox); + roundPadL3->setLayout(roundPadL3Vbox); + roundPadShiftsLVbox->addWidget(roundPadL1); + roundPadShiftsLVbox->addWidget(roundPadL2); + roundPadShiftsLVbox->addWidget(roundPadL3); + roundPadShiftsL->setLayout(roundPadShiftsLVbox); + b_shift_l1->setFixedWidth(PadButtonWidth); + b_shift_l2->setFixedWidth(PadButtonWidth); + b_shift_l3->setFixedWidth(PadButtonWidth); + + // Start / Select + QGroupBox *roundPadSystem = new QGroupBox(tr("System")); + QGroupBox *roundPadSelect = new QGroupBox(tr("Select")); + QGroupBox *roundPadStart = new QGroupBox(tr("Start")); + QVBoxLayout *roundPadSystemMainVbox = new QVBoxLayout; + QVBoxLayout *roundPadSystemVbox = new QVBoxLayout; + QVBoxLayout *roundPadSelectVbox = new QVBoxLayout; + QVBoxLayout *roundPadStartVbox = new QVBoxLayout; + b_select = new QPushButton(tr("Space")); + b_start = new QPushButton(tr("Enter")); + roundPadSelectVbox->addWidget(b_select); + roundPadStartVbox->addWidget(b_start); + roundPadSelect->setLayout(roundPadSelectVbox); + roundPadStart->setLayout(roundPadStartVbox); + roundPadSystemVbox->addWidget(roundPadSelect); + roundPadSystemVbox->addWidget(roundPadStart); + roundPadSystem->setLayout(roundPadSystemVbox); + roundPadSystemMainVbox->addWidget(roundPadSystem); + roundPadSystemMainVbox->addStretch(); + b_select->setFixedWidth(PadButtonWidth); + b_start->setFixedWidth(PadButtonWidth); + + // Right Shifts + QGroupBox *roundPadShiftsR = new QGroupBox(tr("Right Shifts")); + QGroupBox *roundPadR1 = new QGroupBox(tr("R1")); + QGroupBox *roundPadR2 = new QGroupBox(tr("R2")); + QGroupBox *roundPadR3 = new QGroupBox(tr("R3")); + QVBoxLayout *roundPadShiftsRVbox = new QVBoxLayout; + QVBoxLayout *roundPadR1Vbox = new QVBoxLayout; + QVBoxLayout *roundPadR2Vbox = new QVBoxLayout; + QVBoxLayout *roundPadR3Vbox = new QVBoxLayout; + b_shift_r1 = new QPushButton(tr("E")); + b_shift_r2 = new QPushButton(tr("T")); + b_shift_r3 = new QPushButton(tr("G")); + roundPadR1Vbox->addWidget(b_shift_r1); + roundPadR2Vbox->addWidget(b_shift_r2); + roundPadR3Vbox->addWidget(b_shift_r3); + roundPadR1->setLayout(roundPadR1Vbox); + roundPadR2->setLayout(roundPadR2Vbox); + roundPadR3->setLayout(roundPadR3Vbox); + roundPadShiftsRVbox->addWidget(roundPadR1); + roundPadShiftsRVbox->addWidget(roundPadR2); + roundPadShiftsRVbox->addWidget(roundPadR3); + roundPadShiftsR->setLayout(roundPadShiftsRVbox); + b_shift_r1->setFixedWidth(PadButtonWidth); + b_shift_r2->setFixedWidth(PadButtonWidth); + b_shift_r3->setFixedWidth(PadButtonWidth); + + // Action buttons + QGroupBox *roundpad_buttons = new QGroupBox(tr("Buttons")); + QGroupBox *roundPadSquare = new QGroupBox(tr("Square")); + QGroupBox *roundPadCross = new QGroupBox(tr("Cross")); + QGroupBox *roundPadCircle = new QGroupBox(tr("Circle")); + QGroupBox *roundPadTriangle = new QGroupBox(tr("Triangle")); + QVBoxLayout *roundpad_buttonsVBox = new QVBoxLayout; + QHBoxLayout *roundpad_buttonsHBox1 = new QHBoxLayout; + QHBoxLayout *roundpad_buttonsHBox2 = new QHBoxLayout; + QHBoxLayout *roundpad_buttonsHBox3 = new QHBoxLayout; + QHBoxLayout *roundpad_buttonsHBox21 = new QHBoxLayout; + QHBoxLayout *roundpad_buttonsHBox22 = new QHBoxLayout; + QHBoxLayout *roundpad_buttonsHBox23 = new QHBoxLayout; + QHBoxLayout *roundpad_buttonsHBox24 = new QHBoxLayout; + b_triangle = new QPushButton(tr("V")); + b_square = new QPushButton(tr("Z")); + b_circle = new QPushButton(tr("C")); + b_cross = new QPushButton(tr("X")); + roundpad_buttonsHBox21->addWidget(b_triangle); + roundpad_buttonsHBox22->addWidget(b_square); + roundpad_buttonsHBox23->addWidget(b_circle); + roundpad_buttonsHBox24->addWidget(b_cross); + roundPadTriangle->setLayout(roundpad_buttonsHBox21); + roundPadSquare->setLayout(roundpad_buttonsHBox22); + roundPadCircle->setLayout(roundpad_buttonsHBox23); + roundPadCross->setLayout(roundpad_buttonsHBox24); + roundpad_buttonsHBox1->addStretch(); + roundpad_buttonsHBox1->addWidget(roundPadTriangle); + roundpad_buttonsHBox1->addStretch(); + roundpad_buttonsHBox2->addWidget(roundPadSquare); + roundpad_buttonsHBox2->addWidget(roundPadCircle); + roundpad_buttonsHBox3->addStretch(); + roundpad_buttonsHBox3->addWidget(roundPadCross); + roundpad_buttonsHBox3->addStretch(); + roundpad_buttonsVBox->addLayout(roundpad_buttonsHBox1); + roundpad_buttonsVBox->addLayout(roundpad_buttonsHBox2); + roundpad_buttonsVBox->addLayout(roundpad_buttonsHBox3); + roundpad_buttons->setLayout(roundpad_buttonsVBox); + b_triangle->setFixedWidth(PadButtonWidth); + b_square->setFixedWidth(PadButtonWidth); + b_circle->setFixedWidth(PadButtonWidth); + b_cross->setFixedWidth(PadButtonWidth); + + // Right Analog Stick + QGroupBox *roundStickR = new QGroupBox(tr("Right Analog Stick")); + QVBoxLayout *roundStickRMainVBox = new QVBoxLayout; + QVBoxLayout *roundStickRVBox = new QVBoxLayout; + QHBoxLayout *roundStickRHBox1 = new QHBoxLayout; + QHBoxLayout *roundStickRHBox2 = new QHBoxLayout; + QHBoxLayout *roundStickRHBox3 = new QHBoxLayout; + b_up_rstick = new QPushButton(tr("PgUp")); + b_left_rstick = new QPushButton(tr("Home")); + b_right_rstick = new QPushButton(tr("End")); + b_down_rstick = new QPushButton(tr("PgDown")); + roundStickRHBox1->addWidget(b_up_rstick); + roundStickRHBox2->addWidget(b_left_rstick); + roundStickRHBox2->addWidget(b_right_rstick); + roundStickRHBox3->addWidget(b_down_rstick); + roundStickRVBox->addLayout(roundStickRHBox1); + roundStickRVBox->addLayout(roundStickRHBox2); + roundStickRVBox->addLayout(roundStickRHBox3); + roundStickR->setLayout(roundStickRVBox); + roundStickRMainVBox->addWidget(roundStickR); + roundStickRMainVBox->addStretch(); + b_up_rstick->setFixedWidth(PadButtonWidth); + b_left_rstick->setFixedWidth(PadButtonWidth); + b_right_rstick->setFixedWidth(PadButtonWidth); + b_down_rstick->setFixedWidth(PadButtonWidth); + + // Buttons + b_reset = new QPushButton(tr("By default")); + + b_ok = new QPushButton(tr("OK")); + + b_cancel = new QPushButton(tr("Cancel")); + b_cancel->setDefault(true); + connect(b_cancel, &QAbstractButton::clicked, this, &QWidget::close); + + // Handling + QButtonGroup *padButtons = new QButtonGroup(this); + padButtons->addButton(b_left_lstick, 1); + padButtons->addButton(b_down_lstick, 2); + padButtons->addButton(b_right_lstick, 3); + padButtons->addButton(b_up_lstick, 4); + + padButtons->addButton(b_left, 5); + padButtons->addButton(b_down, 6); + padButtons->addButton(b_right, 7); + padButtons->addButton(b_up, 8); + + padButtons->addButton(b_shift_l1, 9); + padButtons->addButton(b_shift_l2, 10); + padButtons->addButton(b_shift_l3, 11); + + padButtons->addButton(b_start, 12); + padButtons->addButton(b_select, 13); + + padButtons->addButton(b_shift_r1, 14); + padButtons->addButton(b_shift_r2, 15); + padButtons->addButton(b_shift_r3, 16); + + padButtons->addButton(b_square, 17); + padButtons->addButton(b_cross, 18); + padButtons->addButton(b_circle, 19); + padButtons->addButton(b_triangle, 20); + + padButtons->addButton(b_left_rstick, 21); + padButtons->addButton(b_down_rstick, 22); + padButtons->addButton(b_right_rstick, 23); + padButtons->addButton(b_up_rstick, 24); + + padButtons->addButton(b_reset, 25); + padButtons->addButton(b_ok, 26); + padButtons->addButton(b_cancel, 27); + + connect(padButtons, SIGNAL(buttonClicked(int)), this, SLOT(OnPadButtonClicked(int))); + + // Main layout + QHBoxLayout *hbox1 = new QHBoxLayout; + hbox1->addLayout(roundStickLMainVBox); + hbox1->addLayout(roundPadControlsMainVBox); + hbox1->addWidget(roundPadShiftsL); + hbox1->addLayout(roundPadSystemMainVbox); + hbox1->addWidget(roundPadShiftsR); + hbox1->addWidget(roundpad_buttons); + hbox1->addLayout(roundStickRMainVBox); + + QHBoxLayout *hbox2 = new QHBoxLayout; + hbox2->addWidget(b_reset); + hbox2->addStretch(); + hbox2->addWidget(b_ok); + hbox2->addWidget(b_cancel); + + QVBoxLayout *vbox = new QVBoxLayout; + vbox->addLayout(hbox1); + vbox->addLayout(hbox2); + setLayout(vbox); + + setWindowTitle(tr("Input Settings")); + + g_kbpad_config.load(); + UpdateLabel(); +} + +void pad_settings_dialog::keyPressEvent(QKeyEvent *keyEvent) +{ + m_key_pressed = true; + + cfg::int32* entry = nullptr; + + switch (m_button_id) + { + case id_pad_lstick_left: entry = &g_kbpad_config.left_stick_left; break; + case id_pad_lstick_down: entry = &g_kbpad_config.left_stick_down; break; + case id_pad_lstick_right: entry = &g_kbpad_config.left_stick_right; break; + case id_pad_lstick_up: entry = &g_kbpad_config.left_stick_up; break; + + case id_pad_left: entry = &g_kbpad_config.left; break; + case id_pad_down: entry = &g_kbpad_config.down; break; + case id_pad_right: entry = &g_kbpad_config.right; break; + case id_pad_up: entry = &g_kbpad_config.up; break; + + case id_pad_l1: entry = &g_kbpad_config.l1; break; + case id_pad_l2: entry = &g_kbpad_config.l2; break; + case id_pad_l3: entry = &g_kbpad_config.l3; break; + + case id_pad_start: entry = &g_kbpad_config.start; break; + case id_pad_select: entry = &g_kbpad_config.select; break; + + case id_pad_r1: entry = &g_kbpad_config.r1; break; + case id_pad_r2: entry = &g_kbpad_config.r2; break; + case id_pad_r3: entry = &g_kbpad_config.r3; break; + + case id_pad_square: entry = &g_kbpad_config.square; break; + case id_pad_cross: entry = &g_kbpad_config.cross; break; + case id_pad_circle: entry = &g_kbpad_config.circle; break; + case id_pad_triangle: entry = &g_kbpad_config.triangle; break; + case id_pad_rstick_left: entry = &g_kbpad_config.right_stick_left; break; + case id_pad_rstick_down: entry = &g_kbpad_config.right_stick_down; break; + case id_pad_rstick_right: entry = &g_kbpad_config.right_stick_right; break; + case id_pad_rstick_up: entry = &g_kbpad_config.right_stick_up; break; + + case 0: break; + default: LOG_ERROR(HLE, "Unknown button ID: %d", m_button_id); break; + } + + if (entry) + { + // TODO: do not modify config + entry->from_string(std::to_string(keyEvent->key())); + } + + SwitchButtons(true); // enable all buttons + m_button_id = 0; // reset current button id + m_key_pressed = false; + UpdateLabel(); +} + +void pad_settings_dialog::UpdateLabel() +{ + // Get button labels from .ini + b_up_lstick->setText(GetKeyName(g_kbpad_config.left_stick_up)); + b_down_lstick->setText(GetKeyName(g_kbpad_config.left_stick_down)); + b_left_lstick->setText(GetKeyName(g_kbpad_config.left_stick_left)); + b_right_lstick->setText(GetKeyName(g_kbpad_config.left_stick_right)); + + b_up->setText(GetKeyName(g_kbpad_config.up)); + b_down->setText(GetKeyName(g_kbpad_config.down)); + b_left->setText(GetKeyName(g_kbpad_config.left)); + b_right->setText(GetKeyName(g_kbpad_config.right)); + + b_shift_l1->setText(GetKeyName(g_kbpad_config.l1)); + b_shift_l2->setText(GetKeyName(g_kbpad_config.l2)); + b_shift_l3->setText(GetKeyName(g_kbpad_config.l3)); + + b_start->setText(GetKeyName(g_kbpad_config.start)); + b_select->setText(GetKeyName(g_kbpad_config.select)); + + b_shift_r1->setText(GetKeyName(g_kbpad_config.r1)); + b_shift_r2->setText(GetKeyName(g_kbpad_config.r2)); + b_shift_r3->setText(GetKeyName(g_kbpad_config.r3)); + + b_square->setText(GetKeyName(g_kbpad_config.square)); + b_cross->setText(GetKeyName(g_kbpad_config.cross)); + b_circle->setText(GetKeyName(g_kbpad_config.circle)); + b_triangle->setText(GetKeyName(g_kbpad_config.triangle)); + + b_up_rstick->setText(GetKeyName(g_kbpad_config.right_stick_up)); + b_down_rstick->setText(GetKeyName(g_kbpad_config.right_stick_down)); + b_left_rstick->setText(GetKeyName(g_kbpad_config.right_stick_left)); + b_right_rstick->setText(GetKeyName(g_kbpad_config.right_stick_right)); +} + +void pad_settings_dialog::UpdateTimerLabel(const u32 id) +{ + // Lambda used to update label. The 47 is magical. + auto UpdateLabel = [=](QPushButton* target) { + target->setText(QString::number(m_seconds + 47)); + }; + + switch (id) + { + case id_pad_lstick_left: UpdateLabel(b_left_lstick); break; + case id_pad_lstick_down: UpdateLabel(b_down_lstick); break; + case id_pad_lstick_right: UpdateLabel(b_right_lstick); break; + case id_pad_lstick_up: UpdateLabel(b_up_lstick); break; + + case id_pad_left: UpdateLabel(b_left); break; + case id_pad_down: UpdateLabel(b_down); break; + case id_pad_right: UpdateLabel(b_right); break; + case id_pad_up: UpdateLabel(b_up); break; + + case id_pad_l1: UpdateLabel(b_shift_l1); break; + case id_pad_l2: UpdateLabel(b_shift_l2); break; + case id_pad_l3: UpdateLabel(b_shift_l3); break; + + case id_pad_start: UpdateLabel(b_start); break; + case id_pad_select: UpdateLabel(b_select); break; + + case id_pad_r1: UpdateLabel(b_shift_r1); break; + case id_pad_r2: UpdateLabel(b_shift_r2); break; + case id_pad_r3: UpdateLabel(b_shift_r3); break; + + case id_pad_square: UpdateLabel(b_square); break; + case id_pad_cross: UpdateLabel(b_cross); break; + case id_pad_circle: UpdateLabel(b_circle); break; + case id_pad_triangle: UpdateLabel(b_triangle); break; + + case id_pad_rstick_left: UpdateLabel(b_left_rstick); break; + case id_pad_rstick_down: UpdateLabel(b_down_rstick); break; + case id_pad_rstick_right: UpdateLabel(b_right_rstick); break; + case id_pad_rstick_up: UpdateLabel(b_up_rstick); break; + + default: LOG_ERROR(HLE, "Unknown button ID: %d", id); break; + } +} + +void pad_settings_dialog::SwitchButtons(const bool IsEnabled) +{ + b_up_lstick->setEnabled(IsEnabled); + b_down_lstick->setEnabled(IsEnabled); + b_left_lstick->setEnabled(IsEnabled); + b_right_lstick->setEnabled(IsEnabled); + + b_up->setEnabled(IsEnabled); + b_down->setEnabled(IsEnabled); + b_left->setEnabled(IsEnabled); + b_right->setEnabled(IsEnabled); + + b_shift_l1->setEnabled(IsEnabled); + b_shift_l2->setEnabled(IsEnabled); + b_shift_l3->setEnabled(IsEnabled); + + b_start->setEnabled(IsEnabled); + b_select->setEnabled(IsEnabled); + + b_shift_r1->setEnabled(IsEnabled); + b_shift_r2->setEnabled(IsEnabled); + b_shift_r3->setEnabled(IsEnabled); + + b_square->setEnabled(IsEnabled); + b_cross->setEnabled(IsEnabled); + b_circle->setEnabled(IsEnabled); + b_triangle->setEnabled(IsEnabled); + + b_up_rstick->setEnabled(IsEnabled); + b_down_rstick->setEnabled(IsEnabled); + b_left_rstick->setEnabled(IsEnabled); + b_right_rstick->setEnabled(IsEnabled); + + b_ok->setEnabled(IsEnabled); + b_cancel->setEnabled(IsEnabled); + b_reset->setEnabled(IsEnabled); +} + +void pad_settings_dialog::RunTimer(const u32 seconds, const u32 id) +{ + m_seconds = seconds; + clock_t t1, t2; + t1 = t2 = clock() / CLOCKS_PER_SEC; + while (m_seconds) + { + if (t1 / CLOCKS_PER_SEC + 1 <= (t2 = clock()) / CLOCKS_PER_SEC) + { + UpdateTimerLabel(id); + m_seconds--; + t1 = t2; + } + + if (m_key_pressed) + { + m_seconds = 0; + break; + } + } +} + +void pad_settings_dialog::Init(const u32 max_connect) +{ + memset(&m_info, 0, sizeof(PadInfo)); + m_info.max_connect = max_connect; + LoadSettings(); + m_info.now_connect = std::min(m_pads.size(), (size_t)max_connect); +} + +void pad_settings_dialog::LoadSettings() +{ + g_kbpad_config.load(); + + //Fixed assign change, default is both sensor and press off + m_pads.emplace_back( + CELL_PAD_STATUS_CONNECTED | CELL_PAD_STATUS_ASSIGN_CHANGES, + CELL_PAD_SETTING_PRESS_OFF | CELL_PAD_SETTING_SENSOR_OFF, + CELL_PAD_CAPABILITY_PS3_CONFORMITY | CELL_PAD_CAPABILITY_PRESS_MODE, + CELL_PAD_DEV_TYPE_STANDARD); + + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, g_kbpad_config.left, CELL_PAD_CTRL_LEFT); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, g_kbpad_config.down, CELL_PAD_CTRL_DOWN); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, g_kbpad_config.right, CELL_PAD_CTRL_RIGHT); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, g_kbpad_config.up, CELL_PAD_CTRL_UP); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, g_kbpad_config.start, CELL_PAD_CTRL_START); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, g_kbpad_config.r3, CELL_PAD_CTRL_R3); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, g_kbpad_config.l3, CELL_PAD_CTRL_L3); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, g_kbpad_config.select, CELL_PAD_CTRL_SELECT); + + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, g_kbpad_config.square, CELL_PAD_CTRL_SQUARE); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, g_kbpad_config.cross, CELL_PAD_CTRL_CROSS); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, g_kbpad_config.circle, CELL_PAD_CTRL_CIRCLE); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, g_kbpad_config.triangle, CELL_PAD_CTRL_TRIANGLE); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, g_kbpad_config.r1, CELL_PAD_CTRL_R1); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, g_kbpad_config.l1, CELL_PAD_CTRL_L1); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, g_kbpad_config.r2, CELL_PAD_CTRL_R2); + m_pads[0].m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, g_kbpad_config.l2, CELL_PAD_CTRL_L2); + + m_pads[0].m_sticks.emplace_back(CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X, g_kbpad_config.left_stick_left, g_kbpad_config.left_stick_right); + m_pads[0].m_sticks.emplace_back(CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y, g_kbpad_config.left_stick_up, g_kbpad_config.left_stick_down); + m_pads[0].m_sticks.emplace_back(CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_X, g_kbpad_config.right_stick_left, g_kbpad_config.right_stick_right); + m_pads[0].m_sticks.emplace_back(CELL_PAD_BTN_OFFSET_ANALOG_RIGHT_Y, g_kbpad_config.right_stick_up, g_kbpad_config.right_stick_down); +} + +const QString pad_settings_dialog::GetKeyName(const u32 keyCode) +{ + //TODO what about numpad? + return QKeySequence(keyCode).toString(); +} + +void pad_settings_dialog::OnPadButtonClicked(int id) +{ + if (id != id_reset_parameters && id != id_ok) + { + m_button_id = id; + SwitchButtons(false); // disable all buttons, needed for using Space, Enter and other specific buttons + //RunTimer(3, event.GetId()); // TODO: Currently, timer disabled. Use by later, have some strange problems + //SwitchButtons(true); // needed, if timer enabled + UpdateLabel(); + } + + else + { + switch (id) + { + case id_reset_parameters: g_kbpad_config.from_default(); UpdateLabel(); break; + case id_ok: g_kbpad_config.save(); QDialog::accept(); break; + case id_cancel: break; + } + } +} diff --git a/rpcs3/rpcs3qt/pad_settings_dialog.h b/rpcs3/rpcs3qt/pad_settings_dialog.h new file mode 100644 index 0000000000..f7770b6791 --- /dev/null +++ b/rpcs3/rpcs3qt/pad_settings_dialog.h @@ -0,0 +1,116 @@ +#ifndef PADSETTINGSDIALOG_H +#define PADSETTINGSDIALOG_H + +#include +#include +#include +#include "keyboard_pad_handler.h" +#include "Utilities/types.h" +#include "Utilities/Config.h" +#include "Emu/Io/PadHandler.h" +#include "stdafx.h" +#include "Emu/System.h" + +enum button_ids +{ + id_pad_lstick_left = 0x1, + id_pad_lstick_down, + id_pad_lstick_right, + id_pad_lstick_up, + + id_pad_left, + id_pad_down, + id_pad_right, + id_pad_up, + + id_pad_l1, + id_pad_l2, + id_pad_l3, + + id_pad_start, + id_pad_select, + + id_pad_r1, + id_pad_r2, + id_pad_r3, + + id_pad_square, + id_pad_cross, + id_pad_circle, + id_pad_triangle, + + id_pad_rstick_left, + id_pad_rstick_down, + id_pad_rstick_right, + id_pad_rstick_up, + + id_reset_parameters, + id_ok, + id_cancel +}; + +struct pad_buttons +{ + QPushButton* b_up_lstick; + QPushButton* b_down_lstick; + QPushButton* b_left_lstick; + QPushButton* b_right_lstick; + + QPushButton* b_up; + QPushButton* b_down; + QPushButton* b_left; + QPushButton* b_right; + + QPushButton* b_shift_l1; + QPushButton* b_shift_l2; + QPushButton* b_shift_l3; + + QPushButton* b_start; + QPushButton* b_select; + + QPushButton* b_shift_r1; + QPushButton* b_shift_r2; + QPushButton* b_shift_r3; + + QPushButton* b_square; + QPushButton* b_cross; + QPushButton* b_circle; + QPushButton* b_triangle; + + QPushButton* b_up_rstick; + QPushButton* b_down_rstick; + QPushButton* b_left_rstick; + QPushButton* b_right_rstick; + + QPushButton* b_ok; + QPushButton* b_cancel; + QPushButton* b_reset; +}; + +class pad_settings_dialog : public QDialog, pad_buttons, PadHandlerBase +{ + Q_OBJECT + +private slots : + void OnPadButtonClicked(int id); + +private: + u32 m_seconds; + u32 m_button_id; + bool m_key_pressed; + QAction *onButtonClickedAct; + +public: + // TODO get Init to work + virtual void Init(const u32 max_connect) override; + explicit pad_settings_dialog(QWidget *parent = 0); + void keyPressEvent(QKeyEvent *keyEvent); + void UpdateLabel(); + void UpdateTimerLabel(const u32 id); + void SwitchButtons(const bool IsEnabled); + void RunTimer(const u32 seconds, const u32 id); + void LoadSettings(); + const QString GetKeyName(const u32 keyCode); +}; + +#endif // PADSETTINGSDIALOG_H diff --git a/rpcs3/rpcs3qt/padsettingsdialog.cpp b/rpcs3/rpcs3qt/padsettingsdialog.cpp deleted file mode 100644 index b78f382048..0000000000 --- a/rpcs3/rpcs3qt/padsettingsdialog.cpp +++ /dev/null @@ -1,107 +0,0 @@ -#ifdef QT_UI - -#include -#include -#include -#include -#include - -#include "padsettingsdialog.h" - -PadSettingsDialog::PadSettingsDialog(QWidget *parent) : QDialog(parent) -{ - // Left Analog Stick - QGroupBox *roundStickL = new QGroupBox(tr("Left Analog Stick")); - - // D-Pad - QGroupBox *roundPadControls = new QGroupBox(tr("D-Pad")); - - // Left Shifts - QGroupBox *roundPadShiftsL = new QGroupBox(tr("Left Shifts")); - QGroupBox *roundPadL1 = new QGroupBox(tr("L1")); - QGroupBox *roundPadL2 = new QGroupBox(tr("L2")); - QGroupBox *roundPadL3 = new QGroupBox(tr("L3")); - - QVBoxLayout *roundPadShiftsLVbox = new QVBoxLayout; - roundPadShiftsLVbox->addWidget(roundPadL1); - roundPadShiftsLVbox->addWidget(roundPadL2); - roundPadShiftsLVbox->addWidget(roundPadL3); - roundPadShiftsL->setLayout(roundPadShiftsLVbox); - - // Start / Select - QGroupBox *roundPadSystem = new QGroupBox(tr("System")); - QGroupBox *roundPadSelect = new QGroupBox(tr("Select")); - QGroupBox *roundPadStart = new QGroupBox(tr("Start")); - - QVBoxLayout *roundPadSystemVbox = new QVBoxLayout; - roundPadSystemVbox->addWidget(roundPadSelect); - roundPadSystemVbox->addWidget(roundPadStart); - roundPadSystem->setLayout(roundPadSystemVbox); - - // Right Shifts - QGroupBox *roundPadShiftsR = new QGroupBox(tr("Right Shifts")); - QGroupBox *roundPadR1 = new QGroupBox(tr("R1")); - QGroupBox *roundPadR2 = new QGroupBox(tr("R2")); - QGroupBox *roundPadR3 = new QGroupBox(tr("R3")); - - QVBoxLayout *roundPadShiftsRVbox = new QVBoxLayout; - roundPadShiftsRVbox->addWidget(roundPadR1); - roundPadShiftsRVbox->addWidget(roundPadR2); - roundPadShiftsRVbox->addWidget(roundPadR3); - roundPadShiftsR->setLayout(roundPadShiftsRVbox); - - // Action buttons - QGroupBox *roundPadButtons = new QGroupBox(tr("Buttons")); - QGroupBox *roundPadSquare = new QGroupBox(tr("Square")); - QGroupBox *roundPadCross = new QGroupBox(tr("Cross")); - QGroupBox *roundPadCircle = new QGroupBox(tr("Circle")); - QGroupBox *roundPadTriangle = new QGroupBox(tr("Triangle")); - - QHBoxLayout *roundPadButtonsHbox = new QHBoxLayout; - roundPadButtonsHbox->addWidget(roundPadSquare); - roundPadButtonsHbox->addWidget(roundPadCircle); - - QVBoxLayout *roundPadButtonsVbox = new QVBoxLayout; - roundPadButtonsVbox->addWidget(roundPadTriangle); - roundPadButtonsVbox->addLayout(roundPadButtonsHbox); - roundPadButtonsVbox->addWidget(roundPadCross); - roundPadButtons->setLayout(roundPadButtonsVbox); - - // Right Analog Stick - QGroupBox *roundStickR = new QGroupBox(tr("Right Analog Stick")); - - // Buttons - QPushButton *defaultButton = new QPushButton(tr("By default")); - - QPushButton *okButton = new QPushButton(tr("OK")); - connect(okButton, &QAbstractButton::clicked, this, &QDialog::accept); - - QPushButton *cancelButton = new QPushButton(tr("Cancel")); - cancelButton->setDefault(true); - connect(cancelButton, &QAbstractButton::clicked, this, &QWidget::close); - - // Main layout - QHBoxLayout *hbox1 = new QHBoxLayout; - hbox1->addWidget(roundStickL); - hbox1->addWidget(roundPadControls); - hbox1->addWidget(roundPadShiftsL); - hbox1->addWidget(roundPadSystem); - hbox1->addWidget(roundPadShiftsR); - hbox1->addWidget(roundPadButtons); - hbox1->addWidget(roundStickR); - - QHBoxLayout *hbox2 = new QHBoxLayout; - hbox2->addWidget(defaultButton); - hbox2->addStretch(); - hbox2->addWidget(okButton); - hbox2->addWidget(cancelButton); - - QVBoxLayout *vbox = new QVBoxLayout; - vbox->addLayout(hbox1); - vbox->addLayout(hbox2); - setLayout(vbox); - - setWindowTitle(tr("PAD Settings")); -} - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/padsettingsdialog.h b/rpcs3/rpcs3qt/padsettingsdialog.h deleted file mode 100644 index 9aed1f5216..0000000000 --- a/rpcs3/rpcs3qt/padsettingsdialog.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef PADSETTINGS_H -#define PADSETTINGS_H - -#include - -class PadSettingsDialog : public QDialog -{ - Q_OBJECT - -public: - explicit PadSettingsDialog(QWidget *parent = 0); -}; - -#endif // PADSETTINGS_H diff --git a/rpcs3/rpcs3qt/qml.qrc b/rpcs3/rpcs3qt/qml.qrc deleted file mode 100644 index 69145a822f..0000000000 --- a/rpcs3/rpcs3qt/qml.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - qml/main.qml - - diff --git a/rpcs3/rpcs3qt/qml/main.qml b/rpcs3/rpcs3qt/qml/main.qml deleted file mode 100644 index 754c325a63..0000000000 --- a/rpcs3/rpcs3qt/qml/main.qml +++ /dev/null @@ -1,66 +0,0 @@ -import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Window 2.1 -import GLViewer 1.0 - -ApplicationWindow { - visible: true - title: qsTr("RPCS3 Qt") - width: Screen.desktopAvailableWidth / 2 - height: Screen.desktopAvailableHeight / 2 - - menuBar: MenuBar { - Menu { - title: qsTr("&Boot") - MenuItem { text: qsTr("&Boot Game...") } - MenuItem { text: qsTr("&Boot Game and Start...") } - MenuItem { text: qsTr("&Install PKG") } - MenuSeparator {} - MenuItem { text: qsTr("Boot &(S)ELF") } - MenuSeparator {} - MenuItem { text: qsTr("E\&xit"); onTriggered: Qt.quit() } - } - Menu { - title: qsTr("&System") - MenuItem { text: qsTr("&Pause") } - MenuItem { text: qsTr("&Stop") } - MenuSeparator {} - MenuItem { text: qsTr("Send '&Open System Menu' command") } - MenuItem { text: qsTr("Send 'E&xit' command") } - } - Menu { - title: qsTr("&Config") - MenuItem { text: qsTr("&Settings") } - MenuItem { text: qsTr("&PAD Settings") } - MenuSeparator {} - MenuItem { text: qsTr("Virtual &File System Manager") } - MenuItem { text: qsTr("Virtual &HDD Manager") } - } - Menu { - title: qsTr("&Tools") - MenuItem { text: qsTr("&ELF Compiler") } - MenuItem { text: qsTr("&Memory Viewer") } - MenuItem { text: qsTr("&RSX Debugger") } - } - Menu { - title: qsTr("&Help") - MenuItem { text: qsTr("&About...") } - } - } - - GLViewer {} - - Rectangle { - color: Qt.rgba(0, 0.5, 0.35); - height: Math.round(parent.height / 2) - width: height - radius: width - anchors.centerIn: parent - Text { - anchors.centerIn: parent - font.pixelSize: parent.height / 2 - text: "Qt" - } - } - -} diff --git a/rpcs3/rpcs3qt/register_editor_dialog.cpp b/rpcs3/rpcs3qt/register_editor_dialog.cpp new file mode 100644 index 0000000000..c9f428da91 --- /dev/null +++ b/rpcs3/rpcs3qt/register_editor_dialog.cpp @@ -0,0 +1,207 @@ + +#include "register_editor_dialog.h" + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } +inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); } +inline std::string sstr(const QVariant& _in) { return sstr(_in.toString()); } + +register_editor_dialog::register_editor_dialog(QWidget *parent, u32 _pc, const std::shared_ptr& _cpu, CPUDisAsm* _disasm) + : QDialog(parent) + , pc(_pc) + , cpu(_cpu) + , disasm(_disasm) +{ + setWindowTitle(tr("Edit registers")); + setAttribute(Qt::WA_DeleteOnClose); + + QVBoxLayout* vbox_panel = new QVBoxLayout(); + QHBoxLayout* hbox_panel = new QHBoxLayout(); + QVBoxLayout* vbox_left_panel = new QVBoxLayout(); + QVBoxLayout* vbox_right_panel = new QVBoxLayout(); + QHBoxLayout* hbox_button_panel = new QHBoxLayout(); + + QLabel* t1_text = new QLabel(tr("Register: "), this); + QLabel* t2_text = new QLabel(tr("Value (Hex):"), this); + + QPushButton* button_ok = new QPushButton(tr("&Ok")); + QPushButton* button_cancel = new QPushButton(tr("&Cancel")); + button_ok->setFixedWidth(80); + button_cancel->setFixedWidth(80); + + t1_register = new QComboBox(this); + t2_value = new QLineEdit(this); + t2_value->setFixedWidth(200); + + // Layouts + vbox_left_panel->addWidget(t1_text); + vbox_left_panel->addWidget(t2_text); + + vbox_right_panel->addWidget(t1_register); + vbox_right_panel->addWidget(t2_value); + + hbox_button_panel->addWidget(button_ok); + hbox_button_panel->addWidget(button_cancel); + hbox_button_panel->setAlignment(Qt::AlignCenter); + + switch (g_system) + { + case system_type::ps3: + { + if (_cpu->id_type() == 1) + { + for (int i = 0; i < 32; i++) t1_register->addItem(qstr(fmt::format("GPR[%d]", i))); + for (int i = 0; i < 32; i++) t1_register->addItem(qstr(fmt::format("FPR[%d]", i))); + for (int i = 0; i < 32; i++) t1_register->addItem(qstr(fmt::format("VR[%d]", i))); + t1_register->addItem("CR"); + t1_register->addItem("LR"); + t1_register->addItem("CTR"); + //t1_register->addItem("XER"); + //t1_register->addItem("FPSCR"); + } + else + { + for (int i = 0; i < 128; i++) t1_register->addItem(qstr(fmt::format("GPR[%d]", i))); + } + + break; + } + + default: + QMessageBox::critical(this, tr("Error"), tr("Not supported thread.")); + return; + } + + // Main Layout + hbox_panel->addLayout(vbox_left_panel); + hbox_panel->addSpacing(10); + hbox_panel->addLayout(vbox_right_panel); + vbox_panel->addLayout(hbox_panel); + vbox_panel->addSpacing(10); + vbox_panel->addLayout(hbox_button_panel); + setLayout(vbox_panel); + setModal(true); + + // Events + connect(button_ok, &QAbstractButton::pressed, this, [=](){OnOkay(_cpu); accept();}); + connect(button_cancel, &QAbstractButton::pressed, this, ®ister_editor_dialog::reject); + connect(t1_register, static_cast(&QComboBox::currentIndexChanged), this, ®ister_editor_dialog::updateRegister); +} + +void register_editor_dialog::updateRegister() +{ + const auto cpu = this->cpu.lock(); + + std::string reg = sstr(t1_register->itemData(t1_register->currentIndex())); + std::string str; + + if (g_system == system_type::ps3 && cpu->id_type() == 1) + { + auto& ppu = *static_cast(cpu.get()); + + std::size_t first_brk = reg.find('['); + if (first_brk != -1) + { + long reg_index = std::atol(reg.substr(first_brk + 1, reg.length() - first_brk - 2).c_str()); + if (reg.find("GPR") == 0) str = fmt::format("%016llx", ppu.gpr[reg_index]); + if (reg.find("FPR") == 0) str = fmt::format("%016llx", ppu.fpr[reg_index]); + if (reg.find("VR") == 0) str = fmt::format("%016llx%016llx", ppu.vr[reg_index]._u64[1], ppu.vr[reg_index]._u64[0]); + } + if (reg == "CR") str = fmt::format("%08x", ppu.cr_pack()); + if (reg == "LR") str = fmt::format("%016llx", ppu.lr); + if (reg == "CTR") str = fmt::format("%016llx", ppu.ctr); + } + else if (g_system == system_type::ps3 && cpu->id_type() != 1) + { + auto& spu = *static_cast(cpu.get()); + + std::string::size_type first_brk = reg.find('['); + if (first_brk != std::string::npos) + { + long reg_index; + reg_index = atol(reg.substr(first_brk + 1, reg.length() - 2).c_str()); + if (reg.find("GPR") == 0) str = fmt::format("%016llx%016llx", spu.gpr[reg_index]._u64[1], spu.gpr[reg_index]._u64[0]); + } + } + + t2_value->setText(qstr(str)); +} + +void register_editor_dialog::OnOkay(const std::shared_ptr& _cpu) +{ + const auto cpu = _cpu.get(); + + std::string reg = sstr(t1_register->itemData(t1_register->currentIndex())); + std::string value = sstr(t2_value->text()); + + if (g_system == system_type::ps3 && cpu->id_type() == 1) + { + auto& ppu = *static_cast(cpu); + + while (value.length() < 32) value = "0" + value; + const auto first_brk = reg.find('['); + try + { + if (first_brk != -1) + { + const long reg_index = std::atol(reg.substr(first_brk + 1, reg.length() - first_brk - 2).c_str()); + if (reg.find("GPR") == 0 || reg.find("FPR") == 0) + { + const ullong reg_value = std::stoull(value.substr(16, 31), 0, 16); + if (reg.find("GPR") == 0) ppu.gpr[reg_index] = (u64)reg_value; + if (reg.find("FPR") == 0) (u64&)ppu.fpr[reg_index] = (u64)reg_value; + return; + } + if (reg.find("VR") == 0) + { + const ullong reg_value0 = std::stoull(value.substr(16, 31), 0, 16); + const ullong reg_value1 = std::stoull(value.substr(0, 15), 0, 16); + ppu.vr[reg_index]._u64[0] = (u64)reg_value0; + ppu.vr[reg_index]._u64[1] = (u64)reg_value1; + return; + } + } + if (reg == "LR" || reg == "CTR") + { + const ullong reg_value = std::stoull(value.substr(16, 31), 0, 16); + if (reg == "LR") ppu.lr = (u64)reg_value; + if (reg == "CTR") ppu.ctr = (u64)reg_value; + return; + } + if (reg == "CR") + { + const ullong reg_value = std::stoull(value.substr(24, 31), 0, 16); + if (reg == "CR") ppu.cr_unpack((u32)reg_value); + return; + } + } + catch (std::invalid_argument&) //if any of the stoull conversion fail + { + } + } + else if (g_system == system_type::ps3 && cpu->id_type() != 1) + { + auto& spu = *static_cast(cpu); + + while (value.length() < 32) value = "0" + value; + const auto first_brk = reg.find('['); + try + { + if (first_brk != -1) + { + const long reg_index = std::atol(reg.substr(first_brk + 1, reg.length() - 2).c_str()); + if (reg.find("GPR") == 0) + { + const ullong reg_value0 = std::stoull(value.substr(16, 31), 0, 16); + const ullong reg_value1 = std::stoull(value.substr(0, 15), 0, 16); + spu.gpr[reg_index]._u64[0] = (u64)reg_value0; + spu.gpr[reg_index]._u64[1] = (u64)reg_value1; + return; + } + } + } + catch (std::invalid_argument&) + { + } + } + QMessageBox::critical(this, tr("Error"), tr("This value could not be converted.\nNo changes were made.")); +} diff --git a/rpcs3/rpcs3qt/register_editor_dialog.h b/rpcs3/rpcs3qt/register_editor_dialog.h new file mode 100644 index 0000000000..a2f47c491a --- /dev/null +++ b/rpcs3/rpcs3qt/register_editor_dialog.h @@ -0,0 +1,39 @@ +#ifndef REGISTEREDITOR_H +#define REGISTEREDITOR_H + +#include "stdafx.h" +#include "Emu/System.h" +#include "Emu/CPU/CPUThread.h" +#include "Emu/CPU/CPUDisAsm.h" +#include "Emu/Cell/PPUThread.h" +#include "Emu/Cell/SPUThread.h" + +#include +#include +#include +#include +#include +#include +#include + +class register_editor_dialog : public QDialog +{ + u32 pc; + CPUDisAsm* disasm; + QComboBox* t1_register; + QLineEdit* t2_value; + QLabel* t3_preview; + +public: + std::weak_ptr cpu; + +public: + register_editor_dialog(QWidget *parent, u32 _pc, const std::shared_ptr& _cpu, CPUDisAsm* _disasm); + + void updateRegister(); + +private: + void OnOkay(const std::shared_ptr& _cpu); +}; + +#endif // REGISTEREDITOR_H diff --git a/rpcs3/rpcs3qt/rpcs3qt.pro b/rpcs3/rpcs3qt/rpcs3qt.pro deleted file mode 100644 index b3e81ce4fb..0000000000 --- a/rpcs3/rpcs3qt/rpcs3qt.pro +++ /dev/null @@ -1,20 +0,0 @@ -# Qt5.2+ project for rpcs3. Works on Windows, Linux and Mac OSX -QT += gui opengl quick widgets -CONFIG += c++11 - -TARGET = rpcs3-qt - -# Qt UI -SOURCES += $$P/rpcs3qt/*.cpp -HEADERS += $$P/rpcs3qt/*.h - -# RPCS3 -HEADERS += $$P/stdafx.h -INCLUDEPATH += $$P $$P/.. -DEFINES += QT_UI - -# Installation path -# target.path = - -# This line is needed for Qt 5.5 or higher -win32:LIBS += opengl32.lib diff --git a/rpcs3/rpcs3qt/rsx_debugger.cpp b/rpcs3/rpcs3qt/rsx_debugger.cpp new file mode 100644 index 0000000000..a837decfc1 --- /dev/null +++ b/rpcs3/rpcs3qt/rsx_debugger.cpp @@ -0,0 +1,1189 @@ + +#include "rsx_debugger.h" + +enum GCMEnumTypes +{ + CELL_GCM_ENUM, + CELL_GCM_PRIMITIVE_ENUM, +}; + +inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); } + +rsx_debugger::rsx_debugger(QWidget* parent) + : QDialog(parent) + , m_item_count(37) + , m_addr(0x0) + , m_cur_texture(0) + , exit(false) +{ + setWindowTitle(tr("RSX Debugger")); + setAttribute(Qt::WA_DeleteOnClose); + + //Fonts and Colors + pSize = 8; + mono = QFontDatabase::systemFont(QFontDatabase::FixedFont); + mono.setPointSize(pSize); + fontMetrics = new QFontMetrics(mono); + palette_bg = new QPalette(); + palette_bg->setColor(backgroundRole(), QColor(240, 240, 240)); + QHBoxLayout* hbox_panel = new QHBoxLayout(); + + //Tools + QVBoxLayout* vbox_tools = new QVBoxLayout(); + + // Controls + QGroupBox* gb_controls = new QGroupBox(tr("RSX Debugger Controls"), this); + QHBoxLayout* hbox_controls = new QHBoxLayout(); + + // Controls: Address + QGroupBox* gb_controls_addr = new QGroupBox(tr("Address:"), this); + QHBoxLayout* hbox_controls_addr = new QHBoxLayout(); + t_addr = new QLineEdit(); + t_addr->setFont(mono); + t_addr->setPlaceholderText("00000000"); + t_addr->setMaxLength(8); + t_addr->setMaximumWidth(65); + hbox_controls_addr->addWidget(t_addr); + gb_controls_addr->setLayout(hbox_controls_addr); + + // Controls: Go to + QGroupBox* gb_controls_goto = new QGroupBox(tr("Go to:"), this); + QHBoxLayout* hbox_controls_goto = new QHBoxLayout(); + QPushButton* b_goto_get = new QPushButton(tr("Get"), this); + QPushButton* b_goto_put = new QPushButton(tr("Put"), this); + b_goto_get->setAutoDefault(false); + b_goto_put->setAutoDefault(false); + hbox_controls_goto->addWidget(b_goto_get); + hbox_controls_goto->addWidget(b_goto_put); + gb_controls_goto->setLayout(hbox_controls_goto); + + // Controls: Breaks + QGroupBox* gb_controls_breaks = new QGroupBox(tr("Break on:"), this); + QHBoxLayout* hbox_controls_breaks = new QHBoxLayout(); + QPushButton* b_break_frame = new QPushButton(tr("Frame"), this); + QPushButton* b_break_text = new QPushButton(tr("Texture"), this); + QPushButton* b_break_draw = new QPushButton(tr("Draw"), this); + QPushButton* b_break_prim = new QPushButton(tr("Primitive"), this); + QPushButton* b_break_inst = new QPushButton(tr("Command"), this); + b_break_frame->setAutoDefault(false); + b_break_text->setAutoDefault(false); + b_break_draw->setAutoDefault(false); + b_break_prim->setAutoDefault(false); + b_break_inst->setAutoDefault(false); + hbox_controls_breaks->addWidget(b_break_frame); + hbox_controls_breaks->addWidget(b_break_text); + hbox_controls_breaks->addWidget(b_break_draw); + hbox_controls_breaks->addWidget(b_break_prim); + hbox_controls_breaks->addWidget(b_break_inst); + gb_controls_breaks->setLayout(hbox_controls_breaks); + + // TODO: This feature is not yet implemented + b_break_frame->setEnabled(false); + b_break_text->setEnabled(false); + b_break_draw->setEnabled(false); + b_break_prim->setEnabled(false); + b_break_inst->setEnabled(false); + + hbox_controls->addWidget(gb_controls_addr); + hbox_controls->addWidget(gb_controls_goto); + hbox_controls->addWidget(gb_controls_breaks); + gb_controls->setLayout(hbox_controls); + + + QTabWidget* tw_rsx = new QTabWidget(this); + tw_rsx->setFixedSize(QSize(726, 660)); + + //adds a tab containing a list to the tabwidget + auto l_addRSXTab = [=](QTableWidget* table, QString tabname, int columns) + { + QWidget* tab = new QWidget(tw_rsx); + tw_rsx->addTab(tab, tabname); + table = new QTableWidget(tab); + table->setItemDelegate(new table_item_delegate(this)); + table->setFixedSize(QSize(720, 634)); + table->setFont(mono); + table->setGridStyle(Qt::NoPen); + table->setEditTriggers(QAbstractItemView::NoEditTriggers); + table->setSelectionBehavior(QAbstractItemView::SelectRows); + table->verticalHeader()->setVisible(false); + table->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed); + table->verticalHeader()->setDefaultSectionSize(16); + table->setColumnCount(columns); + return table; + }; + + m_list_commands = l_addRSXTab(m_list_commands, tr("RSX Commands"), 4); + m_list_captured_frame = l_addRSXTab(m_list_captured_frame, tr("Captured Frame"), 1); + m_list_captured_draw_calls = l_addRSXTab(m_list_captured_draw_calls, tr("Captured Draw Calls"), 1); + m_list_flags = l_addRSXTab(m_list_flags, tr("Flags"), 2); + m_list_lightning = l_addRSXTab(m_list_lightning, tr("Lightning"), 2); + m_list_texture = l_addRSXTab(m_list_texture, tr("Texture"), 9); + m_list_settings = l_addRSXTab(m_list_settings, tr("Settings"), 2); + + //Tabs: List Columns + m_list_commands->setHorizontalHeaderLabels(QStringList() << tr("Column") << tr("Value") << tr("Command") << tr("Count")); + m_list_commands->setColumnWidth(0, 70); + m_list_commands->setColumnWidth(1, 70); + m_list_commands->setColumnWidth(2, 520); + m_list_commands->setColumnWidth(3, 60); + + m_list_captured_frame->setHorizontalHeaderLabels(QStringList() << tr("Column")); + m_list_captured_frame->setColumnWidth(0, 720); + + m_list_captured_draw_calls->setHorizontalHeaderLabels(QStringList() << tr("Draw calls")); + m_list_captured_draw_calls->setColumnWidth(0, 720); + + m_list_flags->setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Value")); + m_list_flags->setColumnWidth(0, 170); + m_list_flags->setColumnWidth(1, 270); + + m_list_lightning->setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Value")); + m_list_lightning->setColumnWidth(0, 170); + m_list_lightning->setColumnWidth(1, 270); + + m_list_texture->setHorizontalHeaderLabels(QStringList() << tr("Index") << tr("Address") << tr("Cubemap") + << tr("Dimension") << tr("Enabled") << tr("Format") << tr("Mipmap") << tr("Pitch") << tr("Size")); + for (int i = 0; icolumnCount(); i++) m_list_lightning->setColumnWidth(i, 80); + + m_list_settings->setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Value")); + m_list_settings->setColumnWidth(0, 170); + m_list_settings->setColumnWidth(1, 270); + + // Fill list + for(u32 i=0; iinsertRow(m_list_commands->rowCount()); + } + for (u32 i = 0; iinsertRow(1); + + //Tools: Tools = Controls + Notebook Tabs + vbox_tools->addWidget(gb_controls); + vbox_tools->addSpacing(10); + vbox_tools->addWidget(tw_rsx); + + // State explorer + QHBoxLayout* hbox_state_explorer = new QHBoxLayout(); + QTabWidget* state_rsx = new QTabWidget(this); + state_rsx->setFixedSize(QSize(726,746)); // content fits nicely + + QWidget* p_buffers = new QWidget(state_rsx); + QWidget* p_transform_program = new QWidget(state_rsx); + QWidget* p_shader_program = new QWidget(state_rsx); + QWidget* p_index_buffer = new QWidget(state_rsx); + + state_rsx->addTab(p_buffers, tr("RTTs and DS")); + state_rsx->addTab(p_transform_program, tr("Transform program")); + state_rsx->addTab(p_shader_program, tr("Shader program")); + state_rsx->addTab(p_index_buffer, tr("Index buffer")); + + m_text_transform_program = new QLabel(p_transform_program); + m_text_transform_program->setFixedSize(QSize(720, 720)); + m_text_transform_program->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); + m_text_transform_program->setFont(mono); + m_text_transform_program->setText(""); + + m_text_shader_program = new QLabel(p_shader_program); + m_text_shader_program->setFixedSize(QSize(720, 720)); + m_text_shader_program->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); + m_text_shader_program->setFont(mono); + m_text_shader_program->setText(""); + + m_list_index_buffer = new QListWidget(p_index_buffer); + m_list_index_buffer->setFixedSize(QSize(720, 720)); + m_list_index_buffer->setFont(mono); + + //Buffers + QVBoxLayout* vbox_buffers1 = new QVBoxLayout(); + QVBoxLayout* vbox_buffers2 = new QVBoxLayout(); + QGroupBox* gb_buffers_colorA = new QGroupBox(tr("Color Buffer A"), p_buffers); + QGroupBox* gb_buffers_colorB = new QGroupBox(tr("Color Buffer B"), p_buffers); + QGroupBox* gb_buffers_colorC = new QGroupBox(tr("Color Buffer C"), p_buffers); + QGroupBox* gb_buffers_colorD = new QGroupBox(tr("Color Buffer D"), p_buffers); + QGroupBox* gb_buffers_depth = new QGroupBox(tr("Depth Buffer"), p_buffers); + QGroupBox* gb_buffers_stencil = new QGroupBox(tr("Stencil Buffer"), p_buffers); + QGroupBox* gb_buffers_text = new QGroupBox(tr("Texture"), p_buffers); + QHBoxLayout* hbox_buffers_colorA = new QHBoxLayout(); + QHBoxLayout* hbox_buffers_colorB = new QHBoxLayout(); + QHBoxLayout* hbox_buffers_colorC = new QHBoxLayout(); + QHBoxLayout* hbox_buffers_colorD = new QHBoxLayout(); + QHBoxLayout* hbox_buffers_depth = new QHBoxLayout(); + QHBoxLayout* hbox_buffers_stencil = new QHBoxLayout(); + QHBoxLayout* hbox_buffers_text = new QHBoxLayout(); + gb_buffers_colorA ->setLayout(hbox_buffers_colorA); + gb_buffers_colorB ->setLayout(hbox_buffers_colorB); + gb_buffers_colorC ->setLayout(hbox_buffers_colorC); + gb_buffers_colorD ->setLayout(hbox_buffers_colorD); + gb_buffers_depth ->setLayout(hbox_buffers_depth); + gb_buffers_stencil->setLayout(hbox_buffers_stencil); + gb_buffers_text ->setLayout(hbox_buffers_text); + + //Buffers and textures + m_panel_width = 108; + m_panel_height = 108; + m_text_width = 108; + m_text_height = 108; + + //Panels for displaying the buffers + m_buffer_colorA = new Buffer(p_buffers, false, 0); + m_buffer_colorB = new Buffer(p_buffers, false, 1); + m_buffer_colorC = new Buffer(p_buffers, false, 2); + m_buffer_colorD = new Buffer(p_buffers, false, 3); + m_buffer_depth = new Buffer(p_buffers, false); + m_buffer_stencil = new Buffer(p_buffers, false); + m_buffer_tex = new Buffer(p_buffers, true); + m_buffer_colorA ->setFixedSize(QSize(m_panel_width, m_panel_height)); + m_buffer_colorB ->setFixedSize(QSize(m_panel_width, m_panel_height)); + m_buffer_colorC ->setFixedSize(QSize(m_panel_width, m_panel_height)); + m_buffer_colorD ->setFixedSize(QSize(m_panel_width, m_panel_height)); + m_buffer_depth ->setFixedSize(QSize(m_panel_width, m_panel_height)); + m_buffer_stencil->setFixedSize(QSize(m_panel_width, m_panel_height)); + m_buffer_tex ->setFixedSize(QSize(m_text_width, m_text_height)); + hbox_buffers_colorA ->addWidget(m_buffer_colorA); + hbox_buffers_colorB ->addWidget(m_buffer_colorB); + hbox_buffers_colorC ->addWidget(m_buffer_colorC); + hbox_buffers_colorD ->addWidget(m_buffer_colorD); + hbox_buffers_depth ->addWidget(m_buffer_depth); + hbox_buffers_stencil->addWidget(m_buffer_stencil); + hbox_buffers_text ->addWidget(m_buffer_tex); + + //Merge and display everything + vbox_buffers1->addSpacing(10); + vbox_buffers1->addWidget(gb_buffers_colorA); + vbox_buffers1->addSpacing(10); + vbox_buffers1->addWidget(gb_buffers_colorC); + vbox_buffers1->addSpacing(10); + vbox_buffers1->addWidget(gb_buffers_depth); + vbox_buffers1->addSpacing(10); + vbox_buffers1->addWidget(gb_buffers_text); + vbox_buffers1->addSpacing(10); + vbox_buffers1->addStretch(); + + vbox_buffers2->addSpacing(10); + vbox_buffers2->addWidget(gb_buffers_colorB); + vbox_buffers2->addSpacing(10); + vbox_buffers2->addWidget(gb_buffers_colorD); + vbox_buffers2->addSpacing(10); + vbox_buffers2->addWidget(gb_buffers_stencil); + vbox_buffers2->addSpacing(10); + vbox_buffers2->addStretch(); + + hbox_state_explorer->addLayout(vbox_buffers1); + hbox_state_explorer->addSpacing(10); + hbox_state_explorer->addLayout(vbox_buffers2); + hbox_state_explorer->addStretch(); + + p_buffers->setLayout(hbox_state_explorer); + + hbox_panel->addLayout(vbox_tools); + hbox_panel->addSpacing(10); + hbox_panel->addWidget(state_rsx); + setLayout(hbox_panel); + + //Events + connect(b_goto_get, &QAbstractButton::clicked, [=](){ + if (const auto render = fxm::get()){ + u32 realAddr; + if (RSXIOMem.getRealAddr(render->ctrl->get.load(), realAddr)){ + m_addr = realAddr; + UpdateInformation(); + } + } + }); + connect(b_goto_put, &QAbstractButton::clicked, [=](){ + if (const auto render = fxm::get()){ + u32 realAddr; + if (RSXIOMem.getRealAddr(render->ctrl->put.load(), realAddr)){ + m_addr = realAddr; + UpdateInformation(); + } + } + }); + connect(t_addr, &QLineEdit::returnPressed, [=](){ + bool ok; + m_addr = t_addr->text().toULong(&ok, 16); + UpdateInformation(); + }); + connect(m_list_flags, &QTableWidget::itemClicked, this, &rsx_debugger::SetFlags); + connect(m_list_texture, &QTableWidget::itemClicked, [=](){ + int index = m_list_texture->currentRow(); + if (index >= 0) m_cur_texture = index; + UpdateInformation(); + }); + connect(m_list_captured_draw_calls, &QTableWidget::itemClicked, this, &rsx_debugger::OnClickDrawCalls); + + //Fill the frame + UpdateInformation(); + setFixedSize(sizeHint()); + setFocusProxy(t_addr); +}; + +void rsx_debugger::keyPressEvent(QKeyEvent* event) +{ + if(isActiveWindow()) + { + switch(event->key()) + { + case Qt::Key_F5: UpdateInformation(); return; + } + } +} + +void rsx_debugger::wheelEvent(QWheelEvent* event) +{ + if (!m_list_commands->underMouse()) + { + return; + } + QPoint numSteps = event->angleDelta() / 8 / 15; // http://doc.qt.io/qt-5/qwheelevent.html#pixelDelta + if(vm::check_addr(m_addr, 4)) + { + int items = event->modifiers() & Qt::ControlModifier ? m_item_count : 1; + + for(int i=0; i> 18) & 0x7ff; + + offset = 1 + count; + } + else + { + offset = 1; + } + + m_addr -= 4 * offset * numSteps.y(); + } + } + else + { + m_addr -= (event->modifiers() & Qt::ControlModifier ? m_item_count : 1) * 4 * numSteps.y(); + } + + UpdateInformation(); +} + +namespace +{ + // Opens an image in a new window with original size + void display_buffer(QWidget *parent, const QImage img) + { + if (img.isNull()) return; + //QString title = qstr(fmt::format("Raw Image @ 0x%x", addr)); + QLabel* canvas = new QLabel(); + QPalette* pal_bg = new QPalette(); + pal_bg->setColor(canvas->backgroundRole(), QColor(240, 240, 240)); + canvas->setPalette(*pal_bg); //This fix the ugly background color under Windows + canvas->setPixmap(QPixmap::fromImage(img)); + canvas->setFixedSize(img.size()); + canvas->show(); + } +} + +// Draws a formatted and buffered inside the Buffer Widget +void Buffer::showImage(QImage image) +{ + if (image.isNull()) return; + m_image = image; + m_scaled = m_image.scaled(size(), Qt::KeepAspectRatio, Qt::SmoothTransformation); + m_canvas = new QLabel(); + m_canvas->setFixedSize(size()); + m_canvas->setPixmap(QPixmap::fromImage(m_scaled)); + m_layout = new QHBoxLayout(); + m_layout->setContentsMargins(0, 0, 0, 0); + m_layout->addWidget(m_canvas); + setLayout(m_layout); +} + +void Buffer::mouseDoubleClickEvent(QMouseEvent* event) +{ + if (event->button() == Qt::LeftButton) + { + const auto render = fxm::get(); + if (!render) + { + return; + } + + const auto buffers = render->gcm_buffers; + if (!buffers) + return; + + // TODO: Is there any better way to choose the color buffers +#define SHOW_BUFFER(id) \ + { \ + u32 addr = render->local_mem_addr + buffers[id].offset; \ + if (vm::check_addr(addr) && buffers[id].width && buffers[id].height) \ + memory_viewer_panel::ShowImage(this, addr, 3, buffers[id].width, buffers[id].height, true); \ + return; \ + } \ + + //if (0 <= m_id && m_id < 4) SHOW_BUFFER(m_id); + + display_buffer(this, m_image); + + if (m_isTex) + { + /* u8 location = render->textures[m_cur_texture].location(); + if(location <= 1 && vm::check_addr(rsx::get_address(render->textures[m_cur_texture].offset(), location)) + && render->textures[m_cur_texture].width() && render->textures[m_cur_texture].height()) + memory_viewer_panel::ShowImage(this, + rsx::get_address(render->textures[m_cur_texture].offset(), location), 1, + render->textures[m_cur_texture].width(), + render->textures[m_cur_texture].height(), false);*/ + } + +#undef SHOW_BUFFER + } +} + +namespace +{ + std::array get_value(gsl::span orig_buffer, rsx::surface_color_format format, size_t idx) + { + switch (format) + { + case rsx::surface_color_format::b8: + { + u8 value = gsl::as_span(orig_buffer)[idx]; + return{ value, value, value }; + } + case rsx::surface_color_format::x32: + { + be_t stored_val = gsl::as_span>(orig_buffer)[idx]; + u32 swapped_val = stored_val; + f32 float_val = (f32&)swapped_val; + u8 val = float_val * 255.f; + return{ val, val, val }; + } + case rsx::surface_color_format::a8b8g8r8: + case rsx::surface_color_format::x8b8g8r8_o8b8g8r8: + case rsx::surface_color_format::x8b8g8r8_z8b8g8r8: + { + auto ptr = gsl::as_span(orig_buffer); + return{ ptr[1 + idx * 4], ptr[2 + idx * 4], ptr[3 + idx * 4] }; + } + case rsx::surface_color_format::a8r8g8b8: + case rsx::surface_color_format::x8r8g8b8_o8r8g8b8: + case rsx::surface_color_format::x8r8g8b8_z8r8g8b8: + { + auto ptr = gsl::as_span(orig_buffer); + return{ ptr[3 + idx * 4], ptr[2 + idx * 4], ptr[1 + idx * 4] }; + } + case rsx::surface_color_format::w16z16y16x16: + { + auto ptr = gsl::as_span(orig_buffer); + f16 h0 = f16(ptr[4 * idx]); + f16 h1 = f16(ptr[4 * idx + 1]); + f16 h2 = f16(ptr[4 * idx + 2]); + f32 f0 = float(h0); + f32 f1 = float(h1); + f32 f2 = float(h2); + + u8 val0 = f0 * 255.; + u8 val1 = f1 * 255.; + u8 val2 = f2 * 255.; + return{ val0, val1, val2 }; + } + case rsx::surface_color_format::g8b8: + case rsx::surface_color_format::r5g6b5: + case rsx::surface_color_format::x1r5g5b5_o1r5g5b5: + case rsx::surface_color_format::x1r5g5b5_z1r5g5b5: + case rsx::surface_color_format::w32z32y32x32: + fmt::throw_exception("Unsupported format for display" HERE); + } + } + + /** + * Return a new buffer that can be passed to QImage. + */ + u8* convert_to_QImage_buffer(rsx::surface_color_format format, gsl::span orig_buffer, size_t width, size_t height) noexcept + { + unsigned char* buffer = (unsigned char*)malloc(width * height * 4); + for (u32 i = 0; i < width * height; i++) + { + // depending on original buffer, the colors may need to be reversed + const auto &colors = get_value(orig_buffer, format, i); + buffer[0 + i * 4] = colors[0]; + buffer[1 + i * 4] = colors[1]; + buffer[2 + i * 4] = colors[2]; + buffer[3 + i * 4] = 255; + } + return buffer; + } +}; + +void rsx_debugger::OnClickDrawCalls() +{ + size_t draw_id = m_list_captured_draw_calls->currentRow(); + + const auto& draw_call = frame_debug.draw_calls[draw_id]; + + Buffer* buffers[] = + { + m_buffer_colorA, + m_buffer_colorB, + m_buffer_colorC, + m_buffer_colorD, + }; + + size_t width = draw_call.state.surface_clip_width(); + size_t height = draw_call.state.surface_clip_height(); + + for (size_t i = 0; i < 4; i++) + { + if (width && height && !draw_call.color_buffer[i].empty()) + { + unsigned char* buffer = convert_to_QImage_buffer(draw_call.state.surface_color(), draw_call.color_buffer[i], width, height); + buffers[i]->showImage(QImage(buffer, width, height, QImage::Format_RGB32)); + } + } + + // Buffer Z + { + if (width && height && !draw_call.depth_stencil[0].empty()) + { + gsl::span orig_buffer = draw_call.depth_stencil[0]; + unsigned char *buffer = (unsigned char *)malloc(width * height * 4); + + if (draw_call.state.surface_depth_fmt() == rsx::surface_depth_format::z24s8) + { + for (u32 row = 0; row < height; row++) + { + for (u32 col = 0; col < width; col++) + { + u32 depth_val = gsl::as_span(orig_buffer)[row * width + col]; + u8 displayed_depth_val = 255 * depth_val / 0xFFFFFF; + buffer[4 * col + 0 + width * row * 4] = displayed_depth_val; + buffer[4 * col + 1 + width * row * 4] = displayed_depth_val; + buffer[4 * col + 2 + width * row * 4] = displayed_depth_val; + buffer[4 * col + 3 + width * row * 4] = 255; + } + } + } + else + { + for (u32 row = 0; row < height; row++) + { + for (u32 col = 0; col < width; col++) + { + u16 depth_val = gsl::as_span(orig_buffer)[row * width + col]; + u8 displayed_depth_val = 255 * depth_val / 0xFFFF; + buffer[4 * col + 0 + width * row * 4] = displayed_depth_val; + buffer[4 * col + 1 + width * row * 4] = displayed_depth_val; + buffer[4 * col + 2 + width * row * 4] = displayed_depth_val; + buffer[4 * col + 3 + width * row * 4] = 255; + } + } + } + m_buffer_depth->showImage(QImage(buffer, width, height, QImage::Format_RGB32)); + } + } + + // Buffer S + { + if (width && height && !draw_call.depth_stencil[1].empty()) + { + gsl::span orig_buffer = draw_call.depth_stencil[1]; + unsigned char *buffer = (unsigned char *)malloc(width * height * 4); + + for (u32 row = 0; row < height; row++) + { + for (u32 col = 0; col < width; col++) + { + u8 stencil_val = gsl::as_span(orig_buffer)[row * width + col]; + buffer[4 * col + 0 + width * row * 4] = stencil_val; + buffer[4 * col + 1 + width * row * 4] = stencil_val; + buffer[4 * col + 2 + width * row * 4] = stencil_val; + buffer[4 * col + 3 + width * row * 4] = 255; + } + } + m_buffer_stencil->showImage(QImage(buffer, width, height, QImage::Format_RGB32)); + } + } + + // Programs + m_text_transform_program->clear(); + m_text_transform_program->setText(qstr(frame_debug.draw_calls[draw_id].programs.first)); + m_text_shader_program->clear(); + m_text_shader_program->setText(qstr(frame_debug.draw_calls[draw_id].programs.second)); + + m_list_index_buffer->clear(); + //m_list_index_buffer->insertColumn(0, "Index", 0, 700); + if (frame_debug.draw_calls[draw_id].state.index_type() == rsx::index_array_type::u16) + { + u16 *index_buffer = (u16*)frame_debug.draw_calls[draw_id].index.data(); + for (u32 i = 0; i < frame_debug.draw_calls[draw_id].vertex_count; ++i) + { + m_list_index_buffer->insertItem(i, qstr(std::to_string(index_buffer[i]))); + } + } + if (frame_debug.draw_calls[draw_id].state.index_type() == rsx::index_array_type::u32) + { + u32 *index_buffer = (u32*)frame_debug.draw_calls[draw_id].index.data(); + for (u32 i = 0; i < frame_debug.draw_calls[draw_id].vertex_count; ++i) + { + m_list_index_buffer->insertItem(i, qstr(std::to_string(index_buffer[i]))); + } + } +} + +void rsx_debugger::UpdateInformation() +{ + t_addr->setText(QString("%1").arg(m_addr, 8, 16, QChar('0'))); // get 8 digits in input line + GetMemory(); + GetBuffers(); + GetFlags(); + GetLightning(); + GetTexture(); + GetSettings(); +} + +void rsx_debugger::GetMemory() +{ + // Clean commands column + for(u32 i=0; isetItem(i, 2, new QTableWidgetItem("")); + + // Write information + for(u32 i=0, addr = m_addr; isetItem(i, 0, new QTableWidgetItem(qstr(fmt::format("%08x", addr)))); + + if (vm::check_addr(addr)) + { + u32 cmd = vm::ps3::read32(addr); + u32 count = (cmd >> 18) & 0x7ff; + m_list_commands->setItem(i, 1, new QTableWidgetItem(qstr(fmt::format("%08x", cmd)))); + m_list_commands->setItem(i, 3, new QTableWidgetItem(qstr(fmt::format("%d", count)))); + m_list_commands->setItem(i, 2, new QTableWidgetItem(DisAsmCommand(cmd, count, addr, 0))); + + if((cmd & RSX_METHOD_OLD_JUMP_CMD_MASK) != RSX_METHOD_OLD_JUMP_CMD + && (cmd & RSX_METHOD_NEW_JUMP_CMD_MASK) != RSX_METHOD_NEW_JUMP_CMD + && (cmd & RSX_METHOD_CALL_CMD_MASK) != RSX_METHOD_CALL_CMD + && cmd != RSX_METHOD_RETURN_CMD) + { + addr += 4 * count; + } + } + else + { + m_list_commands->setItem(i, 1, new QTableWidgetItem("????????")); + } + } + + std::string dump; + + for (u32 i = 0; i < frame_debug.command_queue.size(); i++) + { + const std::string& str = rsx::get_pretty_printing_function(frame_debug.command_queue[i].first)(frame_debug.command_queue[i].second); + m_list_captured_frame->setItem(i, 0, new QTableWidgetItem(qstr(str))); + + dump += str; + dump += '\n'; + } + + fs::file(fs::get_config_dir() + "command_dump.log", fs::rewrite).write(dump); + + for (u32 i = 0;i < frame_debug.draw_calls.size(); i++) + m_list_captured_draw_calls->setItem(i, 0, new QTableWidgetItem(qstr(frame_debug.draw_calls[i].name))); +} + +void rsx_debugger::GetBuffers() +{ + const auto render = fxm::get(); + if (!render) + { + return; + } + + // Draw Buffers + // TODO: Currently it only supports color buffers + for (u32 bufferId=0; bufferId < render->gcm_buffers_count; bufferId++) + { + if(!vm::check_addr(render->gcm_buffers.addr())) + continue; + + auto buffers = render->gcm_buffers; + u32 RSXbuffer_addr = render->local_mem_addr + buffers[bufferId].offset; + + if(!vm::check_addr(RSXbuffer_addr)) + continue; + + auto RSXbuffer = vm::ps3::_ptr(RSXbuffer_addr); + + u32 width = buffers[bufferId].width; + u32 height = buffers[bufferId].height; + unsigned char* buffer = (unsigned char*)malloc(width * height * 4); + + // ABGR to ARGB and flip vertically + for (u32 y=0; yshowImage(QImage(buffer, width, height, QImage::Format_RGB32)); + } + + // Draw Texture +/* if(!render->textures[m_cur_texture].enabled()) + return; + + u32 offset = render->textures[m_cur_texture].offset(); + + if(!offset) + return; + + u8 location = render->textures[m_cur_texture].location(); + + if(location > 1) + return; + + u32 TexBuffer_addr = rsx::get_address(offset, location); + + if(!vm::check_addr(TexBuffer_addr)) + return; + + unsigned char* TexBuffer = vm::ps3::_ptr(TexBuffer_addr); + + u32 width = render->textures[m_cur_texture].width(); + u32 height = render->textures[m_cur_texture].height(); + unsigned char* buffer = (unsigned char*)malloc(width * height * 3); + std::memcpy(buffer, vm::base(TexBuffer_addr), width * height * 3); + + m_buffer_tex->showImage(QImage(buffer, m_text_width, m_text_height, QImage::Format_RGB32));*/ +} + +void rsx_debugger::GetFlags() +{ + const auto render = fxm::get(); + if (!render) + { + return; + } + + m_list_flags->clearContents(); + int i=0; + +#define LIST_FLAGS_ADD(name, value) \ + m_list_flags->setItem(i, 0, new QTableWidgetItem(qstr(name))); m_list_flags->setItem(i, 1, new QTableWidgetItem(qstr(value ? "Enabled" : "Disabled"))); i++; + /* + LIST_FLAGS_ADD("Alpha test", render->m_set_alpha_test); + LIST_FLAGS_ADD("Blend", render->m_set_blend); + LIST_FLAGS_ADD("Scissor", render->m_set_scissor_horizontal && render->m_set_scissor_vertical); + LIST_FLAGS_ADD("Cull face", render->m_set_cull_face); + LIST_FLAGS_ADD("Depth bounds test", render->m_set_depth_bounds_test); + LIST_FLAGS_ADD("Depth test", render->m_set_depth_test); + LIST_FLAGS_ADD("Dither", render->m_set_dither); + LIST_FLAGS_ADD("Line smooth", render->m_set_line_smooth); + LIST_FLAGS_ADD("Logic op", render->m_set_logic_op); + LIST_FLAGS_ADD("Poly smooth", render->m_set_poly_smooth); + LIST_FLAGS_ADD("Poly offset fill", render->m_set_poly_offset_fill); + LIST_FLAGS_ADD("Poly offset line", render->m_set_poly_offset_line); + LIST_FLAGS_ADD("Poly offset point", render->m_set_poly_offset_point); + LIST_FLAGS_ADD("Stencil test", render->m_set_stencil_test); + LIST_FLAGS_ADD("Primitive restart", render->m_set_restart_index); + LIST_FLAGS_ADD("Two sided lighting", render->m_set_two_side_light_enable); + LIST_FLAGS_ADD("Point Sprite", render->m_set_point_sprite_control); + LIST_FLAGS_ADD("Lighting ", render->m_set_specular); + */ + +#undef LIST_FLAGS_ADD +} + +void rsx_debugger::GetLightning() +{ + const auto render = fxm::get(); + if (!render) + { + return; + } + + m_list_lightning->clearContents(); + int i=0; + +#define LIST_LIGHTNING_ADD(name, value) \ + m_list_lightning->setItem(i, 0, new QTableWidgetItem(qstr(name))); m_list_lightning->setItem(i, 1, new QTableWidgetItem(qstr(value))); i++; + + //LIST_LIGHTNING_ADD("Shade model", (render->m_shade_mode == 0x1D00) ? "Flat" : "Smooth"); + +#undef LIST_LIGHTNING_ADD +} + +void rsx_debugger::GetTexture() +{ + const auto render = fxm::get(); + if (!render) + { + return; + } + + m_list_texture->clearContents(); + m_list_texture->setRowCount(rsx::limits::fragment_textures_count); + + for(uint i=0; itextures[i].enabled()) + { + m_list_texture->setItem(i, 0, new QTableWidgetItem(qstr(fmt::format("%d", i))); + u8 location = render->textures[i].location(); + if(location > 1) + { + m_list_texture->setItem(i, 1, + new QTableWidgetItem(qstr(fmt::format("Bad address (offset=0x%x, location=%d)", render->textures[i].offset(), location)))); + } + else + { + m_list_texture->setItem(i, 1, + new QTableWidgetItem(qstr(fmt::format("0x%x", rsx::get_address(render->textures[i].offset(), location))))); + } + + m_list_texture->setItem(i, 2, new QTableWidgetItem(render->textures[i].cubemap() ? "True" : "False")); + m_list_texture->setItem(i, 3, new QTableWidgetItem(qstr(fmt::format("%dD", render->textures[i].dimension())))); + m_list_texture->setItem(i, 4, new QTableWidgetItem(render->textures[i].enabled() ? "True" : "False")); + m_list_texture->setItem(i, 5, new QTableWidgetItem(qstr(fmt::format("0x%x", render->textures[i].format())))); + m_list_texture->setItem(i, 6, new QTableWidgetItem(qstr(fmt::format("0x%x", render->textures[i].mipmap())))); + m_list_texture->setItem(i, 7, new QTableWidgetItem(qstr(fmt::format("0x%x", render->textures[i].pitch())))); + m_list_texture->setItem(i, 8, new QTableWidgetItem(qstr(fmt::format("%dx%d", + render->textures[i].width(), + render->textures[i].height())))); + + m_list_texture->SetItemBackgroundColour(i, QColor(m_cur_texture == i ? QColor::yellow : QColor::white)); + }*/ + } +} + +void rsx_debugger::GetSettings() +{ + const auto render = fxm::get(); + if (!render) + { + return; + } + + m_list_settings->clearContents(); + int i=0; + +#define LIST_SETTINGS_ADD(name, value) \ + m_list_settings->setItem(i, 0, new QTableWidgetItem(qstr(name))); m_list_settings->setItem(i, 1, new QTableWidgetItem(qstr(value))); i++; + /* + LIST_SETTINGS_ADD("Alpha func", !(render->m_set_alpha_func) ? "(none)" : fmt::format("0x%x (%s)", + render->m_alpha_func, + ParseGCMEnum(render->m_alpha_func, CELL_GCM_ENUM))); + LIST_SETTINGS_ADD("Blend color", !(render->m_set_blend_color) ? "(none)" : fmt::format("R:%d, G:%d, B:%d, A:%d", + render->m_blend_color_r, + render->m_blend_color_g, + render->m_blend_color_b, + render->m_blend_color_a)); + LIST_SETTINGS_ADD("Clipping", fmt::format("Min:%f, Max:%f", render->m_clip_min, render->m_clip_max)); + LIST_SETTINGS_ADD("Color mask", !(render->m_set_color_mask) ? "(none)" : fmt::format("R:%d, G:%d, B:%d, A:%d", + render->m_color_mask_r, + render->m_color_mask_g, + render->m_color_mask_b, + render->m_color_mask_a)); + LIST_SETTINGS_ADD("Context DMA Color A", fmt::format("0x%x", render->m_context_dma_color_a)); + LIST_SETTINGS_ADD("Context DMA Color B", fmt::format("0x%x", render->m_context_dma_color_b)); + LIST_SETTINGS_ADD("Context DMA Color C", fmt::format("0x%x", render->m_context_dma_color_c)); + LIST_SETTINGS_ADD("Context DMA Color D", fmt::format("0x%x", render->m_context_dma_color_d)); + LIST_SETTINGS_ADD("Context DMA Zeta", fmt::format("0x%x", render->m_context_dma_z)); + LIST_SETTINGS_ADD("Depth bounds", fmt::format("Min:%f, Max:%f", render->m_depth_bounds_min, render->m_depth_bounds_max)); + LIST_SETTINGS_ADD("Depth func", !(render->m_set_depth_func) ? "(none)" : fmt::format("0x%x (%s)", + render->m_depth_func, + ParseGCMEnum(render->m_depth_func, CELL_GCM_ENUM))); + LIST_SETTINGS_ADD("Draw mode", fmt::format("%d (%s)", + render->m_draw_mode, + ParseGCMEnum(render->m_draw_mode, CELL_GCM_PRIMITIVE_ENUM))); + LIST_SETTINGS_ADD("Scissor", fmt::format("X:%d, Y:%d, W:%d, H:%d", + render->m_scissor_x, + render->m_scissor_y, + render->m_scissor_w, + render->m_scissor_h)); + LIST_SETTINGS_ADD("Stencil func", !(render->m_set_stencil_func) ? "(none)" : fmt::format("0x%x (%s)", + render->m_stencil_func, + ParseGCMEnum(render->m_stencil_func, CELL_GCM_ENUM))); + LIST_SETTINGS_ADD("Surface Pitch A", fmt::format("0x%x", render->m_surface_pitch_a)); + LIST_SETTINGS_ADD("Surface Pitch B", fmt::format("0x%x", render->m_surface_pitch_b)); + LIST_SETTINGS_ADD("Surface Pitch C", fmt::format("0x%x", render->m_surface_pitch_c)); + LIST_SETTINGS_ADD("Surface Pitch D", fmt::format("0x%x", render->m_surface_pitch_d)); + LIST_SETTINGS_ADD("Surface Pitch Z", fmt::format("0x%x", render->m_surface_pitch_z)); + LIST_SETTINGS_ADD("Surface Offset A", fmt::format("0x%x", render->m_surface_offset_a)); + LIST_SETTINGS_ADD("Surface Offset B", fmt::format("0x%x", render->m_surface_offset_b)); + LIST_SETTINGS_ADD("Surface Offset C", fmt::format("0x%x", render->m_surface_offset_c)); + LIST_SETTINGS_ADD("Surface Offset D", fmt::format("0x%x", render->m_surface_offset_d)); + LIST_SETTINGS_ADD("Surface Offset Z", fmt::format("0x%x", render->m_surface_offset_z)); + LIST_SETTINGS_ADD("Viewport", fmt::format("X:%d, Y:%d, W:%d, H:%d", + render->m_viewport_x, + render->m_viewport_y, + render->m_viewport_w, + render->m_viewport_h)); + */ +#undef LIST_SETTINGS_ADD +} + +void rsx_debugger::SetFlags() +{ + /* + int index = m_list_flags->currentRow(); + if (!RSXReady()) return; + GSRender& render = Emu.GetGSManager().GetRender(); + switch(index) + { + case 0: render->m_set_alpha_test ^= true; break; + case 1: render->m_set_blend ^= true; break; + case 2: render->m_set_cull_face ^= true; break; + case 3: render->m_set_depth_bounds_test ^= true; break; + case 4: render->m_set_depth_test ^= true; break; + case 5: render->m_set_dither ^= true; break; + case 6: render->m_set_line_smooth ^= true; break; + case 7: render->m_set_logic_op ^= true; break; + case 8: render->m_set_poly_smooth ^= true; break; + case 9: render->m_set_poly_offset_fill ^= true; break; + case 10: render->m_set_poly_offset_line ^= true; break; + case 11: render->m_set_poly_offset_point ^= true; break; + case 12: render->m_set_stencil_test ^= true; break; + case 13: render->m_set_point_sprite_control ^= true; break; + case 14: render->m_set_restart_index ^= true; break; + case 15: render->m_set_specular ^= true; break; + case 16: render->m_set_scissor_horizontal ^= true; break; + case 17: render->m_set_scissor_vertical ^= true; break; + } + */ + + UpdateInformation(); +} + +void rsx_debugger::SetPrograms() +{ + const auto render = fxm::get(); + if (!render) + { + return; + } + + return; + //rsx_debuggerProgram& program = m_debug_programs[event.m_itemIndex]; + + //// Program Editor + //QString title = qstr(fmt::format("Program ID: %d (VP:%d, FP:%d)", program.id, program.vp_id, program.fp_id)); + //QDialog d_editor(this, title, QSize(800,500)); + + //QHBoxLayout* hbox_panel = new QHBoxLayout(); + //QHBoxLayout* hbox_vp_box = new QHBoxLayout(&d_editor, tr("Vertex Program")); + //QHBoxLayout* hbox_fp_box = new QHBoxLayout(&d_editor, tr("Fragment Program")); + //QLabel or QTextEdit* t_vp_edit = new QTextEdit(&d_editor, program.vp_shader); + //QLabel or QTextEdit* t_fp_edit = new QTextEdit(&d_editor, program.fp_shader); + //t_vp_edit->setFont(mono); + //t_fp_edit->setFont(mono); + //hbox_vp_box->addWidget(t_vp_edit, 1, wxEXPAND); + //hbox_fp_box->addWidget(t_fp_edit, 1, wxEXPAND); + //hbox_panel->addLayout(hbox_vp_box, 1, wxEXPAND); + //hbox_panel->addLayout(hbox_fp_box, 1, wxEXPAND); + //d_editor.setLayout(hbox_panel); + + //// Show editor and open Save Dialog when closing + //if (d_editor.ShowModal()) + //{ + // wxMessageDialog d_save(&d_editor, "Save changes and compile shaders?", title, wxYES_NO|wxCENTRE); + // if(d_save.ShowModal() == wxID_YES) + // { + // program.modified = true; + // program.vp_shader = t_vp_edit->GetValue(); + // program.fp_shader = t_fp_edit->GetValue(); + // } + //} + //UpdateInformation(); +} + +const char* rsx_debugger::ParseGCMEnum(u32 value, u32 type) +{ + switch(type) + { + case CELL_GCM_ENUM: + { + switch(value) + { + case 0x0200: return "Never"; + case 0x0201: return "Less"; + case 0x0202: return "Equal"; + case 0x0203: return "Less or Equal"; + case 0x0204: return "Greater"; + case 0x0205: return "Not Equal"; + case 0x0206: return "Greater or Equal"; + case 0x0207: return "Always"; + + case 0x0: return "Zero"; + case 0x1: return "One"; + case 0x0300: return "SRC_COLOR"; + case 0x0301: return "1 - SRC_COLOR"; + case 0x0302: return "SRC_ALPHA"; + case 0x0303: return "1 - SRC_ALPHA"; + case 0x0304: return "DST_ALPHA"; + case 0x0305: return "1 - DST_ALPHA"; + case 0x0306: return "DST_COLOR"; + case 0x0307: return "1 - DST_COLOR"; + case 0x0308: return "SRC_ALPHA_SATURATE"; + case 0x8001: return "CONSTANT_COLOR"; + case 0x8002: return "1 - CONSTANT_COLOR"; + case 0x8003: return "CONSTANT_ALPHA"; + case 0x8004: return "1 - CONSTANT_ALPHA"; + + case 0x8006: return "Add"; + case 0x8007: return "Min"; + case 0x8008: return "Max"; + case 0x800A: return "Substract"; + case 0x800B: return "Reverse Substract"; + case 0xF005: return "Reverse Substract Signed"; + case 0xF006: return "Add Signed"; + case 0xF007: return "Reverse Add Signed"; + + default: return "Wrong Value!"; + } + } + case CELL_GCM_PRIMITIVE_ENUM: + { + switch(value) + { + case 1: return "POINTS"; + case 2: return "LINES"; + case 3: return "LINE_LOOP"; + case 4: return "LINE_STRIP"; + case 5: return "TRIANGLES"; + case 6: return "TRIANGLE_STRIP"; + case 7: return "TRIANGLE_FAN"; + case 8: return "QUADS"; + case 9: return "QUAD_STRIP"; + case 10: return "POLYGON"; + + default: return "Wrong Value!"; + } + } + default: return "Unknown!"; + } +} + +#define case_16(a, m) \ + case a + m: \ + case a + m * 2: \ + case a + m * 3: \ + case a + m * 4: \ + case a + m * 5: \ + case a + m * 6: \ + case a + m * 7: \ + case a + m * 8: \ + case a + m * 9: \ + case a + m * 10: \ + case a + m * 11: \ + case a + m * 12: \ + case a + m * 13: \ + case a + m * 14: \ + case a + m * 15: \ + index = (cmd - a) / m; \ + case a \ + +QString rsx_debugger::DisAsmCommand(u32 cmd, u32 count, u32 currentAddr, u32 ioAddr) +{ + std::string disasm = ""; + +#define DISASM(string, ...) { if(disasm.empty()) disasm = fmt::format((string), ##__VA_ARGS__); else disasm += (' ' + fmt::format((string), ##__VA_ARGS__)); } + if((cmd & RSX_METHOD_OLD_JUMP_CMD_MASK) == RSX_METHOD_OLD_JUMP_CMD) + { + u32 jumpAddr = cmd & RSX_METHOD_OLD_JUMP_OFFSET_MASK; + DISASM("JUMP: %08x -> %08x", currentAddr, ioAddr+jumpAddr); + } + else if((cmd & RSX_METHOD_NEW_JUMP_CMD_MASK) == RSX_METHOD_NEW_JUMP_CMD) + { + u32 jumpAddr = cmd & RSX_METHOD_NEW_JUMP_OFFSET_MASK; + DISASM("JUMP: %08x -> %08x", currentAddr, ioAddr + jumpAddr); + } + else if((cmd & RSX_METHOD_CALL_CMD_MASK) == RSX_METHOD_CALL_CMD) + { + u32 callAddr = cmd & RSX_METHOD_CALL_OFFSET_MASK; + DISASM("CALL: %08x -> %08x", currentAddr, ioAddr+callAddr); + } + if(cmd == RSX_METHOD_RETURN_CMD) + { + DISASM("RETURN"); + } + + if(cmd == 0) + { + DISASM("Null cmd"); + } + else if ((cmd & RSX_METHOD_OLD_JUMP_CMD_MASK) != RSX_METHOD_OLD_JUMP_CMD + && (cmd & RSX_METHOD_NEW_JUMP_CMD_MASK) != RSX_METHOD_NEW_JUMP_CMD + && (cmd & RSX_METHOD_CALL_CMD_MASK) != RSX_METHOD_CALL_CMD + && cmd != RSX_METHOD_RETURN_CMD) + { + auto args = vm::ps3::ptr::make(currentAddr + 4); + + u32 index = 0; + switch((cmd & 0x3ffff) >> 2) + { + case 0x3fead: + DISASM("Flip and change current buffer: %d", (u32)args[0]); + break; + + case_16(NV4097_SET_TEXTURE_OFFSET, 0x20): + DISASM("Texture Offset[%d]: %08x", index, (u32)args[0]); + switch ((args[1] & 0x3) - 1) + { + case CELL_GCM_LOCATION_LOCAL: DISASM("(Local memory);"); break; + case CELL_GCM_LOCATION_MAIN: DISASM("(Main memory);"); break; + default: DISASM("(Bad location!);"); break; + } + DISASM(" Cubemap:%s; Dimension:0x%x; Format:0x%x; Mipmap:0x%x", + (((args[1] >> 2) & 0x1) ? "True" : "False"), + ((args[1] >> 4) & 0xf), + ((args[1] >> 8) & 0xff), + ((args[1] >> 16) & 0xffff)); + break; + + case NV4097_SET_DEPTH_BOUNDS_TEST_ENABLE: + DISASM(args[0] ? "Depth bounds test: Enable" : "Depth bounds test: Disable"); + break; + default: + { + std::string str = rsx::get_pretty_printing_function((cmd & 0x3ffff) >> 2)((u32)args[0]); + DISASM("%s", str.c_str()); + } + } + + if((cmd & RSX_METHOD_NON_INCREMENT_CMD_MASK) == RSX_METHOD_NON_INCREMENT_CMD) + { + DISASM("Non Increment cmd"); + } + + DISASM("[0x%08x(", cmd); + + for(uint i=0; i +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class Buffer : public QWidget +{ + QHBoxLayout* m_layout; + QImage m_scaled; + u32 m_id; + bool m_isTex; + +public: + QLabel* m_canvas; + QImage m_image; + + Buffer(QWidget* parent, bool isTex, u32 id = 4) + : QWidget(parent), m_isTex(isTex), m_id(id){}; + void showImage(QImage image = QImage()); + +private: + void mouseDoubleClickEvent(QMouseEvent* event); +}; + +class rsx_debugger : public QDialog +{ + Q_OBJECT + + u32 m_addr; + + u32 m_panel_width; + u32 m_panel_height; + u32 m_text_width; + u32 m_text_height; + + u32 pSize; + + QLineEdit* t_addr; + QPalette* palette_bg; + QFont mono; + QFontMetrics* fontMetrics; + + u32 m_item_count; + QTableWidget* m_list_commands; + QTableWidget* m_list_captured_frame; + QTableWidget* m_list_captured_draw_calls; + QTableWidget* m_list_flags; + QTableWidget* m_list_lightning; + QTableWidget* m_list_texture; + QTableWidget* m_list_settings; + QListWidget* m_list_index_buffer; + + Buffer* m_buffer_colorA; + Buffer* m_buffer_colorB; + Buffer* m_buffer_colorC; + Buffer* m_buffer_colorD; + Buffer* m_buffer_depth; + Buffer* m_buffer_stencil; + Buffer* m_buffer_tex; + + QLabel* m_text_transform_program; + QLabel* m_text_shader_program; + + uint m_cur_texture; + +public: + bool exit; + rsx_debugger(QWidget* parent); + ~rsx_debugger() + { + exit = true; + } + + virtual void UpdateInformation(); + virtual void GetMemory(); + virtual void GetBuffers(); + virtual void GetFlags(); + virtual void GetLightning(); + virtual void GetTexture(); + virtual void GetSettings(); + + const char* ParseGCMEnum(u32 value, u32 type); + QString DisAsmCommand(u32 cmd, u32 count, u32 currentAddr, u32 ioAddr); + + void SetPC(const uint pc) { m_addr = pc; } + +private: + QSignalMapper *signalMapper; + +public slots: + virtual void keyPressEvent(QKeyEvent* event); + virtual void wheelEvent(QWheelEvent* event); + virtual void OnClickDrawCalls(); + virtual void SetFlags(); + virtual void SetPrograms(); +}; + +#endif // !RSXDEBUGGER_H diff --git a/rpcs3/rpcs3qt/save_data_dialog.cpp b/rpcs3/rpcs3qt/save_data_dialog.cpp new file mode 100644 index 0000000000..4571feba45 --- /dev/null +++ b/rpcs3/rpcs3qt/save_data_dialog.cpp @@ -0,0 +1,9 @@ +#include "stdafx.h" +#include "Emu/Memory/Memory.h" + +#include "save_data_dialog.h" + +s32 save_data_dialog::ShowSaveDataList(std::vector& save_entries, s32 focused, vm::ptr listSet) +{ + return focused; +} diff --git a/rpcs3/rpcs3qt/save_data_dialog.h b/rpcs3/rpcs3qt/save_data_dialog.h new file mode 100644 index 0000000000..56bb6a709e --- /dev/null +++ b/rpcs3/rpcs3qt/save_data_dialog.h @@ -0,0 +1,13 @@ +#ifndef SAVEDATADIALOG_H +#define SAVEDATADIALOG_H + +#include "Emu/Cell/Modules/cellSaveData.h" + +class save_data_dialog : public SaveDialogBase +{ +public: + virtual s32 ShowSaveDataList(std::vector& save_entries, s32 focused, vm::ptr listSet) override; +}; + + +#endif // !SAVEDATADIALOG_H diff --git a/rpcs3/rpcs3qt/save_data_utility.cpp b/rpcs3/rpcs3qt/save_data_utility.cpp new file mode 100644 index 0000000000..42351bec9a --- /dev/null +++ b/rpcs3/rpcs3qt/save_data_utility.cpp @@ -0,0 +1,374 @@ +#include "stdafx.h" +#include "save_data_utility.h" + +//Cause i can not decide what struct to be used to fill those. Just use no real data now. +//Currently variable info isn't used. it supposed to be a container for the information passed by other. +save_data_info_dialog::save_data_info_dialog(QWidget* parent, const save_data_information& info) + : QDialog(parent) +{ + setWindowTitle(tr("Save Data Information")); + setMinimumSize(QSize(400, 300)); + + // Table + m_list = new QTableWidget(this); + //m_list->setItemDelegate(new table_item_delegate(this)); // to get rid of item selection rectangles include "table_item_delegate.h" + //m_list->setSelectionBehavior(QAbstractItemView::SelectRows); // enable to only select whole rows instead of items + m_list->setEditTriggers(QAbstractItemView::NoEditTriggers); + m_list->setColumnCount(2); + m_list->setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Detail")); + + // Buttons + QPushButton* close_button = new QPushButton(tr("&Close"), this); + connect(close_button, &QAbstractButton::clicked, this, &save_data_info_dialog::close); + + // Button Layout + QHBoxLayout* hbox_actions = new QHBoxLayout(); + hbox_actions->addStretch(); //Add a stretch to make Close on the Right-Down corner of this dialog. + hbox_actions->addWidget(close_button); + + // Main Layout + QVBoxLayout* vbox_main = new QVBoxLayout(); + vbox_main->addWidget(m_list, 1); + vbox_main->addLayout(hbox_actions, 0); + vbox_main->setAlignment(Qt::AlignCenter); + setLayout(vbox_main); + + // resize to minimum view size + resize(minimumSize().expandedTo(sizeHint())); + + UpdateData(); +} +//This is intended to write the information of save data to QTableView. +//However been not able to decide which data struct i should use, i use static content for this to make it stub. +void save_data_info_dialog::UpdateData() +{ + m_list->clearContents(); + m_list->setRowCount(6); // set this to nr of members in struct + + m_list->setItem(0, 0, new QTableWidgetItem(tr("User ID"))); + m_list->setItem(0, 1, new QTableWidgetItem("00000000 (None)")); + + m_list->setItem(1, 0, new QTableWidgetItem(tr("Game Title"))); + m_list->setItem(1, 1, new QTableWidgetItem("Happy with rpcs3 (free)")); + + m_list->setItem(2, 0, new QTableWidgetItem(tr("Subtitle"))); + m_list->setItem(2, 1, new QTableWidgetItem("You devs are great")); + + m_list->setItem(3, 0, new QTableWidgetItem(tr("Detail"))); + m_list->setItem(3, 1, new QTableWidgetItem("Stub it first")); + + m_list->setItem(4, 0, new QTableWidgetItem(tr("Copyable"))); + m_list->setItem(4, 1, new QTableWidgetItem("1 (Not allowed)")); + + m_list->setItem(5, 0, new QTableWidgetItem(tr("Play Time"))); + m_list->setItem(5, 1, new QTableWidgetItem("00:00:00")); + //Maybe there should be more details of save data. + //But i'm getting bored for assign it one by one. + + m_list->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); +} + +//This dialog represents the Menu of Save Data Utility - which pop up after when you roll to a save and press triangle. +//I've ever thought of make it a right-click menu or a show-hide panel of the main dialog. +//Well only when those function calls related get implemented we can tell what this GUI should be, seriously. +save_data_manage_dialog::save_data_manage_dialog(QWidget* parent, unsigned int* sort_type, save_data_entry& save) + : QDialog(parent) +{ + setWindowTitle(tr("Save Data Pop-up Menu")); + setMinimumSize(QSize(400, 110)); + + // "Sort By" ComboBox + m_sort_options = new QComboBox(this); + m_sort_options->setEditable(false); + //You might change this - of corse we should know what to been set - maybe after functions related been implemented. + m_sort_options->addItem(tr("User Id")); + m_sort_options->addItem(tr("Game Title")); + m_sort_options->addItem(tr("Game Subtitle")); + m_sort_options->addItem(tr("Play Time")); + m_sort_options->addItem(tr("Data Size")); + m_sort_options->addItem(tr("Last Modified")); + m_sort_options->addItem(tr("Created Time")); + m_sort_options->addItem(tr("Accessed Time")); + m_sort_options->addItem(tr("Modified Time")); + m_sort_options->addItem(tr("Modify Time")); + + m_sort_type = sort_type; + if (m_sort_type != nullptr) + { + //Check sort type and set it to combo box + if (*m_sort_type >= m_sort_options->count()) + { + *m_sort_type = 0; + } + } + m_sort_options->setCurrentIndex(*m_sort_type); + + // Buttons + QPushButton* pb_sort_action = new QPushButton(tr("&Apply"), this); + QPushButton* pb_copy = new QPushButton(tr("&Copy"), this); + QPushButton* pb_delete = new QPushButton(tr("&Delete"), this); + QPushButton* pb_info = new QPushButton(tr("&Info"), this); + QPushButton* pb_close = new QPushButton(tr("&Close"), this); + + // Sort Layout + QHBoxLayout* hbox_sort = new QHBoxLayout(); + hbox_sort->setAlignment(Qt::AlignCenter); + hbox_sort->addWidget(new QLabel(tr("Sort By"), this)); + hbox_sort->addWidget(m_sort_options); + hbox_sort->addWidget(pb_sort_action); + + // Button Layout + QHBoxLayout* hbox_actions = new QHBoxLayout(); + hbox_actions->setAlignment(Qt::AlignCenter); + hbox_actions->addWidget(pb_copy); + hbox_actions->addWidget(pb_delete); + hbox_actions->addWidget(pb_info); + hbox_actions->addWidget(pb_close); + + // Main Layout + QVBoxLayout* vbox_manage = new QVBoxLayout(); + vbox_manage->setAlignment(Qt::AlignCenter); + vbox_manage->addLayout(hbox_sort); + vbox_manage->addLayout(hbox_actions); + setLayout(vbox_manage); + + // Events + connect(pb_sort_action, &QAbstractButton::clicked, this, &save_data_manage_dialog::OnApplySort); + connect(pb_copy, &QAbstractButton::clicked, this, &save_data_manage_dialog::OnCopy); + connect(pb_delete, &QAbstractButton::clicked, this, &save_data_manage_dialog::OnDelete); + connect(pb_info, &QAbstractButton::clicked, this, &save_data_manage_dialog::OnInfo); + connect(pb_close, &QAbstractButton::clicked, this, &save_data_manage_dialog::close); +} +//Display information about the current selected save data. +//If selected is "New Save Data" or other invalid, this dialog would be initialized with "Info" disabled or not visible. +void save_data_manage_dialog::OnInfo() +{ + LOG_WARNING(HLE, "Stub - save_data_utility: save_data_manage_dialog: OnInfo called."); + save_data_information info; //It should get a real one for information.. finally + save_data_info_dialog* infoDialog = new save_data_info_dialog(this, info); + infoDialog->setModal(true); + infoDialog->show(); +} +//Copy selected save data to another. Might need a dialog but i just leave it as this. Or Modal Dialog. +void save_data_manage_dialog::OnCopy() +{ + LOG_WARNING(HLE, "Stub - save_data_utility: save_data_manage_dialog: OnCopy called."); +} +//Delete selected save data, need confirm. just a stub now. +void save_data_manage_dialog::OnDelete() +{ + LOG_WARNING(HLE, "Stub - save_data_utility: save_data_manage_dialog: OnDelete called."); +} +//This should return the sort setting of the save data list. Also not implemented really. +void save_data_manage_dialog::OnApplySort() +{ + *m_sort_type = m_sort_options->currentIndex(); + LOG_WARNING(HLE, "Stub - save_data_utility: save_data_manage_dialog: OnApplySort called. NAME=%s", + m_sort_options->itemText(m_sort_options->currentIndex()).toStdString().c_str()); +} + +//Show up the savedata list, either to choose one to save/load or to manage saves. +//I suggest to use function callbacks to give save data list or get save data entry. (Not implemented or stubbed) +save_data_list_dialog::save_data_list_dialog(QWidget* parent, bool enable_manage) + : QDialog(parent) +{ + setWindowTitle(tr("Save Data Utility")); + setMinimumSize(QSize(400, 400)); + + QLabel* l_description = new QLabel(tr("This is only a stub for now. This doesn't work yet due to related functions not being implemented."), this); + l_description->setWordWrap(400); + + // Table + m_list = new QTableWidget(this); + //m_list->setItemDelegate(new table_item_delegate(this)); // to get rid of cell selection rectangles include "table_item_delegate.h" + //m_list->setSelectionBehavior(QAbstractItemView::SelectRows); // enable to only select whole rows instead of items + m_list->setEditTriggers(QAbstractItemView::NoEditTriggers); + m_list->setContextMenuPolicy(Qt::CustomContextMenu); + m_list->setColumnCount(3); + m_list->setHorizontalHeaderLabels(QStringList() << tr("Game ID") << tr("Save ID") << tr("Detail")); + + // Button Layout + QHBoxLayout* hbox_action = new QHBoxLayout(); + QPushButton *m_close = new QPushButton(tr("&Close"), this); + + //If do not need manage, hide it, like just a save data picker. + if (!enable_manage) + { + QPushButton *m_select = new QPushButton(tr("&Select"), this); + connect(m_select, &QAbstractButton::clicked, this, &save_data_list_dialog::OnSelect); + hbox_action->addWidget(m_select); + setWindowTitle(tr("Save Data Chooser")); + } + else { + QPushButton *m_manage = new QPushButton(tr("&Manage"), this); + connect(m_manage, &QAbstractButton::clicked, this, &save_data_list_dialog::OnManage); + hbox_action->addWidget(m_manage); + } + + hbox_action->addStretch(); + hbox_action->addWidget(m_close); + + // events + connect(m_close, &QAbstractButton::clicked, this, &save_data_list_dialog::close); + connect(m_list, &QTableWidget::itemClicked, this, &save_data_list_dialog::OnEntryInfo); + connect(m_list, &QTableWidget::customContextMenuRequested, this, &save_data_list_dialog::ShowContextMenu); + connect(m_list->horizontalHeader(), &QHeaderView::sectionClicked, [=](int col){ + // Sort entries, update columns and refresh the panel. Taken from game_list_frame + m_sortColumn = col; + OnSort(m_sortColumn); + UpdateList(); + }); + + // main layout + QVBoxLayout* vbox_main = new QVBoxLayout(); + vbox_main->setAlignment(Qt::AlignCenter); + vbox_main->addWidget(l_description); + vbox_main->addWidget(m_list); + vbox_main->addLayout(hbox_action); + setLayout(vbox_main); + + LoadEntries(); + UpdateList(); +} +//After you pick a menu item from the sort sub-menu +void save_data_list_dialog::OnSort(int id) +{ + int idx = id; + LOG_WARNING(HLE, "Stub - save_data_utility: save_data_list_dialog: OnSort called. Type Value:%d", idx); + if ((idx < m_sort_type_count) && (idx >= 0)) + { + m_sort_type = idx; + + if (m_sort_type == m_sortColumn) + { + m_sortAscending ^= true; + } + else + { + m_sortAscending = true; + } + // someSort(m_sort_type, m_sortAscending) + // look at game_list_frame sortGameData for reference + } +} +//Copy a existing save, need to get more arguments. maybe a new dialog. +void save_data_list_dialog::OnEntryCopy() +{ + int idx = m_list->currentRow(); + if (idx != -1) + { + LOG_WARNING(HLE, "Stub - save_data_utility: save_data_list_dialog: OnEntryCopy called."); + //Some Operations? + UpdateList(); + } +} +//Remove a save file, need to be confirmed. +void save_data_list_dialog::OnEntryRemove() +{ + int idx = m_list->currentRow(); + if (idx != -1) + { + LOG_WARNING(HLE, "Stub - save_data_utility: save_data_list_dialog: OnEntryRemove called."); + //Some Operations? + UpdateList(); + } +} +//Display info dialog directly. +void save_data_list_dialog::OnEntryInfo() +{ + int idx = m_list->currentRow(); + if (idx != -1) + { + LOG_WARNING(HLE, "Stub - save_data_utility: save_data_list_dialog: OnEntryInfo called."); + save_data_information info; //Only a stub now. + save_data_info_dialog* infoDialog = new save_data_info_dialog(this, info); + infoDialog->setModal(true); + infoDialog->show(); + } +} +//Display info dialog directly. +void save_data_list_dialog::OnManage() +{ + int idx = m_list->currentRow(); + if (idx != -1) + { + LOG_WARNING(HLE, "Stub - save_data_utility: save_data_list_dialog: OnManage called."); + save_data_entry save; //Only a stub now. + save_data_manage_dialog* manageDialog = new save_data_manage_dialog(this, &m_sort_type, save); + manageDialog->setModal(true); + manageDialog->show(); + } +} +//When you press that select button in the Chooser mode. +void save_data_list_dialog::OnSelect() +{ + int idx = m_list->currentRow(); + if (idx != -1) + { + LOG_WARNING(HLE, "Stub - save_data_utility: save_data_list_dialog: OnSelect called."); + setModal(false); + } +} +//Pop-up a small context-menu, being a replacement for save_data_manage_dialog +void save_data_list_dialog::ShowContextMenu(const QPoint &pos) +{ + QPoint globalPos = m_list->mapToGlobal(pos); + QMenu* menu = new QMenu(); + int idx = m_list->currentRow(); + + userIDAct = new QAction(tr("UserID"), this); + titleAct = new QAction(tr("Title"), this); + subtitleAct = new QAction(tr("Subtitle"), this); + copyAct = new QAction(tr("&Copy"), this); + removeAct = new QAction(tr("&Remove"), this); + infoAct = new QAction(tr("&Info"), this); + + //This is also a stub for the sort setting. Ids is set according to their sort-type integer. + m_sort_options = new QMenu(tr("&Sort")); + m_sort_options->addAction(userIDAct); + m_sort_options->addAction(titleAct); + m_sort_options->addAction(subtitleAct); + m_sort_type_count = 3; // set this !!! + + menu->addMenu(m_sort_options); + menu->addSeparator(); + menu->addAction(copyAct); + menu->addAction(removeAct); + menu->addSeparator(); + menu->addAction(infoAct); + + copyAct->setEnabled(idx != -1); + removeAct->setEnabled(idx != -1); + + //Events + connect(copyAct, &QAction::triggered, this, &save_data_list_dialog::OnEntryCopy); + connect(removeAct, &QAction::triggered, this, &save_data_list_dialog::OnEntryRemove); + connect(infoAct, &QAction::triggered, this, &save_data_list_dialog::OnEntryInfo); + + connect(userIDAct, &QAction::triggered, this, [=] {OnSort(0); }); + connect(titleAct, &QAction::triggered, this, [=] {OnSort(1); }); + connect(subtitleAct, &QAction::triggered, this, [=] {OnSort(2); }); + + menu->exec(globalPos); +} +//This is intended to load the save data list from a way. However that is not certain for a stub. Does nothing now. +void save_data_list_dialog::LoadEntries(void) +{ + +} +//Setup some static items just for display. +void save_data_list_dialog::UpdateList(void) +{ + m_list->clearContents(); + m_list->setRowCount(2); // set this to number of entries + + m_list->setItem(0, 0, new QTableWidgetItem("TEST00000")); + m_list->setItem(0, 1, new QTableWidgetItem("00")); + m_list->setItem(0, 2, new QTableWidgetItem("Final battle")); + + m_list->setItem(1, 0, new QTableWidgetItem("XXXX99876")); + m_list->setItem(1, 1, new QTableWidgetItem("30")); + m_list->setItem(1, 2, new QTableWidgetItem("This is a fake game")); + + m_list->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); +} diff --git a/rpcs3/rpcs3qt/save_data_utility.h b/rpcs3/rpcs3qt/save_data_utility.h new file mode 100644 index 0000000000..5f8255b766 --- /dev/null +++ b/rpcs3/rpcs3qt/save_data_utility.h @@ -0,0 +1,100 @@ +#ifndef SAVEDATAUTILITY_H +#define SAVEDATAUTILITY_H + +#include +#include +#include +#include +#include +#include +#include +#include + +//TODO: Implement function calls related to Save Data List. +//Those function calls may be needed to use this GUI. +//Currently this is only a stub. + +//A stub for the struct sent to save_data_info_dialog. +struct save_data_information +{ + +}; +//A stub for the sorting. +enum +{ + SAVE_DATA_LIST_SORT_BY_USERID +}; +//A stub for a single entry of save data. used to make a save data list or do management. +struct save_data_entry +{ + +}; + +//Used to display the information of a savedata. +//Not sure about what information should be displayed. +class save_data_info_dialog :public QDialog +{ + Q_OBJECT + + QTableWidget* m_list; + + void UpdateData(); +public: + save_data_info_dialog(QWidget* parent, const save_data_information& info); +}; + +//Simple way to show up the sort menu and other operations +//Like what you get when press Triangle on SaveData. +class save_data_manage_dialog :public QDialog +{ + Q_OBJECT + + QComboBox* m_sort_options; + unsigned int* m_sort_type; + +private slots: + void OnInfo(); + void OnCopy(); + void OnDelete(); + void OnApplySort(); +public: + save_data_manage_dialog(QWidget* parent, unsigned int* sort_type, save_data_entry& save); +}; + +//Display a list of SaveData. Would need to be initialized. +//Can also be used as a Save Data Chooser. +class save_data_list_dialog : public QDialog +{ + Q_OBJECT + + QTableWidget* m_list; + QMenu* m_sort_options; + unsigned int m_sort_type; + unsigned int m_sort_type_count; + + int m_sortColumn; + bool m_sortAscending; + + void LoadEntries(void); + void UpdateList(void); +public: + save_data_list_dialog(QWidget* parent, bool enable_manage); +private: + QAction* userIDAct; + QAction* titleAct; + QAction* subtitleAct; + QAction* copyAct; + QAction* removeAct; + QAction* infoAct; + + void OnSort(int id); +private slots: + void OnSelect(); + void OnManage(); + void OnEntryCopy(); + void OnEntryRemove(); + void OnEntryInfo(); + void ShowContextMenu(const QPoint &pos); +}; + +#endif // !SAVEDATAUTILITY_H diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp new file mode 100644 index 0000000000..870915ab0c --- /dev/null +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -0,0 +1,72 @@ +#include +#include +#include + +#include "core_tab.h" +#include "graphics_tab.h" +#include "audio_tab.h" +#include "input_tab.h" +#include "misc_tab.h" +#include "gui_tab.h" +#include "networking_tab.h" +#include "system_tab.h" +#include "settings_dialog.h" +#include "emu_settings.h" + +settings_dialog::settings_dialog(std::shared_ptr xgui_settings, Render_Creator r_Creator, QWidget *parent, GameInfo* game) : QDialog(parent) +{ + std::shared_ptr xemu_settings; + if (game) + { + xemu_settings.reset(new emu_settings("data/" + game->serial)); + setWindowTitle(tr("Settings: [") + qstr(game->serial) + "] " + qstr(game->name)); + } + else + { + xemu_settings.reset(new emu_settings("")); + setWindowTitle(tr("Settings")); + } + + core_tab* coreTab = new core_tab(xemu_settings, this); + + QPushButton *okButton = new QPushButton(tr("OK")); + QPushButton *cancelButton = new QPushButton(tr("Cancel")); + cancelButton->setDefault(true); + + tabWidget = new QTabWidget; + tabWidget->setUsesScrollButtons(false); + tabWidget->addTab(coreTab, tr("Core")); + tabWidget->addTab(new graphics_tab(xemu_settings, r_Creator, this), tr("Graphics")); + tabWidget->addTab(new audio_tab(xemu_settings, this), tr("Audio")); + tabWidget->addTab(new input_tab(xemu_settings, this), tr("Input / Output")); + tabWidget->addTab(new misc_tab(xemu_settings, this), tr("Misc")); + tabWidget->addTab(new networking_tab(xemu_settings, this), tr("Networking")); + tabWidget->addTab(new system_tab(xemu_settings, this), tr("System")); + + if (!game) + { // Don't add gui tab to game settings. + gui_tab* guiTab = new gui_tab(xgui_settings, this); + tabWidget->addTab(guiTab, tr("GUI")); + connect(guiTab, &gui_tab::GuiSettingsSyncRequest, this, &settings_dialog::GuiSettingsSyncRequest); + connect(guiTab, &gui_tab::GuiSettingsSaveRequest, this, &settings_dialog::GuiSettingsSaveRequest); + connect(guiTab, &gui_tab::GuiStylesheetRequest, this, &settings_dialog::GuiStylesheetRequest); + connect(okButton, &QAbstractButton::clicked, guiTab, &gui_tab::Accept); + } + + // Various connects + connect(okButton, &QAbstractButton::clicked, coreTab, &core_tab::SaveSelectedLibraries); + connect(okButton, &QAbstractButton::clicked, xemu_settings.get(), &emu_settings::SaveSettings); + connect(okButton, &QAbstractButton::clicked, this, &QDialog::accept); + connect(cancelButton, &QAbstractButton::clicked, this, &QWidget::close); + connect(tabWidget, &QTabWidget::currentChanged, [=]() {cancelButton->setFocus(); }); + + QHBoxLayout *buttonsLayout = new QHBoxLayout; + buttonsLayout->addStretch(); + buttonsLayout->addWidget(okButton); + buttonsLayout->addWidget(cancelButton); + + QVBoxLayout *mainLayout = new QVBoxLayout; + mainLayout->addWidget(tabWidget); + mainLayout->addLayout(buttonsLayout); + setLayout(mainLayout); +} diff --git a/rpcs3/rpcs3qt/settings_dialog.h b/rpcs3/rpcs3qt/settings_dialog.h new file mode 100644 index 0000000000..5dd6588344 --- /dev/null +++ b/rpcs3/rpcs3qt/settings_dialog.h @@ -0,0 +1,28 @@ +#ifndef SETTINGSDIALOG_H +#define SETTINGSDIALOG_H + +#include "gui_settings.h" +#include "emu_settings.h" + +#include "Emu/GameInfo.h" + +#include +#include + +#include + +class settings_dialog : public QDialog +{ + Q_OBJECT + +public: + explicit settings_dialog(std::shared_ptr xSettings, Render_Creator r_Creator, QWidget *parent = 0, GameInfo *game = nullptr); +signals: + void GuiSettingsSyncRequest(); + void GuiStylesheetRequest(const QString& path); + void GuiSettingsSaveRequest(); +private: + QTabWidget *tabWidget; +}; + +#endif // SETTINGSDIALOG_H diff --git a/rpcs3/rpcs3qt/settingsdialog.cpp b/rpcs3/rpcs3qt/settingsdialog.cpp deleted file mode 100644 index 545e899caf..0000000000 --- a/rpcs3/rpcs3qt/settingsdialog.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#ifdef QT_UI - -#include -#include -#include - -#include "coretab.h" -#include "graphicstab.h" -#include "audiotab.h" -#include "inputtab.h" -#include "misctab.h" -#include "networkingtab.h" -#include "systemtab.h" -#include "settingsdialog.h" - -SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent) -{ - tabWidget = new QTabWidget; - tabWidget->addTab(new CoreTab(this), tr("Core")); - tabWidget->addTab(new GraphicsTab(this), tr("Graphics")); - tabWidget->addTab(new AudioTab(this), tr("Audio")); - tabWidget->addTab(new InputTab(this), tr("Input / Output")); - tabWidget->addTab(new MiscTab(this), tr("Misc")); - tabWidget->addTab(new NetworkingTab(this), tr("Networking")); - tabWidget->addTab(new SystemTab(this), tr("System")); - - QPushButton *okButton = new QPushButton(tr("OK")); - connect(okButton, &QAbstractButton::clicked, this, &QDialog::accept); - - QPushButton *cancelButton = new QPushButton(tr("Cancel")); - cancelButton->setDefault(true); - connect(cancelButton, &QAbstractButton::clicked, this, &QWidget::close); - - QHBoxLayout *buttonsLayout = new QHBoxLayout; - buttonsLayout->addStretch(); - buttonsLayout->addWidget(okButton); - buttonsLayout->addWidget(cancelButton); - - QVBoxLayout *mainLayout = new QVBoxLayout; - mainLayout->addWidget(tabWidget); - mainLayout->addLayout(buttonsLayout); - setLayout(mainLayout); - - cancelButton->setFocus(); - - setWindowTitle(tr("Settings")); -} - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/settingsdialog.h b/rpcs3/rpcs3qt/settingsdialog.h deleted file mode 100644 index d60ab9cc93..0000000000 --- a/rpcs3/rpcs3qt/settingsdialog.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SETTINGSDIALOG_H -#define SETTINGSDIALOG_H - -#include -#include - -class SettingsDialog : public QDialog -{ - Q_OBJECT - -public: - explicit SettingsDialog(QWidget *parent = 0); - -private: - QTabWidget *tabWidget; -}; - -#endif // SETTINGSDIALOG_H diff --git a/rpcs3/rpcs3qt/system_tab.cpp b/rpcs3/rpcs3qt/system_tab.cpp new file mode 100644 index 0000000000..c08d51250e --- /dev/null +++ b/rpcs3/rpcs3qt/system_tab.cpp @@ -0,0 +1,33 @@ +#include +#include +#include +#include +#include + +#include "system_tab.h" + +system_tab::system_tab(std::shared_ptr xemu_settings, QWidget *parent) : QWidget(parent) +{ + // Language + QGroupBox *sysLang = new QGroupBox(tr("Language")); + + QComboBox *sysLangBox = xemu_settings->CreateEnhancedComboBox(emu_settings::Language, this); + + QVBoxLayout *sysLangVbox = new QVBoxLayout; + sysLangVbox->addWidget(sysLangBox); + sysLang->setLayout(sysLangVbox); + + // Checkboxes + QCheckBox *enableHostRoot = xemu_settings->CreateEnhancedCheckBox(emu_settings::EnableHostRoot, this); + + // Main layout + QVBoxLayout *vbox = new QVBoxLayout; + vbox->addWidget(enableHostRoot); + vbox->addWidget(sysLang); + vbox->addStretch(); + + QHBoxLayout *hbox = new QHBoxLayout; + hbox->addLayout(vbox); + hbox->addStretch(); + setLayout(hbox); +} diff --git a/rpcs3/rpcs3qt/system_tab.h b/rpcs3/rpcs3qt/system_tab.h new file mode 100644 index 0000000000..c368425b78 --- /dev/null +++ b/rpcs3/rpcs3qt/system_tab.h @@ -0,0 +1,22 @@ +#ifndef SYSTEMTAB_H +#define SYSTEMTAB_H + +#include "emu_settings.h" + +#include + +#include + +class system_tab : public QWidget +{ + Q_OBJECT + +public: + explicit system_tab(std::shared_ptr xemu_settings, QWidget *parent = 0); + +signals: + +public slots: +}; + +#endif // SYSTEMTAB_H diff --git a/rpcs3/rpcs3qt/systemtab.cpp b/rpcs3/rpcs3qt/systemtab.cpp deleted file mode 100644 index d5ca455b4d..0000000000 --- a/rpcs3/rpcs3qt/systemtab.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#ifdef QT_UI - -#include -#include -#include -#include -#include - -#include "systemtab.h" - -SystemTab::SystemTab(QWidget *parent) : QWidget(parent) -{ - // Language - QGroupBox *sysLang = new QGroupBox(tr("Language")); - - QComboBox *sysLangBox = new QComboBox; - sysLangBox->addItem(tr("Japanese")); - sysLangBox->addItem(tr("English (US)")); - sysLangBox->addItem(tr("French")); - sysLangBox->addItem(tr("Spanish")); - sysLangBox->addItem(tr("German")); - sysLangBox->addItem(tr("Italian")); - sysLangBox->addItem(tr("Dutch")); - sysLangBox->addItem(tr("Portuguese (PT)")); - sysLangBox->addItem(tr("Russian")); - sysLangBox->addItem(tr("Korean")); - sysLangBox->addItem(tr("Chinese (Trad.)")); - sysLangBox->addItem(tr("Chinese (Simp.)")); - sysLangBox->addItem(tr("Finnish")); - sysLangBox->addItem(tr("Swedish")); - sysLangBox->addItem(tr("Danish")); - sysLangBox->addItem(tr("Norwegian")); - sysLangBox->addItem(tr("Polish")); - sysLangBox->addItem(tr("English (UK)")); - - QVBoxLayout *sysLangVbox = new QVBoxLayout; - sysLangVbox->addWidget(sysLangBox); - sysLang->setLayout(sysLangVbox); - - // Checkboxes - QCheckBox *enableHostRoot = new QCheckBox(tr("Enable /host_root/")); - - // Main layout - QVBoxLayout *vbox = new QVBoxLayout; - vbox->addWidget(enableHostRoot); - vbox->addWidget(sysLang); - vbox->addStretch(); - - QHBoxLayout *hbox = new QHBoxLayout; - hbox->addLayout(vbox); - hbox->addStretch(); - setLayout(hbox); -} - -#endif // QT_UI diff --git a/rpcs3/rpcs3qt/systemtab.h b/rpcs3/rpcs3qt/systemtab.h deleted file mode 100644 index 3c6c5b4466..0000000000 --- a/rpcs3/rpcs3qt/systemtab.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SYSTEMTAB_H -#define SYSTEMTAB_H - -#include - -class SystemTab : public QWidget -{ - Q_OBJECT - -public: - explicit SystemTab(QWidget *parent = 0); - -signals: - -public slots: -}; - -#endif // SYSTEMTAB_H diff --git a/rpcs3/rpcs3qt/table_item_delegate.h b/rpcs3/rpcs3qt/table_item_delegate.h new file mode 100644 index 0000000000..202bceb483 --- /dev/null +++ b/rpcs3/rpcs3qt/table_item_delegate.h @@ -0,0 +1,14 @@ +#ifndef TABLEITEMDELEGATE_H +#define TABLEITEMDELEGATE_H + +#include + +/** This class is used to get rid of somewhat ugly item focus rectangles. You could change the rectangle instead of omiting it if you wanted */ +class table_item_delegate : public QItemDelegate +{ +public: + explicit table_item_delegate(QObject *parent = 0) {} + virtual void drawFocus(QPainter * /*painter*/, const QStyleOptionViewItem & /*option*/, const QRect & /*rect*/) const {} +}; + +#endif // !TABLEITEMDELEGATE_H diff --git a/rpcs3/rpcs3qt/welcome_dialog.cpp b/rpcs3/rpcs3qt/welcome_dialog.cpp new file mode 100644 index 0000000000..68ff83b7ea --- /dev/null +++ b/rpcs3/rpcs3qt/welcome_dialog.cpp @@ -0,0 +1,129 @@ +#include "welcome_dialog.h" + +#include "gui_settings.h" + +#include "Emu/System.h" + +#include +#include +#include +#include +#include + +welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent) +{ + gui_settings* settings = new gui_settings(this); + + QPushButton* okay = new QPushButton(tr("Okay")); + okay->setEnabled(false); + + QCheckBox* do_not_show = new QCheckBox(tr("Do not show again")); + QCheckBox* i_have_read = new QCheckBox(tr("I have read the quickstart guide (required)")); + + connect(i_have_read, &QCheckBox::clicked, [=](bool checked) + { + okay->setEnabled(checked); + }); + + connect(do_not_show, &QCheckBox::clicked, [=](bool checked) + { + settings->SetValue(GUI::ib_show_welcome, QVariant(!checked)); + }); + + connect(okay, &QPushButton::pressed, this, &QDialog::accept); + + QIcon rpcs3_icon = QIcon(":/rpcs3.ico"); + QLabel* icon = new QLabel(this); + icon->setPixmap(rpcs3_icon.pixmap(120, 120)); + icon->setAlignment(Qt::AlignLeft); + + QLabel* header_1 = new QLabel(tr( + "

Welcome to RPCS3

" + )); + + QFont header_font; + header_font.setPointSize(12); + + header_1->setFont(header_font); + header_1->setFixedWidth(400); + header_1->setWordWrap(true); + + QLabel* header_2 = new QLabel(tr( + "

An open-source PlayStation 3 emulator for Windows and Linux funded with Patreon!

" + )); + + header_2->setFixedWidth(400); + header_2->setWordWrap(true); + + QLabel* caption = new QLabel(tr( + "To get started, you need to install the PlayStation 3 firmware.
" + "Check out our quickstart guide for further information.
" + "If you have any questions, please have a look at our FAQ.
" + "Otherwise, further discussion and support can be found at our forums " + "or on our discord server.
" + )); + + QFont caption_font; + caption_font.setPointSize(10); + caption_font.setWeight(QFont::Medium); + + caption->setFont(caption_font); + caption->setFixedWidth(550); + caption->setWordWrap(true); + caption->setOpenExternalLinks(true); + caption->setAlignment(Qt::AlignLeft); + + QLabel* piracy = new QLabel(tr( + "RPCS3 does NOT condone piracy. You must dump your own games." + )); + piracy->setWordWrap(true); + piracy->setAlignment(Qt::AlignCenter); + + // Header Layout + QVBoxLayout* header_layout = new QVBoxLayout(); + header_layout->setAlignment(Qt::AlignLeft); + header_layout->addWidget(header_1); + header_layout->addWidget(header_2); + + // Caption Layout + QVBoxLayout* caption_layout = new QVBoxLayout(); + caption_layout->addWidget(caption); + caption_layout->addWidget(piracy); + + // Top Layout + QHBoxLayout* top_layout = new QHBoxLayout(); + top_layout->setAlignment(Qt::AlignCenter); + top_layout->addStretch(); + top_layout->addWidget(icon); + top_layout->addStretch(); + top_layout->addLayout(header_layout); + top_layout->addStretch(); + + // Bottom Layout + QHBoxLayout* bottom_layout = new QHBoxLayout(); + bottom_layout->setAlignment(Qt::AlignCenter); + bottom_layout->addLayout(caption_layout); + + // Button Layout + QHBoxLayout* button_layout = new QHBoxLayout(); + button_layout->addWidget(okay); + button_layout->addSpacing(15); + button_layout->addWidget(i_have_read); + button_layout->addStretch(); + button_layout->addWidget(do_not_show); + + // Main Layout + QVBoxLayout* layout = new QVBoxLayout(); + top_layout->addStretch(); + layout->addLayout(top_layout); + layout->addLayout(bottom_layout); + layout->addSpacing(25); + layout->addLayout(button_layout); + + setFixedSize(600, 350); + + setWindowIcon(rpcs3_icon); + setWindowTitle(tr("Welcome to RPCS3")); + setWindowFlags(Qt::WindowTitleHint); + setLayout(layout); +} diff --git a/rpcs3/rpcs3qt/welcome_dialog.h b/rpcs3/rpcs3qt/welcome_dialog.h new file mode 100644 index 0000000000..d95555e11f --- /dev/null +++ b/rpcs3/rpcs3qt/welcome_dialog.h @@ -0,0 +1,16 @@ +#ifndef WELCOME_DIALOG_H +#define WELCOME_DIALOG_H + +#include +#include +#include + +class welcome_dialog : public QDialog +{ + Q_OBJECT + +public: + explicit welcome_dialog(QWidget* parent = nullptr); +}; + +#endif diff --git a/rpcs3/stdafx_gui.h b/rpcs3/stdafx_gui.h deleted file mode 100644 index 249bf765c4..0000000000 --- a/rpcs3/stdafx_gui.h +++ /dev/null @@ -1,74 +0,0 @@ -#pragma once - -#include "restore_new.h" - -#ifdef _MSC_VER -#pragma warning(push, 0) -#else -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -#include "define_new_memleakdetect.h" - -namespace fmt -{ - // Convert a null-terminated wxString to a std::string encoded in utf8 - inline std::string ToUTF8(const wxString& right) - { - return static_cast(right.utf8_str()); - } - - // Convert a null-terminated std::string encoded in utf8 to a wxString - inline wxString FromUTF8(const std::string& right) - { - return wxString::FromUTF8(right.c_str()); - } -} - -#include "yaml-cpp/yaml.h" - -// Global GUI config -extern YAML::Node g_gui_cfg; - -// Save global GUI config -extern void save_gui_cfg(); diff --git a/rpcs3/XInputPadHandler.cpp b/rpcs3/xinput_pad_handler.cpp similarity index 90% rename from rpcs3/XInputPadHandler.cpp rename to rpcs3/xinput_pad_handler.cpp index 9c488b8abf..3b2f681e3e 100644 --- a/rpcs3/XInputPadHandler.cpp +++ b/rpcs3/xinput_pad_handler.cpp @@ -1,7 +1,7 @@ #include "stdafx.h" -#include "stdafx_gui.h" + #ifdef _MSC_VER -#include "XInputPadHandler.h" +#include "xinput_pad_handler.h" namespace { const DWORD THREAD_TIMEOUT = 1000; @@ -23,16 +23,16 @@ namespace { } } -XInputPadHandler::XInputPadHandler() : active(false), thread(nullptr), library(nullptr), xinputGetState(nullptr), xinputEnable(nullptr), xinputSetState(nullptr) +xinput_pad_handler::xinput_pad_handler() : active(false), thread(nullptr), library(nullptr), xinputGetState(nullptr), xinputEnable(nullptr), xinputSetState(nullptr) { } -XInputPadHandler::~XInputPadHandler() +xinput_pad_handler::~xinput_pad_handler() { Close(); } -void XInputPadHandler::Init(const u32 max_connect) +void xinput_pad_handler::Init(const u32 max_connect) { for (auto it : LIBRARY_FILENAMES) { @@ -104,11 +104,11 @@ void XInputPadHandler::Init(const u32 max_connect) } active = true; - thread = CreateThread(NULL, 0, &XInputPadHandler::ThreadProcProxy, this, 0, NULL); + thread = CreateThread(NULL, 0, &xinput_pad_handler::ThreadProcProxy, this, 0, NULL); } } -void XInputPadHandler::SetRumble(const u32 pad, u8 largeMotor, bool smallMotor) { +void xinput_pad_handler::SetRumble(const u32 pad, u8 largeMotor, bool smallMotor) { if (pad > m_pads.size()) return; @@ -116,7 +116,7 @@ void XInputPadHandler::SetRumble(const u32 pad, u8 largeMotor, bool smallMotor) m_pads[pad].m_vibrateMotors[1].m_value = smallMotor ? 255 : 0; } -void XInputPadHandler::Close() +void xinput_pad_handler::Close() { if (library) { @@ -137,7 +137,7 @@ void XInputPadHandler::Close() m_pads.clear(); } -DWORD XInputPadHandler::ThreadProcedure() +DWORD xinput_pad_handler::ThreadProcedure() { // holds internal controller state change std::array last_connection_status = {}; @@ -204,9 +204,9 @@ DWORD XInputPadHandler::ThreadProcedure() return 0; } -DWORD WINAPI XInputPadHandler::ThreadProcProxy(LPVOID parameter) +DWORD WINAPI xinput_pad_handler::ThreadProcProxy(LPVOID parameter) { - return reinterpret_cast(parameter)->ThreadProcedure(); + return reinterpret_cast(parameter)->ThreadProcedure(); } #endif diff --git a/rpcs3/XInputPadHandler.h b/rpcs3/xinput_pad_handler.h similarity index 78% rename from rpcs3/XInputPadHandler.h rename to rpcs3/xinput_pad_handler.h index c159688caa..391817e83c 100644 --- a/rpcs3/XInputPadHandler.h +++ b/rpcs3/xinput_pad_handler.h @@ -1,13 +1,15 @@ -#pragma once +#ifndef X_INPUT_PAD_HANDLER +#define X_INPUT_PAD_HANDLER #include "Emu/Io/PadHandler.h" +#include #include -class XInputPadHandler final : public PadHandlerBase +class xinput_pad_handler final : public PadHandlerBase { public: - XInputPadHandler(); - ~XInputPadHandler(); + xinput_pad_handler(); + ~xinput_pad_handler(); void Init(const u32 max_connect) override; void SetRumble(const u32 pad, u8 largeMotor, bool smallMotor) override; @@ -31,3 +33,5 @@ private: PFN_XINPUTENABLE xinputEnable; }; + +#endif diff --git a/rpcs3_default.props b/rpcs3_default.props index 2d94e56f07..e472dc741c 100644 --- a/rpcs3_default.props +++ b/rpcs3_default.props @@ -3,7 +3,7 @@ - .\;..\;..\asmjit\src\asmjit;..\Utilities\yaml-cpp\include;..\wxWidgets\src\zlib;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\hidapi\hidapi + .\;..\;..\asmjit\src\asmjit;..\Utilities\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\hidapi\hidapi $(SolutionDir)lib\$(Configuration)-$(Platform)\ $(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath) $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\ @@ -26,4 +26,4 @@
- + \ No newline at end of file diff --git a/wxWidgets b/wxWidgets deleted file mode 160000 index cbb799b1ae..0000000000 --- a/wxWidgets +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cbb799b1ae3f309c99beb0d287e9bb3b62ea405c diff --git a/zlib.props b/zlib.props index 6957ff5f01..cee4f2b086 100644 --- a/zlib.props +++ b/zlib.props @@ -32,7 +32,7 @@ versions do not match. The zlib version used in this build is recorded below: --> - $(SolutionDir)wxWidgets\src\zlib\ + $(SolutionDir)3rdparty\zlib\