pcsx2-wx: Finally remove it all

This commit is contained in:
Stenzek 2022-12-24 14:54:23 +10:00 committed by refractionpcsx2
parent 96a1c77577
commit 2b99f3c753
330 changed files with 4 additions and 66352 deletions

View File

@ -280,7 +280,7 @@ Plugins = ../lib/plugins
EOF
echo "Copy desktop/icon..."
cp "$PCSX2DIR/pcsx2/gui/Resources/AppIcon64.png" "$OUTDIR/PCSX2.png"
cp "$PCSX2DIR/pcsx2/Resources/AppIcon64.png" "$OUTDIR/PCSX2.png"
cp "$SCRIPTDIR/pcsx2-qt.desktop" "$OUTDIR/PCSX2.desktop"
cp "$SCRIPTDIR/AppRun-qt" "$OUTDIR/AppRun"

View File

@ -1,423 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31606.5
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rdparty", "3rdparty", "{78EBE642-7A4D-4EA7-86BE-5639C6646C38}"
ProjectSection(SolutionItems) = preProject
3rdparty\svn_readme.txt = 3rdparty\svn_readme.txt
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{2D6F0A62-A247-4CCF-947F-FCD54BE16103}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcsx2", "pcsx2\pcsx2.vcxproj", "{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}"
ProjectSection(ProjectDependencies) = postProject
{12728250-16EC-4DC6-94D7-E21DD88947F8} = {12728250-16EC-4DC6-94D7-E21DD88947F8}
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundTouch", "3rdparty\soundtouch\SoundTouch.vcxproj", "{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "3rdparty\zlib\zlib.vcxproj", "{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bin2cpp", "tools\bin2cpp\bin2c.vcxproj", "{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "3rdparty\libjpeg\libjpeg.vcxproj", "{BC236261-77E8-4567-8D09-45CD02965EB6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx30_config", "3rdparty\wxwidgets3.0\build\msw\wx30_config.vcxproj", "{01F4CE10-2CFB-41A8-B41F-E54337868A1D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx30_base", "3rdparty\wxwidgets3.0\build\msw\wx30_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx30_adv", "3rdparty\wxwidgets3.0\build\msw\wx30_adv.vcxproj", "{24C45343-FD20-5C92-81C1-35A2AE841E79}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx30_core", "3rdparty\wxwidgets3.0\build\msw\wx30_core.vcxproj", "{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "3rdparty\libpng\projects\vstudio\libpng\libpng.vcxproj", "{D6973076-9317-4EF2-A0B8-B7A18AC0713E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads4w", "3rdparty\pthreads4w\build\pthreads4w.vcxproj", "{0FAE817D-9A32-4830-857E-81DA57246E16}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "3rdparty\xz\liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fmt", "3rdparty\fmt\fmt.vcxproj", "{449AD25E-424A-4714-BABC-68706CDCC33B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchdr", "3rdparty\libchdr\libchdr.vcxproj", "{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpgd", "3rdparty\jpgd\jpgd.vcxproj", "{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common\common.vcxproj", "{4639972E-424E-4E13-8B07-CA403C481346}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glad", "3rdparty\glad\glad.vcxproj", "{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ryml", "3rdparty\rapidyaml\ryml.vcxproj", "{DE9653B6-17DD-356A-9EE0-28A731772587}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cubeb", "3rdparty\cubeb\cubeb.vcxproj", "{BF74C473-DC04-44B3-92E8-4145F4E77342}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simpleini", "3rdparty\simpleini\simpleini.vcxproj", "{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imgui", "3rdparty\imgui\imgui.vcxproj", "{88FB34EC-845E-4F21-A552-F1573B9ED167}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glslang", "3rdparty\glslang\glslang.vcxproj", "{EF6834A9-11F3-4331-BC34-21B325ABB180}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzip", "3rdparty\libzip\libzip.vcxproj", "{20B2E9FE-F020-42A0-B324-956F5B06EA68}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zstd", "3rdparty\zstd\zstd.vcxproj", "{52244028-937A-44E9-A76B-2BEA18FD239A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "d3d12memalloc", "3rdparty\d3d12memalloc\d3d12memalloc.vcxproj", "{D45CEC7A-3171-40DD-975D-E1544CF16139}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lzma", "3rdparty\lzma\lzma.vcxproj", "{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug AVX2|x64 = Debug AVX2|x64
Debug|x64 = Debug|x64
Devel AVX2|x64 = Devel AVX2|x64
Devel|x64 = Devel|x64
Release AVX2|x64 = Release AVX2|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Debug AVX2|x64.ActiveCfg = Debug AVX2|x64
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Debug AVX2|x64.Build.0 = Debug AVX2|x64
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Debug|x64.ActiveCfg = Debug|x64
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Debug|x64.Build.0 = Debug|x64
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Devel AVX2|x64.ActiveCfg = Devel AVX2|x64
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Devel AVX2|x64.Build.0 = Devel AVX2|x64
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Devel|x64.ActiveCfg = Devel|x64
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Devel|x64.Build.0 = Devel|x64
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Release AVX2|x64.ActiveCfg = Release AVX2|x64
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Release AVX2|x64.Build.0 = Release AVX2|x64
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Release|x64.ActiveCfg = Release|x64
{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}.Release|x64.Build.0 = Release|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Debug AVX2|x64.ActiveCfg = Debug|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Debug AVX2|x64.Build.0 = Debug|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Debug|x64.ActiveCfg = Debug|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Debug|x64.Build.0 = Debug|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Devel AVX2|x64.ActiveCfg = Devel|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Devel AVX2|x64.Build.0 = Devel|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Devel|x64.ActiveCfg = Devel|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Devel|x64.Build.0 = Devel|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Release AVX2|x64.ActiveCfg = Release|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Release AVX2|x64.Build.0 = Release|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Release|x64.ActiveCfg = Release|x64
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}.Release|x64.Build.0 = Release|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Debug AVX2|x64.ActiveCfg = Debug|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Debug AVX2|x64.Build.0 = Debug|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Debug|x64.ActiveCfg = Debug|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Debug|x64.Build.0 = Debug|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Devel AVX2|x64.ActiveCfg = Devel|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Devel AVX2|x64.Build.0 = Devel|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Devel|x64.ActiveCfg = Devel|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Devel|x64.Build.0 = Devel|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Release AVX2|x64.ActiveCfg = Release|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Release AVX2|x64.Build.0 = Release|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Release|x64.ActiveCfg = Release|x64
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Release|x64.Build.0 = Release|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Debug AVX2|x64.ActiveCfg = Debug|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Debug AVX2|x64.Build.0 = Debug|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Debug|x64.ActiveCfg = Debug|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Debug|x64.Build.0 = Debug|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Devel AVX2|x64.ActiveCfg = Devel|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Devel AVX2|x64.Build.0 = Devel|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Devel|x64.ActiveCfg = Devel|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Devel|x64.Build.0 = Devel|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Release AVX2|x64.ActiveCfg = Release|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Release AVX2|x64.Build.0 = Release|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Release|x64.ActiveCfg = Release|x64
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213}.Release|x64.Build.0 = Release|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Debug AVX2|x64.ActiveCfg = Debug|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Debug AVX2|x64.Build.0 = Debug|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Debug|x64.ActiveCfg = Debug|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Debug|x64.Build.0 = Debug|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Devel AVX2|x64.ActiveCfg = Devel|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Devel AVX2|x64.Build.0 = Devel|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Devel|x64.ActiveCfg = Devel|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Devel|x64.Build.0 = Devel|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Release AVX2|x64.ActiveCfg = Release|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Release AVX2|x64.Build.0 = Release|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Release|x64.ActiveCfg = Release|x64
{BC236261-77E8-4567-8D09-45CD02965EB6}.Release|x64.Build.0 = Release|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug AVX2|x64.ActiveCfg = Debug|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug AVX2|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}.Devel AVX2|x64.ActiveCfg = Devel|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Devel AVX2|x64.Build.0 = Devel|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Devel|x64.ActiveCfg = Devel|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Devel|x64.Build.0 = Devel|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release AVX2|x64.ActiveCfg = Release|x64
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release AVX2|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
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug AVX2|x64.ActiveCfg = Debug|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug AVX2|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}.Devel AVX2|x64.ActiveCfg = Devel|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Devel AVX2|x64.Build.0 = Devel|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Devel|x64.ActiveCfg = Devel|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Devel|x64.Build.0 = Devel|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release AVX2|x64.ActiveCfg = Release|x64
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release AVX2|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
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug AVX2|x64.ActiveCfg = Debug|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug AVX2|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}.Devel AVX2|x64.ActiveCfg = Devel|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Devel AVX2|x64.Build.0 = Devel|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Devel|x64.ActiveCfg = Devel|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Devel|x64.Build.0 = Devel|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Release AVX2|x64.ActiveCfg = Release|x64
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Release AVX2|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
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug AVX2|x64.ActiveCfg = Debug|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug AVX2|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}.Devel AVX2|x64.ActiveCfg = Devel|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Devel AVX2|x64.Build.0 = Devel|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Devel|x64.ActiveCfg = Devel|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Devel|x64.Build.0 = Devel|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release AVX2|x64.ActiveCfg = Release|x64
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release AVX2|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
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug AVX2|x64.ActiveCfg = Debug|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug AVX2|x64.Build.0 = Debug|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|x64.ActiveCfg = Debug|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Debug|x64.Build.0 = Debug|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Devel AVX2|x64.ActiveCfg = Devel|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Devel AVX2|x64.Build.0 = Devel|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Devel|x64.ActiveCfg = Devel|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Devel|x64.Build.0 = Devel|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release AVX2|x64.ActiveCfg = Release|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release AVX2|x64.Build.0 = Release|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.ActiveCfg = Release|x64
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.Build.0 = Release|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Debug AVX2|x64.ActiveCfg = Debug|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Debug AVX2|x64.Build.0 = Debug|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Debug|x64.ActiveCfg = Debug|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Debug|x64.Build.0 = Debug|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Devel AVX2|x64.ActiveCfg = Devel|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Devel AVX2|x64.Build.0 = Devel|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Devel|x64.ActiveCfg = Devel|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Devel|x64.Build.0 = Devel|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Release AVX2|x64.ActiveCfg = Release|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Release AVX2|x64.Build.0 = Release|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Release|x64.ActiveCfg = Release|x64
{0FAE817D-9A32-4830-857E-81DA57246E16}.Release|x64.Build.0 = Release|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug AVX2|x64.ActiveCfg = Debug|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug AVX2|x64.Build.0 = Debug|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.ActiveCfg = Debug|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.Build.0 = Debug|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel AVX2|x64.ActiveCfg = Devel|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel AVX2|x64.Build.0 = Devel|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel|x64.ActiveCfg = Devel|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Devel|x64.Build.0 = Devel|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Release AVX2|x64.ActiveCfg = Release|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Release AVX2|x64.Build.0 = Release|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.ActiveCfg = Release|x64
{12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.Build.0 = Release|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Debug AVX2|x64.ActiveCfg = Debug|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Debug AVX2|x64.Build.0 = Debug|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Debug|x64.ActiveCfg = Debug|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Debug|x64.Build.0 = Debug|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Devel AVX2|x64.ActiveCfg = Devel|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Devel AVX2|x64.Build.0 = Devel|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Devel|x64.ActiveCfg = Devel|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Devel|x64.Build.0 = Devel|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Release AVX2|x64.ActiveCfg = Release|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Release AVX2|x64.Build.0 = Release|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Release|x64.ActiveCfg = Release|x64
{449AD25E-424A-4714-BABC-68706CDCC33B}.Release|x64.Build.0 = Release|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Debug AVX2|x64.ActiveCfg = Debug|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Debug AVX2|x64.Build.0 = Debug|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Debug|x64.ActiveCfg = Debug|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Debug|x64.Build.0 = Debug|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Devel AVX2|x64.ActiveCfg = Devel|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Devel AVX2|x64.Build.0 = Devel|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Devel|x64.ActiveCfg = Devel|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Devel|x64.Build.0 = Devel|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Release AVX2|x64.ActiveCfg = Release|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Release AVX2|x64.Build.0 = Release|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Release|x64.ActiveCfg = Release|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Release|x64.Build.0 = Release|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug AVX2|x64.ActiveCfg = Debug|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug AVX2|x64.Build.0 = Debug|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug|x64.ActiveCfg = Debug|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug|x64.Build.0 = Debug|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel AVX2|x64.ActiveCfg = Devel|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel AVX2|x64.Build.0 = Devel|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel|x64.ActiveCfg = Devel|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel|x64.Build.0 = Devel|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release AVX2|x64.ActiveCfg = Release|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release AVX2|x64.Build.0 = Release|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release|x64.ActiveCfg = Release|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release|x64.Build.0 = Release|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Debug AVX2|x64.ActiveCfg = Debug|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Debug AVX2|x64.Build.0 = Debug|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Debug|x64.ActiveCfg = Debug|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Debug|x64.Build.0 = Debug|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Devel AVX2|x64.ActiveCfg = Devel|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Devel AVX2|x64.Build.0 = Devel|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Devel|x64.ActiveCfg = Devel|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Devel|x64.Build.0 = Devel|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Release AVX2|x64.ActiveCfg = Release|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Release AVX2|x64.Build.0 = Release|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Release|x64.ActiveCfg = Release|x64
{4639972E-424E-4E13-8B07-CA403C481346}.Release|x64.Build.0 = Release|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Debug AVX2|x64.ActiveCfg = Debug|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Debug AVX2|x64.Build.0 = Debug|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Debug|x64.ActiveCfg = Debug|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Debug|x64.Build.0 = Debug|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Devel AVX2|x64.ActiveCfg = Devel|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Devel AVX2|x64.Build.0 = Devel|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Devel|x64.ActiveCfg = Devel|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Devel|x64.Build.0 = Devel|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Release AVX2|x64.ActiveCfg = Release|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Release AVX2|x64.Build.0 = Release|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Release|x64.ActiveCfg = Release|x64
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A}.Release|x64.Build.0 = Release|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Debug AVX2|x64.ActiveCfg = Debug|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Debug AVX2|x64.Build.0 = Debug|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Debug|x64.ActiveCfg = Debug|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Debug|x64.Build.0 = Debug|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Devel AVX2|x64.ActiveCfg = Devel|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Devel AVX2|x64.Build.0 = Devel|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Devel|x64.ActiveCfg = Devel|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Devel|x64.Build.0 = Devel|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Release AVX2|x64.ActiveCfg = Release|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Release AVX2|x64.Build.0 = Release|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Release|x64.ActiveCfg = Release|x64
{DE9653B6-17DD-356A-9EE0-28A731772587}.Release|x64.Build.0 = Release|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Debug AVX2|x64.ActiveCfg = Debug|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Debug AVX2|x64.Build.0 = Debug|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Debug|x64.ActiveCfg = Debug|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Debug|x64.Build.0 = Debug|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Devel AVX2|x64.ActiveCfg = Devel|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Devel AVX2|x64.Build.0 = Devel|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Devel|x64.ActiveCfg = Devel|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Devel|x64.Build.0 = Devel|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Release AVX2|x64.ActiveCfg = Release|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Release AVX2|x64.Build.0 = Release|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Release|x64.ActiveCfg = Release|x64
{BF74C473-DC04-44B3-92E8-4145F4E77342}.Release|x64.Build.0 = Release|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Debug AVX2|x64.ActiveCfg = Debug|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Debug AVX2|x64.Build.0 = Debug|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Debug|x64.ActiveCfg = Debug|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Debug|x64.Build.0 = Debug|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Devel AVX2|x64.ActiveCfg = Devel|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Devel AVX2|x64.Build.0 = Devel|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Devel|x64.ActiveCfg = Devel|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Devel|x64.Build.0 = Devel|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Release AVX2|x64.ActiveCfg = Release|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Release AVX2|x64.Build.0 = Release|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Release|x64.ActiveCfg = Release|x64
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266}.Release|x64.Build.0 = Release|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Debug AVX2|x64.ActiveCfg = Debug|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Debug AVX2|x64.Build.0 = Debug|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Debug|x64.ActiveCfg = Debug|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Debug|x64.Build.0 = Debug|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Devel AVX2|x64.ActiveCfg = Devel|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Devel AVX2|x64.Build.0 = Devel|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Devel|x64.ActiveCfg = Devel|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Devel|x64.Build.0 = Devel|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Release AVX2|x64.ActiveCfg = Release|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Release AVX2|x64.Build.0 = Release|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Release|x64.ActiveCfg = Release|x64
{88FB34EC-845E-4F21-A552-F1573B9ED167}.Release|x64.Build.0 = Release|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Debug AVX2|x64.ActiveCfg = Debug|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Debug AVX2|x64.Build.0 = Debug|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Debug|x64.ActiveCfg = Debug|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Debug|x64.Build.0 = Debug|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Devel AVX2|x64.ActiveCfg = Devel|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Devel AVX2|x64.Build.0 = Devel|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Devel|x64.ActiveCfg = Devel|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Devel|x64.Build.0 = Devel|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Release AVX2|x64.ActiveCfg = Release|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Release AVX2|x64.Build.0 = Release|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Release|x64.ActiveCfg = Release|x64
{EF6834A9-11F3-4331-BC34-21B325ABB180}.Release|x64.Build.0 = Release|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Debug AVX2|x64.ActiveCfg = Debug|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Debug AVX2|x64.Build.0 = Debug|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Debug|x64.ActiveCfg = Debug|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Debug|x64.Build.0 = Debug|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Devel AVX2|x64.ActiveCfg = Devel|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Devel AVX2|x64.Build.0 = Devel|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Devel|x64.ActiveCfg = Devel|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Devel|x64.Build.0 = Devel|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Release AVX2|x64.ActiveCfg = Release|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Release AVX2|x64.Build.0 = Release|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Release|x64.ActiveCfg = Release|x64
{20B2E9FE-F020-42A0-B324-956F5B06EA68}.Release|x64.Build.0 = Release|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Debug AVX2|x64.ActiveCfg = Debug|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Debug AVX2|x64.Build.0 = Debug|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Debug|x64.ActiveCfg = Debug|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Debug|x64.Build.0 = Debug|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Devel AVX2|x64.ActiveCfg = Devel|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Devel AVX2|x64.Build.0 = Devel|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Devel|x64.ActiveCfg = Devel|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Devel|x64.Build.0 = Devel|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Release AVX2|x64.ActiveCfg = Release|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Release AVX2|x64.Build.0 = Release|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Release|x64.ActiveCfg = Release|x64
{52244028-937A-44E9-A76B-2BEA18FD239A}.Release|x64.Build.0 = Release|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Debug AVX2|x64.ActiveCfg = Debug|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Debug AVX2|x64.Build.0 = Debug|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Debug|x64.ActiveCfg = Debug|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Debug|x64.Build.0 = Debug|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Devel AVX2|x64.ActiveCfg = Devel|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Devel AVX2|x64.Build.0 = Devel|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Devel|x64.ActiveCfg = Devel|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Devel|x64.Build.0 = Devel|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Release AVX2|x64.ActiveCfg = Release|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Release AVX2|x64.Build.0 = Release|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Release|x64.ActiveCfg = Release|x64
{D45CEC7A-3171-40DD-975D-E1544CF16139}.Release|x64.Build.0 = Release|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Debug AVX2|x64.ActiveCfg = Debug|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Debug AVX2|x64.Build.0 = Debug|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Debug|x64.ActiveCfg = Debug|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Debug|x64.Build.0 = Debug|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Devel AVX2|x64.ActiveCfg = Devel|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Devel AVX2|x64.Build.0 = Devel|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Devel|x64.ActiveCfg = Devel|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Devel|x64.Build.0 = Devel|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Release AVX2|x64.ActiveCfg = Release|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Release AVX2|x64.Build.0 = Release|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Release|x64.ActiveCfg = Release|x64
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{677B7D11-D5E1-40B3-88B1-9A4DF83D2213} = {2D6F0A62-A247-4CCF-947F-FCD54BE16103}
{BC236261-77E8-4567-8D09-45CD02965EB6} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{0FAE817D-9A32-4830-857E-81DA57246E16} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{12728250-16EC-4DC6-94D7-E21DD88947F8} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{449AD25E-424A-4714-BABC-68706CDCC33B} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{C0293B32-5ACF-40F0-AA6C-E6DA6F3BF33A} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{DE9653B6-17DD-356A-9EE0-28A731772587} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{BF74C473-DC04-44B3-92E8-4145F4E77342} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{1EC8B3C0-8FB3-46DE-A2E0-A9121203F266} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{88FB34EC-845E-4F21-A552-F1573B9ED167} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{EF6834A9-11F3-4331-BC34-21B325ABB180} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{20B2E9FE-F020-42A0-B324-956F5B06EA68} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{52244028-937A-44E9-A76B-2BEA18FD239A} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{D45CEC7A-3171-40DD-975D-E1544CF16139} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0BC474EA-3628-45D3-9DBC-E22D0B7E0F77}
EndGlobalSection
EndGlobal

View File

@ -1,94 +0,0 @@
# IMPORTANT: PCSX2 only looks for PCSX2_keys.ini at the inis folder.
# You should first copy PCSX2_keys.ini.default to the inis folder, then
# rename it to PCSX2_keys.ini, and then edit it.
# Important: PAD bindings will override shortcuts at this file.
# IMPORTANT: GS has fixed shortcuts. Make sure your shortcuts don't conflict.
# Also, they will affect GS also when alt/ctrl/shift are pressed, so it's
# best to completely avoid them at this file. GS uses:
# F5 - Deinterlace modes
# PAGE_UP - FXAA antialiasing (HW and SW)
# PAGE_DOWN - Cycles through dither modes (HW)
# DELETE - Software Antialiasing (AA1)
# HOME - FX shader
# INSERT - Hardware mipmapping
# -----------------------------------------------------------------------------
# The KB shortcuts can be a normal key (e.g. f or ] etc) or a combination of
# ALT/SHIFT/CTRL and a key, separated with a - or + (e.g. m or alt+ctrl+m or
# alt-F12). Number (key) pad names start with KP_ (e.g. KP_0 to KP_9, KP_ADD).
# Note: If the Dev console source is enabled, keypresses (including with Alt
# etc) will be printed to the console and could be copied to PCSX2_keys.ini .
# List of special key names (beyond KP_0 to KP_9 and normal keys):
# DEL DELETE BACK INS INSERT ENTER RETURN PGUP PGDN LEFT RIGHT UP DOWN HOME END
# SPACE TAB ESC ESCAPE CANCEL CLEAR MENU PAUSE CAPITAL SELECT PRINT EXECUTE
# SNAPSHOT HELP ADD SEPARATOR SUBTRACT DECIMAL DIVIDE NUM_LOCK SCROLL_LOCK
# PAGEUP PAGEDOWN KP_SPACE KP_TAB KP_ENTER KP_HOME KP_LEFT KP_UP KP_RIGHT
# KP_DOWN KP_PRIOR KP_PAGEUP KP_NEXT KP_PAGEDOWN KP_END KP_BEGIN KP_INSERT
# KP_DELETE KP_EQUAL KP_MULTIPLY KP_ADD KP_SEPARATOR KP_SUBTRACT KP_DECIMAL
# KP_DIVIDE WINDOWS_LEFT WINDOWS_RIGHT WINDOWS_MENU COMMAND
# save state: freeze is save state, defrost is load state.
States_FreezeCurrentSlot = F1
States_DefrostCurrentSlot = F3
States_DefrostCurrentSlotBackup = Shift-F3
States_CycleSlotForward = F2
States_CycleSlotBackward = Shift-F2
FullscreenToggle = Alt-ENTER
# Note: toggles suspend, but can resume only if the GS window is not set to hide
# when paused (Emu options -> GS window), and when the GS window is focused.
Sys_SuspendResume = ESC
# Screenshot. Note: must not include shift or ctrl. With these held - it will
# create debug GS dump. The two other shortcuts will be added automatically.
Sys_TakeSnapshot = F8
# Hardware/software rendering toggle
Sys_RenderswitchToggle = F9
Sys_LoggingToggle = F10
Sys_RecordingToggle = F12
GSwindow_CycleAspectRatio = F6
# Vertical stretch/squash
GSwindow_ZoomInY = Alt-Ctrl-KP_ADD
GSwindow_ZoomOutY = Alt-Ctrl-KP_SUBTRACT
GSwindow_ZoomResetY = Alt-Ctrl-KP_MULTIPLY
# Recording Bindings
# Note - These are disabled if 'System > Enable Recording Tools' is disabled
FrameAdvance = SPACE
TogglePause = Shift-P
InputRecordingModeToggle = Shift-R
# Note - This is disabled if no input recording is active
GoToFirstFrame = Shift-L
# Save State Management
# Note - These are disabled if 'System > Enable Recording Tools' is disabled
States_SaveSlot0 = Shift-KP_0
States_SaveSlot1 = Shift-KP_1
States_SaveSlot2 = Shift-KP_2
States_SaveSlot3 = Shift-KP_3
States_SaveSlot4 = Shift-KP_4
States_SaveSlot5 = Shift-KP_5
States_SaveSlot6 = Shift-KP_6
States_SaveSlot7 = Shift-KP_7
States_SaveSlot8 = Shift-KP_8
States_SaveSlot9 = Shift-KP_9
States_LoadSlot0 = KP_0
States_LoadSlot1 = KP_1
States_LoadSlot2 = KP_2
States_LoadSlot3 = KP_3
States_LoadSlot4 = KP_4
States_LoadSlot5 = KP_5
States_LoadSlot6 = KP_6
States_LoadSlot7 = KP_7
States_LoadSlot8 = KP_8
States_LoadSlot9 = KP_9

View File

@ -1373,11 +1373,11 @@ function(setup_main_executable target)
set_target_properties(${target} PROPERTIES
MACOSX_BUNDLE true
MACOSX_BUNDLE_INFO_PLIST "${PCSX2_SOURCE_DIR}/gui/Resources/Info.plist.in"
MACOSX_BUNDLE_INFO_PLIST "${PCSX2_SOURCE_DIR}/Resources/Info.plist.in"
OUTPUT_NAME PCSX2
)
pcsx2_resource(${target} ${PCSX2_SOURCE_DIR}/gui/Resources/PCSX2.icns ${PCSX2_SOURCE_DIR}/gui/Resources)
pcsx2_resource(${target} ${PCSX2_SOURCE_DIR}/Resources/PCSX2.icns ${PCSX2_SOURCE_DIR}/Resources)
# If they say to skip postprocess bundle, leave the target in but make it so they have
# to manually run it

View File

@ -1,103 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2020 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include "HddCreateWx.h"
#include "gui/App.h"
void HddCreateWx::Init()
{
//This can be called from the EE Core thread
//ensure that UI creation/deletaion is done on main thread
//Also block calling thread untill ui is ready
if (!wxIsMainThread())
{
dialogReady = false;
wxTheApp->CallAfter([&] { Init(); });
//Block until done
std::unique_lock loadLock(dialogMutex);
dialogCV.wait(loadLock, [&] { return dialogReady; });
return;
}
reqMiB = (neededSize + ((1024 * 1024) - 1)) / (1024 * 1024);
//This creates a modeless dialog
progressDialog = new wxProgressDialog(_("Creating HDD file"), _("Creating HDD file"), reqMiB, nullptr, wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_CAN_ABORT | wxPD_ELAPSED_TIME | wxPD_REMAINING_TIME);
{
std::lock_guard dialogLock1(dialogMutex);
dialogReady = true;
}
dialogCV.notify_all();
}
void HddCreateWx::SetFileProgress(u64 currentSize)
{
if (!wxIsMainThread())
{
wxTheApp->CallAfter([&, currentSize] { SetFileProgress(currentSize); });
return;
}
wxString msg;
const int writtenMB = (currentSize + ((1024 * 1024) - 1)) / (1024 * 1024);
msg.Printf(_("%i / %i MiB"), writtenMB, reqMiB);
if (!progressDialog->Update(writtenMB, msg))
SetCanceled();
}
void HddCreateWx::SetError()
{
if (!wxIsMainThread())
{
dialogReady = false;
wxTheApp->CallAfter([&] { SetError(); });
//Block until done
std::unique_lock loadLock(dialogMutex);
dialogCV.wait(loadLock, [&] { return dialogReady; });
return;
}
wxMessageDialog dialog(nullptr, _("Failed to create HDD file"), _("Info"), wxOK);
dialog.ShowModal();
{
std::lock_guard dialogLock1(dialogMutex);
dialogReady = true;
}
dialogCV.notify_all();
}
void HddCreateWx::Cleanup()
{
if (!wxIsMainThread())
{
dialogReady = false;
wxTheApp->CallAfter([&] { Cleanup(); });
//Block until done
std::unique_lock loadLock(dialogMutex);
dialogCV.wait(loadLock, [&] { return dialogReady; });
return;
}
delete progressDialog;
{
std::lock_guard dialogLock1(dialogMutex);
dialogReady = true;
}
dialogCV.notify_all();
}

View File

@ -1,45 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2020 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <wx/progdlg.h>
#include <mutex>
#include <condition_variable>
#include "DEV9/ATA/HddCreate.h"
class HddCreateWx : public HddCreate
{
public:
HddCreateWx(){};
virtual ~HddCreateWx(){};
private:
wxProgressDialog* progressDialog;
std::mutex dialogMutex;
std::condition_variable dialogCV;
bool dialogReady = false;
int reqMiB;
protected:
virtual void Init();
virtual void Cleanup();
virtual void SetFileProgress(u64 currentSize);
virtual void SetError();
};

View File

@ -1,439 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include <stdio.h>
#include <vector>
#include <wx/wx.h>
#include <wx/collpane.h>
#include <wx/filepicker.h>
#include <wx/slider.h>
#include <wx/spinctrl.h>
#include <wx/gbsizer.h>
#include "common/FileSystem.h"
#include "common/Path.h"
#include "common/StringUtil.h"
#include "Config.h"
#include "DEV9.h"
#include "pcap_io.h"
#include "sockets.h"
#include "net.h"
#include "PacketReader/IP/IP_Address.h"
#include "gui/AppCoreThread.h"
#ifdef _WIN32
#include "Win32/tap.h"
#endif
#include "ATA/HddCreateWx.h"
using PacketReader::IP::IP_Address;
class DEV9Dialog : public wxDialog
{
static void IPControl_SetValue(wxTextCtrl* ctl, IP_Address value)
{
ctl->SetValue(wxString::Format("%u.%u.%u.%u", value.bytes[0], value.bytes[1], value.bytes[2], value.bytes[3]));
}
static IP_Address IPControl_GetValue(wxTextCtrl* ctl)
{
IP_Address ret;
if (4 == wxSscanf(ctl->GetValue(), "%hhu.%hhu.%hhu.%hhu", &ret.bytes[0], &ret.bytes[1], &ret.bytes[2], &ret.bytes[3]))
return ret;
Console.Error("Invalid IP address entered");
return {};
}
struct IPInputWithAutoCheck
{
wxTextCtrl* m_ip;
wxCheckBox* m_auto;
void create(int col, wxWindow* window, wxGridBagSizer* sizer, const wxString& label)
{
auto* label_box = new wxStaticText(window, wxID_ANY, label);
m_ip = new wxTextCtrl(window, wxID_ANY);
m_auto = new wxCheckBox(window, wxID_ANY, _("Auto"));
sizer->Add(label_box, wxGBPosition(col, 0), wxDefaultSpan, wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
sizer->Add(m_ip, wxGBPosition(col, 1), wxDefaultSpan, wxEXPAND);
sizer->Add(m_auto, wxGBPosition(col, 2), wxDefaultSpan, wxEXPAND);
}
void setEnabled(bool enabled)
{
m_auto->Enable(enabled);
m_ip->Enable(enabled && !m_auto->GetValue());
}
void load(const IP_Address& ip, bool is_auto)
{
IPControl_SetValue(m_ip, ip);
m_auto->SetValue(is_auto);
}
void save(IP_Address& ip, bool& is_auto)
{
ip = IPControl_GetValue(m_ip);
is_auto = m_auto->GetValue();
}
};
wxCheckBox* m_eth_enable;
wxChoice* m_eth_adapter_api;
wxChoice* m_eth_adapter;
std::vector<Pcsx2Config::DEV9Options::NetApi> m_api_list;
std::vector<std::vector<AdapterEntry>> m_adapter_list;
wxCheckBox* m_intercept_dhcp;
wxTextCtrl* m_ps2_address;
IPInputWithAutoCheck m_subnet_mask;
IPInputWithAutoCheck m_gateway_address;
IPInputWithAutoCheck m_dns1_address;
IPInputWithAutoCheck m_dns2_address;
wxCheckBox* m_hdd_enable;
wxFilePickerCtrl* m_hdd_file;
wxSpinCtrl* m_hdd_size_spin;
wxSlider* m_hdd_size_slider;
void addAdapter(const AdapterEntry& adapter)
{
if (std::find(m_api_list.begin(), m_api_list.end(), adapter.type) == m_api_list.end())
m_api_list.push_back(adapter.type);
u32 idx = static_cast<u32>(adapter.type);
if (m_adapter_list.size() <= idx)
m_adapter_list.resize(idx + 1);
m_adapter_list[idx].push_back(adapter);
}
public:
DEV9Dialog()
: wxDialog(nullptr, wxID_ANY, _("Network and HDD Settings"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER)
{
auto* padding = new wxBoxSizer(wxVERTICAL);
auto* top_box = new wxBoxSizer(wxVERTICAL);
int space = wxSizerFlags().Border().GetBorderInPixels();
int two_space = wxSizerFlags().DoubleBorder().GetBorderInPixels();
// Ethernet section
auto* eth_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Ethernet"));
m_eth_enable = new wxCheckBox(this, wxID_ANY, _("Enabled"));
eth_sizer->Add(m_eth_enable);
eth_sizer->AddSpacer(space);
auto* eth_adapter_box = new wxGridBagSizer(space, space);
for (const AdapterEntry& adapter : PCAPAdapter::GetAdapters())
addAdapter(adapter);
#ifdef _WIN32
for (const AdapterEntry& adapter : TAPAdapter::GetAdapters())
addAdapter(adapter);
#endif
for (const AdapterEntry& adapter : SocketAdapter::GetAdapters())
addAdapter(adapter);
std::sort(m_api_list.begin(), m_api_list.end());
for (auto& list : m_adapter_list)
std::sort(list.begin(), list.end(), [](const AdapterEntry& a, AdapterEntry& b){ return a.name < b.name; });
wxArrayString adapter_api_name_list;
adapter_api_name_list.Add("");
for (const Pcsx2Config::DEV9Options::NetApi& type : m_api_list)
adapter_api_name_list.Add(Pcsx2Config::DEV9Options::NetApiNames[(int)type]);
auto* eth_adapter_api_label = new wxStaticText(this, wxID_ANY, _("Ethernet Device Type:"));
auto* eth_adapter_label = new wxStaticText(this, wxID_ANY, _("Ethernet Device:"));
auto* intercept_dhcp_label = new wxStaticText(this, wxID_ANY, _("Intercept DHCP:"));
auto* ps2_addr_label = new wxStaticText(this, wxID_ANY, _("PS2 Address:"));
m_eth_adapter_api = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, adapter_api_name_list);
m_eth_adapter = new wxChoice(this, wxID_ANY);
m_intercept_dhcp = new wxCheckBox(this, wxID_ANY, _("Enabled"));
m_ps2_address = new wxTextCtrl(this, wxID_ANY);
m_ps2_address->SetMinSize(wxSize(150, -1));
eth_adapter_box->Add(eth_adapter_api_label, wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
eth_adapter_box->Add(eth_adapter_label, wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
eth_adapter_box->Add(intercept_dhcp_label, wxGBPosition(2, 0), wxDefaultSpan, wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
eth_adapter_box->Add(ps2_addr_label, wxGBPosition(3, 0), wxDefaultSpan, wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL);
eth_adapter_box->Add(m_eth_adapter_api, wxGBPosition(0, 1), wxGBSpan(1, 2), wxEXPAND);
eth_adapter_box->Add(m_eth_adapter, wxGBPosition(1, 1), wxGBSpan(1, 2), wxEXPAND);
eth_adapter_box->Add(m_intercept_dhcp, wxGBPosition(2, 1), wxDefaultSpan, wxEXPAND);
eth_adapter_box->Add(m_ps2_address, wxGBPosition(3, 1), wxDefaultSpan, wxEXPAND);
m_subnet_mask .create(4, this, eth_adapter_box, _("Subnet Mask:"));
m_gateway_address.create(5, this, eth_adapter_box, _("Gateway Address:"));
m_dns1_address .create(6, this, eth_adapter_box, _("DNS1 Address:"));
m_dns2_address .create(7, this, eth_adapter_box, _("DNS2 Address:"));
eth_adapter_box->AddGrowableCol(2);
eth_sizer->Add(eth_adapter_box, wxSizerFlags().Expand());
// HDD section
auto* hdd_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Hard Disk Drive"));
m_hdd_enable = new wxCheckBox(this, wxID_ANY, _("Enabled"));
auto* hdd_file_label = new wxStaticText(this, wxID_ANY, _("HDD File"));
m_hdd_file = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, _("HDD image file"), "HDD|*.raw", wxDefaultPosition, wxDefaultSize, wxFLP_SAVE | wxFLP_USE_TEXTCTRL);
auto* hdd_size_label = new wxStaticText(this, wxID_ANY, _("HDD Size (GiB)"));
auto* hdd_size_box = new wxBoxSizer(wxHORIZONTAL);
m_hdd_size_slider = new wxSlider(this, wxID_ANY, HDD_MIN_GB, HDD_MIN_GB, HDD_MAX_GB, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_AUTOTICKS);
m_hdd_size_slider->SetPageSize(10);
m_hdd_size_slider->SetTickFreq(10);
m_hdd_size_spin = new wxSpinCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, HDD_MIN_GB, HDD_MAX_GB, HDD_MIN_GB);
m_hdd_size_spin->SetSizeHints(m_hdd_size_spin->GetSizeFromTextSize(30));
hdd_size_box->Add(m_hdd_size_slider, wxSizerFlags(1).Centre());
hdd_size_box->AddSpacer(space);
hdd_size_box->Add(m_hdd_size_spin, wxSizerFlags(0).Centre());
hdd_sizer->Add(m_hdd_enable);
hdd_sizer->AddSpacer(two_space);
hdd_sizer->Add(hdd_file_label, wxSizerFlags().Left());
hdd_sizer->AddSpacer(space);
hdd_sizer->Add(m_hdd_file, wxSizerFlags().Expand());
hdd_sizer->AddSpacer(two_space);
hdd_sizer->Add(hdd_size_label, wxSizerFlags().Left());
hdd_sizer->AddSpacer(space);
hdd_sizer->Add(hdd_size_box, wxSizerFlags().Expand());
top_box->Add(eth_sizer, wxSizerFlags().Expand());
top_box->AddSpacer(space);
top_box->Add(hdd_sizer, wxSizerFlags().Expand());
top_box->AddSpacer(space);
top_box->Add(CreateStdDialogButtonSizer(wxOK | wxCANCEL), wxSizerFlags().Right());
padding->Add(top_box, wxSizerFlags().Expand().Border());
SetSizerAndFit(padding);
SetMaxSize(wxSize(wxDefaultCoord, GetMinSize().y));
Bind(wxEVT_CHECKBOX, &DEV9Dialog::OnCheck, this);
Bind(wxEVT_SLIDER, &DEV9Dialog::OnSlide, this);
Bind(wxEVT_SPINCTRL, &DEV9Dialog::OnSpin, this);
Bind(wxEVT_CHOICE, &DEV9Dialog::OnChoice, this);
Bind(wxEVT_BUTTON, &DEV9Dialog::OnOK, this, wxID_OK);
}
void Load(const Pcsx2Config::DEV9Options& config)
{
m_eth_enable->SetValue(config.EthEnable);
m_eth_adapter_api->SetSelection(0);
for (size_t i = 0; i < m_api_list.size(); i++)
{
if (config.EthApi == m_api_list[i])
m_eth_adapter_api->SetSelection(i + 1);
}
UpdateAdapters();
m_eth_adapter->SetSelection(0);
if (static_cast<u32>(config.EthApi) < m_adapter_list.size())
{
const auto& list = m_adapter_list[static_cast<u32>(config.EthApi)];
for (size_t i = 0; i < list.size(); i++)
{
if (list[i].guid == config.EthDevice)
{
m_eth_adapter->SetSelection(i + 1);
break;
}
}
}
m_intercept_dhcp->SetValue(config.InterceptDHCP);
IPControl_SetValue(m_ps2_address, *(IP_Address*)config.PS2IP);
m_subnet_mask .load(*(IP_Address*)config.Mask, config.AutoMask);
m_gateway_address.load(*(IP_Address*)config.Gateway, config.AutoGateway);
m_dns1_address .load(*(IP_Address*)config.DNS1, config.ModeDNS1 == Pcsx2Config::DEV9Options::DnsMode::Auto);
m_dns2_address .load(*(IP_Address*)config.DNS2, config.ModeDNS2 == Pcsx2Config::DEV9Options::DnsMode::Auto);
m_hdd_enable->SetValue(config.HddEnable);
wxString wxHddFile = StringUtil::UTF8StringToWxString(config.HddFile);
m_hdd_file->SetInitialDirectory(wxHddFile);
m_hdd_file->SetPath(wxHddFile);
m_hdd_size_spin->SetValue((u64)config.HddSizeSectors * 512 / (1024 * 1024 * 1024));
m_hdd_size_slider->SetValue((u64)config.HddSizeSectors * 512 / (1024 * 1024 * 1024));
UpdateEnable();
}
void Save(Pcsx2Config::DEV9Options& config)
{
config.EthEnable = m_eth_enable->GetValue();
int api = m_eth_adapter_api->GetSelection();
int eth = m_eth_adapter->GetSelection();
if (api && eth)
{
const AdapterEntry& adapter = m_adapter_list[static_cast<u32>(m_api_list[api - 1])][eth - 1];
config.EthDevice = adapter.guid;
config.EthApi = adapter.type;
}
else
{
config.EthDevice = "";
config.EthApi = Pcsx2Config::DEV9Options::NetApi::Unset;
}
config.InterceptDHCP = m_intercept_dhcp->GetValue();
*(IP_Address*)&config.PS2IP = IPControl_GetValue(m_ps2_address);
m_subnet_mask .save(*(IP_Address*)config.Mask, config.AutoMask);
m_gateway_address.save(*(IP_Address*)config.Gateway, config.AutoGateway);
bool autoDNS1;
bool autoDNS2;
m_dns1_address.save(*(IP_Address*)config.DNS1, autoDNS1);
m_dns2_address.save(*(IP_Address*)config.DNS2, autoDNS2);
config.ModeDNS1 = autoDNS1 ? Pcsx2Config::DEV9Options::DnsMode::Auto : Pcsx2Config::DEV9Options::DnsMode::Manual;
config.ModeDNS2 = autoDNS2 ? Pcsx2Config::DEV9Options::DnsMode::Auto : Pcsx2Config::DEV9Options::DnsMode::Manual;
config.HddEnable = m_hdd_enable->GetValue();
config.HddFile = StringUtil::wxStringToUTF8String(m_hdd_file->GetPath());
config.HddSizeSectors = (u64)m_hdd_size_spin->GetValue() * 1024 * 1024 * 1024 / 512;
}
void UpdateEnable()
{
AdapterOptions adapterOptions = AdapterOptions::None;
const int api = m_eth_adapter_api->GetSelection();
if (api)
{
const Pcsx2Config::DEV9Options::NetApi netApi = m_api_list[api - 1];
switch (netApi)
{
#ifdef _WIN32
case Pcsx2Config::DEV9Options::NetApi::TAP:
adapterOptions = TAPAdapter::GetAdapterOptions();
break;
#endif
case Pcsx2Config::DEV9Options::NetApi::PCAP_Bridged:
case Pcsx2Config::DEV9Options::NetApi::PCAP_Switched:
adapterOptions = PCAPAdapter::GetAdapterOptions();
break;
case Pcsx2Config::DEV9Options::NetApi::Sockets:
adapterOptions = SocketAdapter::GetAdapterOptions();
break;
default:
break;
}
}
bool eth_enable = m_eth_enable->GetValue();
bool hdd_enable = m_hdd_enable->GetValue();
bool dhcp_enable = eth_enable && (m_intercept_dhcp->GetValue() || ((adapterOptions & AdapterOptions::DHCP_ForcedOn) == AdapterOptions::DHCP_ForcedOn));
m_eth_adapter_api->Enable(eth_enable);
m_eth_adapter->Enable(eth_enable);
m_intercept_dhcp->Enable(eth_enable && ((adapterOptions & AdapterOptions::DHCP_ForcedOn) == AdapterOptions::None));
m_ps2_address->Enable(dhcp_enable && ((adapterOptions & AdapterOptions::DHCP_OverrideIP) == AdapterOptions::None));
m_subnet_mask.setEnabled(dhcp_enable && ((adapterOptions & AdapterOptions::DHCP_OverideSubnet) == AdapterOptions::None));
m_gateway_address.setEnabled(dhcp_enable && ((adapterOptions & AdapterOptions::DHCP_OverideGateway) == AdapterOptions::None));
m_dns1_address.setEnabled(dhcp_enable);
m_dns2_address.setEnabled(dhcp_enable);
m_hdd_file->Enable(hdd_enable);
m_hdd_size_spin->Enable(hdd_enable);
m_hdd_size_slider->Enable(hdd_enable);
}
void UpdateAdapters()
{
int api = m_eth_adapter_api->GetSelection();
int selection = 0;
wxArrayString options;
options.Add("");
if (api)
{
const auto& list = m_adapter_list[static_cast<u32>(m_api_list[api - 1])];
wxString current;
if (m_eth_adapter->GetCount())
current = m_eth_adapter->GetString(m_eth_adapter->GetSelection());
if (current.empty())
current = StringUtil::UTF8StringToWxString(g_Conf->EmuOptions.DEV9.EthDevice);
for (size_t i = 0; i < list.size(); i++)
{
wxString wxAdapterName = StringUtil::UTF8StringToWxString(list[i].name);
options.Add(wxAdapterName);
if (wxAdapterName == current)
selection = i + 1;
}
}
m_eth_adapter->Set(options);
m_eth_adapter->SetSelection(selection);
// Update minimum sizes for the possibly increased dropdown size
// Nothing else seems to update the minimum size of the window
SetSizerAndFit(GetSizer(), false);
}
void OnCheck(wxCommandEvent&)
{
UpdateEnable();
}
void OnSlide(wxCommandEvent&)
{
m_hdd_size_spin->SetValue(m_hdd_size_slider->GetValue());
}
void OnSpin(wxCommandEvent&)
{
m_hdd_size_slider->SetValue(m_hdd_size_spin->GetValue());
}
void OnChoice(wxCommandEvent& ev)
{
if (ev.GetEventObject() == m_eth_adapter_api)
{
UpdateAdapters();
UpdateEnable();
}
}
void OnOK(wxCommandEvent& ev)
{
const wxChar* msg = nullptr;
if (m_eth_enable->GetValue() && !m_eth_adapter->GetSelection())
msg = _("Please select an ethernet adapter or disable ethernet");
if (m_hdd_enable->GetValue() && m_hdd_file->GetPath().empty())
msg = _("Please specify a HDD file or disable the hard drive");
if (msg)
wxMessageDialog(this, msg).ShowModal();
else
ev.Skip();
}
};
void DEV9configure()
{
ScopedCoreThreadPause paused_core;
DEV9Dialog dialog;
dialog.Load(g_Conf->EmuOptions.DEV9);
if (dialog.ShowModal() == wxID_OK)
{
dialog.Save(g_Conf->EmuOptions.DEV9);
std::string hddPath(g_Conf->EmuOptions.DEV9.HddFile);
if (!Path::IsAbsolute(hddPath))
hddPath = Path::Combine(EmuFolders::Settings, hddPath);
if (g_Conf->EmuOptions.DEV9.HddEnable && !FileSystem::FileExists(hddPath.c_str()))
{
HddCreateWx hddCreator;
hddCreator.filePath = hddPath;
hddCreator.neededSize = ((u64)g_Conf->EmuOptions.DEV9.HddSizeSectors) * 512;
hddCreator.Start();
}
AppSaveSettings();
}
paused_core.AllowResume();
}

View File

@ -1,129 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include "common/StringUtil.h"
#include <wx/fileconf.h>
#include "DEV9.h"
#ifndef PCSX2_CORE
#include "gui/AppConfig.h"
#include "gui/IniInterface.h"
#endif
#ifdef _WIN32
#include "ws2tcpip.h"
#elif defined(__POSIX__)
#include <arpa/inet.h>
#endif
#if defined(__FreeBSD__)
#include <sys/socket.h>
#endif
void SaveDnsHosts()
{
#ifndef PCSX2_CORE
std::unique_ptr<wxFileConfig> hini(OpenFileConfig(StringUtil::UTF8StringToWxString(Path::Combine(EmuFolders::Settings, "DEV9Hosts.ini"))));
#else
std::unique_ptr<wxFileConfig> hini(new wxFileConfig(wxEmptyString, wxEmptyString, EmuFolders::Settings.Combine(wxString("DEV9Hosts.ini")).GetFullPath(), wxEmptyString, wxCONFIG_USE_RELATIVE_PATH));
#endif
IniSaver ini((wxConfigBase*)hini.get());
for (size_t i = 0; i < config.EthHosts.size(); i++)
{
std::wstring groupName(L"Host" + std::to_wstring(i));
ScopedIniGroup iniEntry(ini, groupName);
ConfigHost entry = config.EthHosts[i];
wxString url(fromUTF8(entry.Url));
ini.Entry(L"Url", url);
//TODO UTF8(?)
wxString desc(fromUTF8(entry.Desc));
ini.Entry(L"Desc", desc);
char addrBuff[INET_ADDRSTRLEN];
inet_ntop(AF_INET, entry.Address, addrBuff, INET_ADDRSTRLEN);
wxString address(addrBuff);
ini.Entry(L"Address", address);
ini.Entry(L"Enabled", entry.Enabled);
}
ini.Flush();
}
void LoadDnsHosts()
{
wxFileName iniPath = StringUtil::UTF8StringToWxString(Path::Combine(EmuFolders::Settings, "DEV9Hosts.ini"));
config.EthHosts.clear();
//If no file exists, create one to provide an example config
if (!iniPath.FileExists())
{
//Load Default settings
ConfigHost exampleHost;
exampleHost.Url = "www.example.com";
exampleHost.Desc = "Set DNS to 192.0.2.1 to use this host list";
memset(exampleHost.Address, 0, 4);
exampleHost.Enabled = false;
config.EthHosts.push_back(exampleHost);
SaveDnsHosts();
return;
}
#ifndef PCSX2_CORE
std::unique_ptr<wxFileConfig> hini(OpenFileConfig(iniPath.GetFullPath()));
#else
std::unique_ptr<wxFileConfig> hini(new wxFileConfig(wxEmptyString, wxEmptyString, iniPath.GetFullPath(), wxEmptyString, wxCONFIG_USE_RELATIVE_PATH));
#endif
IniLoader ini((wxConfigBase*)hini.get());
int i = 0;
while (true)
{
std::wstring groupName(L"Host" + std::to_wstring(i));
ScopedIniGroup iniEntry(ini, groupName);
wxString tmp = wxEmptyString;
ini.Entry(L"Url", tmp, wxEmptyString);
//An empty url means we tried to read beyond end of the host list
if (tmp.IsEmpty())
break;
ConfigHost entry;
entry.Url = tmp.ToUTF8();
ini.Entry(L"Desc", tmp, wxEmptyString);
entry.Desc = tmp.ToUTF8();
ini.Entry(L"Address", tmp, L"0.0.0.0");
int ret = inet_pton(AF_INET, tmp.ToUTF8(), entry.Address);
//Only check Enabled if valid ip
if (ret != 1)
{
memset(entry.Address, 0, 4);
entry.Enabled = false;
}
else
ini.Entry(L"Enabled", entry.Enabled, false);
if (EmuConfig.DEV9.EthLogDNS && entry.Enabled)
Console.WriteLn("DEV9: Host entry %i: url %s mapped to %s", i, entry.Url.c_str(), tmp.ToStdString().c_str());
config.EthHosts.push_back(entry);
i++;
}
}

View File

@ -1,17 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2020 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
void SaveDnsHosts();
void LoadDnsHosts();

View File

@ -1,142 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2022 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include <Carbon/Carbon.h>
int TranslateOSXtoWXK(u32 keysym)
{
switch (keysym)
{
case kVK_ANSI_A: return 'A';
case kVK_ANSI_S: return 'S';
case kVK_ANSI_D: return 'D';
case kVK_ANSI_F: return 'F';
case kVK_ANSI_H: return 'H';
case kVK_ANSI_G: return 'G';
case kVK_ANSI_Z: return 'Z';
case kVK_ANSI_X: return 'X';
case kVK_ANSI_C: return 'C';
case kVK_ANSI_V: return 'V';
case kVK_ANSI_B: return 'B';
case kVK_ANSI_Q: return 'Q';
case kVK_ANSI_W: return 'W';
case kVK_ANSI_E: return 'E';
case kVK_ANSI_R: return 'R';
case kVK_ANSI_Y: return 'Y';
case kVK_ANSI_T: return 'T';
case kVK_ANSI_1: return '1';
case kVK_ANSI_2: return '2';
case kVK_ANSI_3: return '3';
case kVK_ANSI_4: return '4';
case kVK_ANSI_6: return '6';
case kVK_ANSI_5: return '5';
case kVK_ANSI_Equal: return '=';
case kVK_ANSI_9: return '9';
case kVK_ANSI_7: return '7';
case kVK_ANSI_Minus: return '-';
case kVK_ANSI_8: return '8';
case kVK_ANSI_0: return '0';
case kVK_ANSI_RightBracket: return ']';
case kVK_ANSI_O: return 'O';
case kVK_ANSI_U: return 'U';
case kVK_ANSI_LeftBracket: return '[';
case kVK_ANSI_I: return 'I';
case kVK_ANSI_P: return 'P';
case kVK_ANSI_L: return 'L';
case kVK_ANSI_J: return 'J';
case kVK_ANSI_Quote: return '\'';
case kVK_ANSI_K: return 'K';
case kVK_ANSI_Semicolon: return ';';
case kVK_ANSI_Backslash: return '\\';
case kVK_ANSI_Comma: return ',';
case kVK_ANSI_Slash: return '/';
case kVK_ANSI_N: return 'N';
case kVK_ANSI_M: return 'M';
case kVK_ANSI_Period: return '.';
case kVK_ANSI_Grave: return '`';
case kVK_ANSI_KeypadDecimal: return WXK_NUMPAD_DECIMAL;
case kVK_ANSI_KeypadMultiply: return WXK_NUMPAD_MULTIPLY;
case kVK_ANSI_KeypadPlus: return WXK_NUMPAD_ADD;
case kVK_ANSI_KeypadClear: return WXK_CLEAR;
case kVK_ANSI_KeypadDivide: return WXK_NUMPAD_DIVIDE;
case kVK_ANSI_KeypadEnter: return WXK_NUMPAD_ENTER;
case kVK_ANSI_KeypadMinus: return WXK_NUMPAD_SUBTRACT;
case kVK_ANSI_KeypadEquals: return WXK_NUMPAD_EQUAL;
case kVK_ANSI_Keypad0: return WXK_NUMPAD0;
case kVK_ANSI_Keypad1: return WXK_NUMPAD1;
case kVK_ANSI_Keypad2: return WXK_NUMPAD2;
case kVK_ANSI_Keypad3: return WXK_NUMPAD3;
case kVK_ANSI_Keypad4: return WXK_NUMPAD4;
case kVK_ANSI_Keypad5: return WXK_NUMPAD5;
case kVK_ANSI_Keypad6: return WXK_NUMPAD6;
case kVK_ANSI_Keypad7: return WXK_NUMPAD7;
case kVK_ANSI_Keypad8: return WXK_NUMPAD8;
case kVK_ANSI_Keypad9: return WXK_NUMPAD9;
case kVK_Return: return WXK_RETURN;
case kVK_Tab: return WXK_TAB;
case kVK_Space: return WXK_SPACE;
case kVK_Delete: return WXK_BACK;
case kVK_Escape: return WXK_ESCAPE;
case kVK_Command: return WXK_COMMAND;
case kVK_Shift: return WXK_SHIFT;
case kVK_CapsLock: return WXK_CAPITAL;
case kVK_Option: return WXK_ALT;
case kVK_Control: return WXK_RAW_CONTROL;
case kVK_RightCommand: return WXK_COMMAND;
case kVK_RightShift: return WXK_SHIFT;
case kVK_RightOption: return WXK_ALT;
case kVK_RightControl: return WXK_RAW_CONTROL;
case kVK_Function: return 0;
case kVK_F17: return WXK_F17;
#if wxCHECK_VERSION(3, 1, 0)
case kVK_VolumeUp: return WXK_VOLUME_UP;
case kVK_VolumeDown: return WXK_VOLUME_DOWN;
case kVK_Mute: return WXK_VOLUME_MUTE;
#endif
case kVK_F18: return WXK_F18;
case kVK_F19: return WXK_F19;
case kVK_F20: return WXK_F20;
case kVK_F5: return WXK_F5;
case kVK_F6: return WXK_F6;
case kVK_F7: return WXK_F7;
case kVK_F3: return WXK_F3;
case kVK_F8: return WXK_F8;
case kVK_F9: return WXK_F9;
case kVK_F11: return WXK_F11;
case kVK_F13: return WXK_F13;
case kVK_F16: return WXK_F16;
case kVK_F14: return WXK_F14;
case kVK_F10: return WXK_F10;
case kVK_F12: return WXK_F12;
case kVK_F15: return WXK_F15;
case kVK_Help: return WXK_HELP;
case kVK_Home: return WXK_HOME;
case kVK_PageUp: return WXK_PAGEUP;
case kVK_ForwardDelete: return WXK_DELETE;
case kVK_F4: return WXK_F4;
case kVK_End: return WXK_END;
case kVK_F2: return WXK_F2;
case kVK_PageDown: return WXK_PAGEDOWN;
case kVK_F1: return WXK_F1;
case kVK_LeftArrow: return WXK_LEFT;
case kVK_RightArrow: return WXK_RIGHT;
case kVK_DownArrow: return WXK_DOWN;
case kVK_UpArrow: return WXK_UP;
default:
return 0;
}
}

View File

@ -1,844 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include "GSwxDialog.h"
#include "gui/AppConfig.h"
#include "gui/StringHelpers.h"
#include "GS/GSUtil.h"
#include "HostDisplay.h"
#ifdef _WIN32
#include "Frontend/D3D11HostDisplay.h"
#include "Frontend/D3D12HostDisplay.h"
#endif
#include "GS/Renderers/Metal/GSMetalCPPAccessible.h"
#ifdef ENABLE_VULKAN
#include "Frontend/VulkanHostDisplay.h"
#endif
using namespace GSSettingsDialog;
namespace
{
void add_tooltip(wxWindow* widget, int tooltip)
{
if (tooltip != -1)
widget->SetToolTip(dialog_message(tooltip));
}
void add_settings_to_array_string(const std::vector<GSSetting>& s, wxArrayString& arr)
{
for (const GSSetting& setting : s)
{
if (!setting.note.empty())
arr.Add(fromUTF8(setting.name + " (" + setting.note + ")"));
else
arr.Add(fromUTF8(setting.name));
}
}
size_t get_config_index(const std::vector<GSSetting>& s, int value)
{
for (size_t i = 0; i < s.size(); i++)
{
if (s[i].value == value)
return i;
}
return 0;
}
void set_config_from_choice(const wxChoice* choice, const std::vector<GSSetting>& s, const char* str)
{
int idx = choice->GetSelection();
if (idx == wxNOT_FOUND)
return;
theApp.SetConfig(str, s[idx].value);
}
void add_label(wxWindow* parent, wxSizer* sizer, const char* str, int tooltip = -1, wxSizerFlags flags = wxSizerFlags().Centre().Right(), long style = wxALIGN_RIGHT | wxALIGN_CENTRE_VERTICAL)
{
auto* temp_text = new wxStaticText(parent, wxID_ANY, str, wxDefaultPosition, wxDefaultSize, style);
add_tooltip(temp_text, tooltip);
sizer->Add(temp_text, flags);
}
/// wxBoxSizer with padding
template <typename OuterSizer>
struct PaddedBoxSizer
{
OuterSizer* outer;
wxBoxSizer* inner;
// Make static analyzers happy (memory management is handled by WX)
// (There's no actual reason we couldn't use the default copy constructor, except cppcheck screams when you do and it's easier to delete than implement one)
PaddedBoxSizer(const PaddedBoxSizer&) = delete;
template <typename... Args>
PaddedBoxSizer(wxOrientation orientation, Args&&... args)
: outer(new OuterSizer(orientation, std::forward<Args>(args)...))
, inner(new wxBoxSizer(orientation))
{
wxSizerFlags flags = wxSizerFlags().Expand();
#ifdef __APPLE__
if (!std::is_same<OuterSizer, wxStaticBoxSizer>::value) // wxMac already adds padding to static box sizers
#endif
flags.Border();
outer->Add(inner, flags);
}
wxBoxSizer* operator->() { return inner; }
};
struct CheckboxPrereq
{
wxCheckBox* box;
explicit CheckboxPrereq(wxCheckBox* box)
: box(box)
{
}
bool operator()()
{
return box->GetValue();
}
};
} // namespace
GSUIElementHolder::GSUIElementHolder(wxWindow* window)
: m_window(window)
{
}
wxStaticText* GSUIElementHolder::addWithLabel(wxControl* control, UIElem::Type type, wxSizer* sizer, const char* label, const char* config_name, int tooltip, std::function<bool()> prereq, wxSizerFlags flags)
{
add_tooltip(control, tooltip);
wxStaticText* text = new wxStaticText(m_window, wxID_ANY, label, wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
add_tooltip(text, tooltip);
sizer->Add(text, wxSizerFlags().Centre().Right());
sizer->Add(control, flags);
m_elems.emplace_back(type, control, config_name, prereq);
return text;
}
wxCheckBox* GSUIElementHolder::addCheckBox(wxSizer* sizer, const char* label, const char* config_name, int tooltip, std::function<bool()> prereq)
{
wxCheckBox* box = new wxCheckBox(m_window, wxID_ANY, label);
add_tooltip(box, tooltip);
if (sizer)
sizer->Add(box);
m_elems.emplace_back(UIElem::Type::CheckBox, box, config_name, prereq);
return box;
}
std::pair<wxChoice*, wxStaticText*> GSUIElementHolder::addComboBoxAndLabel(wxSizer* sizer, const char* label, const char* config_name, const std::vector<GSSetting>* settings, int tooltip, std::function<bool()> prereq)
{
wxArrayString temp;
add_settings_to_array_string(*settings, temp);
wxChoice* choice = new GSwxChoice(m_window, wxID_ANY, wxDefaultPosition, wxDefaultSize, temp, settings);
return std::make_pair(choice, addWithLabel(choice, UIElem::Type::Choice, sizer, label, config_name, tooltip, prereq));
}
wxSpinCtrl* GSUIElementHolder::addSpin(wxSizer* sizer, const char* config_name, int min, int max, int initial, int tooltip, std::function<bool()> prereq)
{
wxSpinCtrl* spin = new wxSpinCtrl(m_window, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, initial);
add_tooltip(spin, tooltip);
if (sizer)
sizer->Add(spin, wxSizerFlags(1));
m_elems.emplace_back(UIElem::Type::Spin, spin, config_name, prereq);
return spin;
}
std::pair<wxSpinCtrl*, wxStaticText*> GSUIElementHolder::addSpinAndLabel(wxSizer* sizer, const char* label, const char* config_name, int min, int max, int initial, int tooltip, std::function<bool()> prereq)
{
wxSpinCtrl* spin = new wxSpinCtrl(m_window, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, initial);
return std::make_pair(spin, addWithLabel(spin, UIElem::Type::Spin, sizer, label, config_name, tooltip, prereq, wxSizerFlags().Centre().Left().Expand()));
}
std::pair<wxSlider*, wxStaticText*> GSUIElementHolder::addSliderAndLabel(wxSizer* sizer, const char* label, const char* config_name, int min, int max, int initial, int tooltip, std::function<bool()> prereq)
{
wxSlider* slider = new wxSlider(m_window, wxID_ANY, initial, min, max, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_VALUE_LABEL);
return std::make_pair(slider, addWithLabel(slider, UIElem::Type::Slider, sizer, label, config_name, tooltip, prereq));
}
std::pair<wxFilePickerCtrl*, wxStaticText*> GSUIElementHolder::addFilePickerAndLabel(wxSizer* sizer, const char* label, const char* config_name, int tooltip, std::function<bool()> prereq)
{
wxFilePickerCtrl* picker = new wxFilePickerCtrl(m_window, wxID_ANY);
return std::make_pair(picker, addWithLabel(picker, UIElem::Type::File, sizer, label, config_name, tooltip, prereq));
}
std::pair<wxDirPickerCtrl*, wxStaticText*> GSUIElementHolder::addDirPickerAndLabel(wxSizer* sizer, const char* label, const char* config_name, int tooltip, std::function<bool()> prereq)
{
wxDirPickerCtrl* picker = new wxDirPickerCtrl(m_window, wxID_ANY);
return std::make_pair(picker, addWithLabel(picker, UIElem::Type::Directory, sizer, label, config_name, tooltip, prereq));
}
void GSUIElementHolder::Load()
{
for (const UIElem& elem : m_elems)
{
switch (elem.type)
{
case UIElem::Type::CheckBox:
static_cast<wxCheckBox*>(elem.control)->SetValue(theApp.GetConfigB(elem.config));
break;
case UIElem::Type::Choice:
{
GSwxChoice* choice = static_cast<GSwxChoice*>(elem.control);
choice->SetSelection(get_config_index(choice->settings, theApp.GetConfigI(elem.config)));
break;
}
case UIElem::Type::Spin:
static_cast<wxSpinCtrl*>(elem.control)->SetValue(theApp.GetConfigI(elem.config));
break;
case UIElem::Type::Slider:
static_cast<wxSlider*>(elem.control)->SetValue(theApp.GetConfigI(elem.config));
break;
case UIElem::Type::File:
case UIElem::Type::Directory:
{
auto* picker = static_cast<wxFileDirPickerCtrlBase*>(elem.control);
picker->SetInitialDirectory(fromUTF8(theApp.GetConfigS(elem.config)));
picker->SetPath(fromUTF8(theApp.GetConfigS(elem.config)));
break;
}
}
}
}
void GSUIElementHolder::Save()
{
for (const UIElem& elem : m_elems)
{
switch (elem.type)
{
case UIElem::Type::CheckBox:
theApp.SetConfig(elem.config, static_cast<wxCheckBox*>(elem.control)->GetValue());
break;
case UIElem::Type::Choice:
{
GSwxChoice* choice = static_cast<GSwxChoice*>(elem.control);
set_config_from_choice(choice, choice->settings, elem.config);
break;
}
case UIElem::Type::Spin:
theApp.SetConfig(elem.config, static_cast<wxSpinCtrl*>(elem.control)->GetValue());
break;
case UIElem::Type::Slider:
theApp.SetConfig(elem.config, static_cast<wxSlider*>(elem.control)->GetValue());
break;
case UIElem::Type::File:
case UIElem::Type::Directory:
theApp.SetConfig(elem.config, static_cast<wxFileDirPickerCtrlBase*>(elem.control)->GetPath().ToUTF8());
break;
}
}
}
void GSUIElementHolder::Update()
{
for (const UIElem& elem : m_elems)
{
if (elem.prereq)
elem.control->Enable(elem.prereq());
}
}
void GSUIElementHolder::DisableAll()
{
for (const UIElem& elem : m_elems)
{
if (elem.prereq)
elem.control->Enable(false);
}
}
RendererTab::RendererTab(wxWindow* parent)
: wxPanel(parent, wxID_ANY)
, m_ui(this)
{
const int space = wxSizerFlags().Border().GetBorderInPixels();
auto hw_prereq = [this]{ return m_is_hardware; };
auto sw_prereq = [this]{ return !m_is_hardware; };
PaddedBoxSizer<wxBoxSizer> tab_box(wxVERTICAL);
PaddedBoxSizer<wxStaticBoxSizer> general_box(wxVERTICAL, this, "General GS Settings");
PaddedBoxSizer<wxStaticBoxSizer> hardware_box(wxVERTICAL, this, "Hardware Mode");
PaddedBoxSizer<wxStaticBoxSizer> software_box(wxVERTICAL, this, "Software Mode");
auto* hw_checks_box = new wxWrapSizer(wxHORIZONTAL);
auto* paltex_prereq = m_ui.addCheckBox(hw_checks_box, "GPU Palette Conversion", "paltex", IDC_PALTEX, hw_prereq);
m_ui.addCheckBox(hw_checks_box, "Spin GPU During Readbacks", "HWSpinGPUForReadbacks", IDC_SPIN_GPU);
m_ui.addCheckBox(hw_checks_box, "Spin CPU During Readbacks", "HWSpinCPUForReadbacks", IDC_SPIN_CPU);
auto aniso_prereq = [this, paltex_prereq]{ return m_is_hardware && paltex_prereq->GetValue() == false; };
auto* hw_choice_grid = new wxFlexGridSizer(2, space, space);
m_internal_resolution = m_ui.addComboBoxAndLabel(hw_choice_grid, "Internal Resolution:", "upscale_multiplier", &theApp.m_gs_upscale_multiplier, -1, hw_prereq).first;
m_ui.addComboBoxAndLabel(hw_choice_grid, "Anisotropic Filtering:", "MaxAnisotropy", &theApp.m_gs_max_anisotropy, IDC_AFCOMBO, aniso_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Dithering (PgDn):", "dithering_ps2", &theApp.m_gs_dithering, IDC_DITHERING, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Mipmapping:", "mipmap_hw", &theApp.m_gs_hw_mipmapping, IDC_MIPMAP_HW, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Trilinear Filtering:", "TriFilter", &theApp.m_gs_trifilter, IDC_TRI_FILTER, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "CRC Hack Level:", "crc_hack_level", &theApp.m_gs_crc_level, IDC_CRC_LEVEL, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Blending Accuracy:", "accurate_blending_unit", &theApp.m_gs_acc_blend_level, IDC_ACCURATE_BLEND_UNIT, hw_prereq);
m_ui.addComboBoxAndLabel(hw_choice_grid, "Texture Preloading:", "texture_preloading", &theApp.m_gs_texture_preloading, IDC_PRELOAD_TEXTURES, hw_prereq);
hardware_box->Add(hw_checks_box, wxSizerFlags().Centre());
hardware_box->AddSpacer(space);
hardware_box->Add(hw_choice_grid, wxSizerFlags().Centre());
auto* sw_checks_box = new wxWrapSizer(wxHORIZONTAL);
m_ui.addCheckBox(sw_checks_box, "Auto Flush", "autoflush_sw", IDC_AUTO_FLUSH_SW, sw_prereq);
m_ui.addCheckBox(sw_checks_box, "Mipmapping", "mipmap", IDC_MIPMAP_SW, sw_prereq);
software_box->Add(sw_checks_box, wxSizerFlags().Centre());
software_box->AddSpacer(space);
// Rendering threads
auto* thread_box = new wxFlexGridSizer(2, space, space);
m_ui.addSpinAndLabel(thread_box, "Extra Rendering threads:", "extrathreads", 0, 32, 2, IDC_SWTHREADS, sw_prereq);
software_box->Add(thread_box, wxSizerFlags().Centre());
// General GS Settings box
auto* pcrtc_checks_box = new wxWrapSizer(wxHORIZONTAL);
m_ui.addCheckBox(pcrtc_checks_box, "Screen Offsets", "pcrtc_offsets", IDC_PCRTC_OFFSETS);
m_ui.addCheckBox(pcrtc_checks_box, "Show Overscan", "pcrtc_overscan", IDC_PCRTC_OVERSCAN);
m_ui.addCheckBox(pcrtc_checks_box, "Disable Interlace Offset", "disable_interlace_offset", IDC_DISABLE_INTERLACE_OFFSETS);
m_ui.addCheckBox(pcrtc_checks_box, "Anti-Blur", "pcrtc_antiblur", IDC_PCRTC_ANTIBLUR);
general_box->Add(pcrtc_checks_box, wxSizerFlags().Center());
tab_box->Add(hardware_box.outer, wxSizerFlags().Expand());
tab_box->Add(software_box.outer, wxSizerFlags().Expand());
tab_box->Add(general_box.outer, wxSizerFlags().Expand());
SetSizerAndFit(tab_box.outer);
}
HacksTab::HacksTab(wxWindow* parent)
: wxPanel(parent, wxID_ANY)
, m_ui(this)
{
const int space = wxSizerFlags().Border().GetBorderInPixels();
PaddedBoxSizer<wxBoxSizer> tab_box(wxVERTICAL);
auto hw_prereq = [this]{ return m_is_hardware; };
auto* hacks_check_box = m_ui.addCheckBox(tab_box.inner, "Manual HW Hacks (Disables automatic settings if checked)", "UserHacks", -1, hw_prereq);
m_ui.addCheckBox(tab_box.inner, "Skip Presenting Duplicate Frames", "SkipDuplicateFrames", -1);
auto hacks_prereq = [this, hacks_check_box]{ return m_is_hardware && hacks_check_box->GetValue(); };
auto upscale_hacks_prereq = [this, hacks_check_box]{ return !m_is_native_res && hacks_check_box->GetValue(); };
PaddedBoxSizer<wxStaticBoxSizer> rend_hacks_box (wxVERTICAL, this, "Renderer Hacks");
PaddedBoxSizer<wxStaticBoxSizer> upscale_hacks_box(wxVERTICAL, this, "Upscale Hacks");
auto* rend_hacks_grid = new wxFlexGridSizer(2, space, space);
auto* upscale_hacks_grid = new wxFlexGridSizer(3, space, space);
// Renderer Hacks
m_ui.addCheckBox(rend_hacks_grid, "Auto Flush", "UserHacks_AutoFlush", IDC_AUTO_FLUSH_HW, hacks_prereq);
m_ui.addCheckBox(rend_hacks_grid, "Frame Buffer Conversion", "UserHacks_CPU_FB_Conversion", IDC_CPU_FB_CONVERSION, hacks_prereq);
m_ui.addCheckBox(rend_hacks_grid, "Disable Depth Emulation", "UserHacks_DisableDepthSupport", IDC_TC_DEPTH, hacks_prereq);
m_ui.addCheckBox(rend_hacks_grid, "Disable Safe Features", "UserHacks_Disable_Safe_Features", IDC_SAFE_FEATURES, hacks_prereq);
m_ui.addCheckBox(rend_hacks_grid, "Preload Frame Data", "preload_frame_with_gs_data", IDC_PRELOAD_GS, hacks_prereq);
m_ui.addCheckBox(rend_hacks_grid, "Disable Partial Invalidation", "UserHacks_DisablePartialInvalidation", IDC_DISABLE_PARTIAL_TC_INV, hacks_prereq);
m_ui.addCheckBox(rend_hacks_grid, "Texture Inside RT", "UserHacks_TextureInsideRt", IDC_TEX_IN_RT, hacks_prereq);
// Upscale
m_ui.addCheckBox(upscale_hacks_grid, "Align Sprite", "UserHacks_align_sprite_X", IDC_ALIGN_SPRITE, upscale_hacks_prereq);
m_ui.addCheckBox(upscale_hacks_grid, "Merge Sprite", "UserHacks_merge_pp_sprite", IDC_MERGE_PP_SPRITE, upscale_hacks_prereq);
m_ui.addCheckBox(upscale_hacks_grid, "Wild Arms Hack", "UserHacks_WildHack", IDC_WILDHACK, upscale_hacks_prereq);
auto* rend_hack_choice_grid = new wxFlexGridSizer(2, space, space);
auto* upscale_hack_choice_grid = new wxFlexGridSizer(2, space, space);
rend_hack_choice_grid ->AddGrowableCol(1);
upscale_hack_choice_grid->AddGrowableCol(1);
// Renderer Hacks:
m_ui.addComboBoxAndLabel(rend_hack_choice_grid, "Half Screen Fix:", "UserHacks_Half_Bottom_Override", &theApp.m_gs_generic_list, IDC_HALF_SCREEN_TS, hacks_prereq);
// Skipdraw Range
add_label(this, rend_hack_choice_grid, "Skipdraw Range:", IDC_SKIPDRAWEND);
auto* skip_box = new wxBoxSizer(wxHORIZONTAL);
skip_x_spin = m_ui.addSpin(skip_box, "UserHacks_SkipDraw_Start", 0, 10000, 0, IDC_SKIPDRAWSTART, hacks_prereq);
skip_y_spin = m_ui.addSpin(skip_box, "UserHacks_SkipDraw_End", 0, 10000, 0, IDC_SKIPDRAWEND, hacks_prereq);
rend_hack_choice_grid->Add(skip_box, wxSizerFlags().Expand());
// Upscale Hacks:
m_ui.addComboBoxAndLabel(upscale_hack_choice_grid, "Half-Pixel Offset:", "UserHacks_HalfPixelOffset", &theApp.m_gs_offset_hack, IDC_OFFSETHACK, upscale_hacks_prereq);
m_ui.addComboBoxAndLabel(upscale_hack_choice_grid, "Round Sprite:", "UserHacks_round_sprite_offset", &theApp.m_gs_hack, IDC_ROUND_SPRITE, upscale_hacks_prereq);
// Texture Offsets
add_label(this, upscale_hack_choice_grid, "Texture Offsets:", IDC_TCOFFSETX);
auto* tex_off_box = new wxBoxSizer(wxHORIZONTAL);
add_label(this, tex_off_box, "X:", IDC_TCOFFSETX, wxSizerFlags().Centre());
tex_off_box->AddSpacer(space);
m_ui.addSpin(tex_off_box, "UserHacks_TCOffsetX", 0, 10000, 0, IDC_TCOFFSETX, upscale_hacks_prereq);
tex_off_box->AddSpacer(space);
add_label(this, tex_off_box, "Y:", IDC_TCOFFSETY, wxSizerFlags().Centre());
tex_off_box->AddSpacer(space);
m_ui.addSpin(tex_off_box, "UserHacks_TCOffsetY", 0, 10000, 0, IDC_TCOFFSETY, upscale_hacks_prereq);
upscale_hack_choice_grid->Add(tex_off_box, wxSizerFlags().Expand());
rend_hacks_box->Add(rend_hacks_grid, wxSizerFlags().Centre());
rend_hacks_box->AddSpacer(space);
rend_hacks_box->Add(rend_hack_choice_grid, wxSizerFlags().Expand());
upscale_hacks_box->Add(upscale_hacks_grid, wxSizerFlags().Centre());
upscale_hacks_box->AddSpacer(space);
upscale_hacks_box->Add(upscale_hack_choice_grid, wxSizerFlags().Expand());
tab_box->Add(rend_hacks_box.outer, wxSizerFlags().Expand());
tab_box->Add(upscale_hacks_box.outer, wxSizerFlags().Expand());
SetSizerAndFit(tab_box.outer);
}
void HacksTab::DoUpdate()
{
m_ui.Update();
if (skip_x_spin->GetValue() == 0)
skip_y_spin->SetValue(0);
if (skip_y_spin->GetValue() < skip_x_spin->GetValue())
skip_y_spin->SetValue(skip_x_spin->GetValue());
}
RecTab::RecTab(wxWindow* parent)
: wxPanel(parent, wxID_ANY)
, m_ui(this)
{
const int space = wxSizerFlags().Border().GetBorderInPixels();
PaddedBoxSizer<wxBoxSizer> tab_box(wxVERTICAL);
auto* record_check = m_ui.addCheckBox(tab_box.inner, "Enable Recording (F12)", "capture_enabled");
CheckboxPrereq record_prereq(record_check);
PaddedBoxSizer<wxStaticBoxSizer> record_box(wxVERTICAL, this, "Recording");
auto* record_grid_box = new wxFlexGridSizer(2, space, space);
record_grid_box->AddGrowableCol(1);
// Resolution
add_label(this, record_grid_box, "Resolution:");
auto* res_box = new wxBoxSizer(wxHORIZONTAL);
m_ui.addSpin(res_box, "CaptureWidth", 256, 8192, 640, -1, record_prereq);
m_ui.addSpin(res_box, "CaptureHeight", 256, 8192, 480, -1, record_prereq);
record_grid_box->Add(res_box, wxSizerFlags().Expand());
m_ui.addSpinAndLabel(record_grid_box, "Saving Threads:", "capture_threads", 1, 32, 4, -1, record_prereq);
m_ui.addSpinAndLabel(record_grid_box, "PNG Compression Level:", "png_compression_level", 1, 9, 1, -1, record_prereq);
m_ui.addDirPickerAndLabel(record_grid_box, "Output Directory:", "capture_out_dir", -1, record_prereq);
record_box->Add(record_grid_box, wxSizerFlags().Expand());
tab_box->Add(record_box.outer, wxSizerFlags().Expand());
SetSizerAndFit(tab_box.outer);
}
PostTab::PostTab(wxWindow* parent)
: wxPanel(parent, wxID_ANY)
, m_ui(this)
{
const int space = wxSizerFlags().Border().GetBorderInPixels();
PaddedBoxSizer<wxBoxSizer> tab_box(wxVERTICAL);
PaddedBoxSizer<wxStaticBoxSizer> shader_box(wxVERTICAL, this, "Shader Options");
// Bilinear filtering
auto* bil_filter_grid_box = new wxFlexGridSizer(2, space, space);
bil_filter_grid_box->AddGrowableCol(1);
m_ui.addComboBoxAndLabel(bil_filter_grid_box, "Bilinear Filtering:", "linear_present_mode", &theApp.m_gs_tex_display_list, IDC_LINEAR_PRESENT);
shader_box->Add(bil_filter_grid_box, wxSizerFlags().Expand());
// Sharpening, fxaa
PaddedBoxSizer<wxStaticBoxSizer> sharpening_box(wxVERTICAL, this, "Sharpening/Anti-aliasing");
auto* casmode_grid = new wxFlexGridSizer(2, space, space);
casmode_grid->AddGrowableCol(1);
m_ui.addComboBoxAndLabel(casmode_grid, "Contrast Adaptive Sharpening:", "CASMode", &theApp.m_gs_casmode);
sharpening_box->Add(casmode_grid, wxSizerFlags().Expand());
auto* sharpness_grid = new wxFlexGridSizer(2, space, space);
sharpness_grid->AddGrowableCol(1);
m_ui.addSliderAndLabel(sharpness_grid, "Sharpness:", "CASSharpness", 0, 100, 50, -1);
sharpening_box->Add(sharpness_grid, wxSizerFlags().Expand());
auto* fxaa_grid = new wxFlexGridSizer(2, space, space);
fxaa_grid->AddGrowableCol(1);
m_ui.addCheckBox(fxaa_grid, "FXAA (PgUp)", "fxaa", IDC_FXAA);
sharpening_box->Add(fxaa_grid, wxSizerFlags().Expand());
shader_box->Add(sharpening_box.outer, wxSizerFlags().Expand());
// Shade boost
CheckboxPrereq shade_boost_check(m_ui.addCheckBox(shader_box.inner, "Enable Shade Boost", "ShadeBoost", IDC_SHADEBOOST));
PaddedBoxSizer<wxStaticBoxSizer> shade_boost_box(wxVERTICAL, this, "Shade Boost");
auto* shader_boost_grid = new wxFlexGridSizer(2, space, space);
shader_boost_grid->AddGrowableCol(1);
m_ui.addSliderAndLabel(shader_boost_grid, "Brightness:", "ShadeBoost_Brightness", 0, 100, 50, -1, shade_boost_check);
m_ui.addSliderAndLabel(shader_boost_grid, "Contrast:", "ShadeBoost_Contrast", 0, 100, 50, -1, shade_boost_check);
m_ui.addSliderAndLabel(shader_boost_grid, "Saturation:", "ShadeBoost_Saturation", 0, 100, 50, -1, shade_boost_check);
shade_boost_box->Add(shader_boost_grid, wxSizerFlags().Expand());
shader_box->Add(shade_boost_box.outer, wxSizerFlags().Expand());
// TV Shader
auto* tv_box = new wxFlexGridSizer(2, space, space);
tv_box->AddGrowableCol(1);
m_ui.addComboBoxAndLabel(tv_box, "TV Shader:", "TVShader", &theApp.m_gs_tv_shaders);
shader_box->Add(tv_box, wxSizerFlags().Expand());
tab_box->Add(shader_box.outer, wxSizerFlags().Expand());
SetSizerAndFit(tab_box.outer);
}
OSDTab::OSDTab(wxWindow* parent)
: wxPanel(parent, wxID_ANY)
, m_ui(this)
{
const int space = wxSizerFlags().Border().GetBorderInPixels();
PaddedBoxSizer<wxBoxSizer> tab_box(wxVERTICAL);
PaddedBoxSizer<wxStaticBoxSizer> font_box(wxVERTICAL, this, "Visuals");
auto* font_grid = new wxFlexGridSizer(2, space, space);
font_grid->AddGrowableCol(1);
m_ui.addSliderAndLabel(font_grid, "OSD Scale:", "OsdScale", 50, 300, 100, -1);
font_box->Add(font_grid, wxSizerFlags().Expand());
tab_box->Add(font_box.outer, wxSizerFlags().Expand());
PaddedBoxSizer<wxStaticBoxSizer> log_box(wxVERTICAL, this, "Log Messages");
auto* log_grid = new wxFlexGridSizer(2, space, space);
log_grid->AddGrowableCol(1);
m_ui.addCheckBox(log_grid, "Show Notifications", "OsdShowMessages", -1);
m_ui.addCheckBox(log_grid, "Show Speed", "OsdShowSpeed", -1);
m_ui.addCheckBox(log_grid, "Show FPS", "OsdShowFPS", -1);
m_ui.addCheckBox(log_grid, "Show CPU Usage", "OsdShowCPU", -1);
m_ui.addCheckBox(log_grid, "Show GPU Usage", "OsdShowGPU", -1);
m_ui.addCheckBox(log_grid, "Show Resolution", "OsdShowResolution", -1);
m_ui.addCheckBox(log_grid, "Show Statistics", "OsdShowGSStats", -1);
m_ui.addCheckBox(log_grid, "Show Indicators", "OsdShowIndicators", -1);
m_ui.addCheckBox(log_grid, "Show Settings", "OsdShowSettings", -1);
m_ui.addCheckBox(log_grid, "Show Inputs", "OsdShowInputs", -1);
log_box->Add(log_grid, wxSizerFlags().Expand());
tab_box->Add(log_box.outer, wxSizerFlags().Expand());
SetSizerAndFit(tab_box.outer);
}
DebugTab::DebugTab(wxWindow* parent)
: wxPanel(parent, wxID_ANY)
, m_ui(this)
{
const int space = wxSizerFlags().Border().GetBorderInPixels();
PaddedBoxSizer<wxBoxSizer> tab_box(wxVERTICAL);
auto vk_ogl_hw_prereq = [this] { return m_is_ogl_hw || m_is_vk_hw; };
if (g_Conf->DevMode || IsDevBuild)
{
PaddedBoxSizer<wxStaticBoxSizer> debug_box(wxVERTICAL, this, "Debug");
auto* debug_check_box = new wxFlexGridSizer(2, space, space);
m_ui.addCheckBox(debug_check_box, "Disable Dual-Source Blending", "DisableDualSourceBlend");
m_ui.addCheckBox(debug_check_box, "Disable Framebuffer Fetch", "DisableFramebufferFetch");
m_ui.addCheckBox(debug_check_box, "Disable Shader Cache", "disable_shader_cache");
m_ui.addCheckBox(debug_check_box, "Use Blit Swap Chain", "UseBlitSwapChain");
m_ui.addCheckBox(debug_check_box, "Dump GS data", "dump");
m_ui.addCheckBox(debug_check_box, "Use Debug Device", "UseDebugDevice");
auto* debug_save_check_box = new wxWrapSizer(wxHORIZONTAL);
m_ui.addCheckBox(debug_save_check_box, "Save RT", "save");
m_ui.addCheckBox(debug_save_check_box, "Save Frame", "savef");
m_ui.addCheckBox(debug_save_check_box, "Save Texture", "savet");
m_ui.addCheckBox(debug_save_check_box, "Save Depth", "savez");
debug_box->Add(debug_check_box);
debug_box->AddSpacer(space);
debug_box->Add(debug_save_check_box);
auto* dump_grid = new wxFlexGridSizer(2, space, space);
m_ui.addSpinAndLabel(dump_grid, "Start of Dump:", "saven", 0, pow(10, 9), 0);
m_ui.addSpinAndLabel(dump_grid, "Length of Dump:", "savel", 1, pow(10, 5), 5000);
debug_box->AddSpacer(space);
debug_box->Add(dump_grid);
tab_box->Add(debug_box.outer, wxSizerFlags().Expand());
}
PaddedBoxSizer<wxStaticBoxSizer> ogl_box(wxVERTICAL, this, "Overrides");
auto* ogl_grid = new wxFlexGridSizer(2, space, space);
m_ui.addComboBoxAndLabel(ogl_grid, "Texture Barriers:", "OverrideTextureBarriers", &theApp.m_gs_generic_list, -1, vk_ogl_hw_prereq);
m_ui.addComboBoxAndLabel(ogl_grid, "Geometry Shader:", "OverrideGeometryShaders", &theApp.m_gs_generic_list, IDC_GEOMETRY_SHADER_OVERRIDE, vk_ogl_hw_prereq);
m_ui.addComboBoxAndLabel(ogl_grid, "Hardware Download Mode:", "HWDownloadMode", &theApp.m_gs_hw_download_mode, -1);
m_ui.addComboBoxAndLabel(ogl_grid, "Dump Compression:", "GSDumpCompression", &theApp.m_gs_dump_compression, -1);
ogl_box->Add(ogl_grid);
tab_box->Add(ogl_box.outer, wxSizerFlags().Expand());
PaddedBoxSizer<wxStaticBoxSizer> tex_box(wxVERTICAL, this, "Texture Replacements");
auto* tex_grid = new wxFlexGridSizer(2, space, space);
m_ui.addCheckBox(tex_grid, "Dump Textures", "DumpReplaceableTextures", -1);
m_ui.addCheckBox(tex_grid, "Dump Mipmaps", "DumpReplaceableMipmaps", -1);
m_ui.addCheckBox(tex_grid, "Dump FMV Textures", "DumpTexturesWithFMVActive", -1);
m_ui.addCheckBox(tex_grid, "Async Texture Loading", "LoadTextureReplacementsAsync", -1);
m_ui.addCheckBox(tex_grid, "Load Textures", "LoadTextureReplacements", -1);
m_ui.addCheckBox(tex_grid, "Precache Textures", "PrecacheTextureReplacements", -1);
tex_box->Add(tex_grid);
tab_box->Add(tex_box.outer, wxSizerFlags().Expand());
SetSizerAndFit(tab_box.outer);
}
void DebugTab::DoUpdate()
{
m_ui.Update();
}
Dialog::Dialog()
: wxDialog(nullptr, wxID_ANY, "Graphics Settings", wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER)
, m_ui(this)
{
const int space = wxSizerFlags().Border().GetBorderInPixels();
auto* padding = new wxBoxSizer(wxVERTICAL);
m_top_box = new wxBoxSizer(wxVERTICAL);
auto* top_grid = new wxFlexGridSizer(2, space, space);
top_grid->SetFlexibleDirection(wxHORIZONTAL);
m_renderer_select = m_ui.addComboBoxAndLabel(top_grid, "Renderer:", "Renderer", &theApp.m_gs_renderers).first;
m_renderer_select->Bind(wxEVT_CHOICE, &Dialog::OnRendererChange, this);
add_label(this, top_grid, "Adapter:");
m_adapter_select = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, {});
top_grid->Add(m_adapter_select, wxSizerFlags().Expand());
m_ui.addComboBoxAndLabel(top_grid, "Deinterlacing (F5):", "deinterlace_mode", &theApp.m_gs_deinterlace);
m_bifilter_select = m_ui.addComboBoxAndLabel(top_grid, "Texture Filtering:", "filter", &theApp.m_gs_bifilter, IDC_FILTER).first;
auto* book = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_renderer_panel = new RendererTab(book);
m_hacks_panel = new HacksTab(book);
m_rec_panel = new RecTab(book);
m_post_panel = new PostTab(book);
m_osd_panel = new OSDTab(book);
m_debug_panel = new DebugTab(book);
book->AddPage(m_renderer_panel, "Renderer", true);
book->AddPage(m_hacks_panel, "Hacks");
book->AddPage(m_post_panel, "Shader");
book->AddPage(m_osd_panel, "OSD");
book->AddPage(m_rec_panel, "Recording");
book->AddPage(m_debug_panel, "Advanced");
m_top_box->Add(top_grid, wxSizerFlags().Centre());
m_top_box->AddSpacer(space);
m_top_box->Add(book, wxSizerFlags(1).Expand());
padding->Add(m_top_box, wxSizerFlags(1).Expand().Border());
m_top_box->Add(CreateStdDialogButtonSizer(wxOK | wxCANCEL), wxSizerFlags().Right());
SetSizerAndFit(padding);
Bind(wxEVT_CHECKBOX, &Dialog::CallUpdate, this);
Bind(wxEVT_SPINCTRL, &Dialog::CallUpdate, this);
Bind(wxEVT_CHOICE, &Dialog::CallUpdate, this);
}
Dialog::~Dialog()
{
}
void Dialog::CallUpdate(wxCommandEvent&)
{
Update();
}
void Dialog::OnRendererChange(wxCommandEvent&)
{
RendererChange();
Update();
}
GSRendererType Dialog::GetSelectedRendererType()
{
const int index = m_renderer_select->GetSelection();
// there is no currently selected renderer or the combo box has more entries than the renderer list or the current selection is negative
// make sure you haven't made a mistake initializing everything
ASSERT(index < static_cast<int>(theApp.m_gs_renderers.size()) || index >= 0);
const GSRendererType type = static_cast<GSRendererType>(theApp.m_gs_renderers[index].value);
return (type == GSRendererType::Auto) ? GSUtil::GetPreferredRenderer() : type;
}
void Dialog::RendererChange()
{
const GSRendererType renderer = GetSelectedRendererType();
const std::string current_adapter(theApp.GetConfigS("Adapter"));
HostDisplay::AdapterAndModeList list;
switch (renderer)
{
#ifdef _WIN32
case GSRendererType::DX11:
list = D3D11HostDisplay::StaticGetAdapterAndModeList();
break;
case GSRendererType::DX12:
list = D3D12HostDisplay::StaticGetAdapterAndModeList();
break;
#endif
#ifdef ENABLE_VULKAN
case GSRendererType::VK:
list = VulkanHostDisplay::StaticGetAdapterAndModeList(nullptr);
break;
#endif
#ifdef __APPLE__
case GSRendererType::Metal:
list = GetMetalAdapterAndModeList();
break;
#endif
default:
break;
}
m_adapter_select->Clear();
m_adapter_select->Insert(_("Default Adapter"), 0);
if (current_adapter.empty())
m_adapter_select->SetSelection(0);
for (const std::string& name : list.adapter_names)
{
m_adapter_select->Insert(fromUTF8(name), m_adapter_select->GetCount());
if (current_adapter == name)
m_adapter_select->SetSelection(m_adapter_select->GetCount() - 1);
}
m_adapter_select->Enable(!list.adapter_names.empty());
#ifdef _WIN32
m_renderer_panel->Layout(); // The version of wx we use on Windows is dumb and something prevents relayout from happening to notebook pages
#endif
}
void Dialog::Load()
{
m_ui.Load();
const GSRendererType renderer = GSRendererType(theApp.GetConfigI("Renderer"));
m_renderer_select->SetSelection(get_config_index(theApp.m_gs_renderers, static_cast<int>(renderer)));
RendererChange();
m_hacks_panel->Load();
m_renderer_panel->Load();
m_rec_panel->Load();
m_post_panel->Load();
m_osd_panel->Load();
m_debug_panel->Load();
}
void Dialog::Save()
{
m_ui.Save();
// only save the adapter when it makes sense to
// prevents changing the adapter, switching to another renderer and saving
if (m_adapter_select->GetCount() > 1)
{
// First option is system default
if (m_adapter_select->GetSelection() == 0)
theApp.SetConfig("Adapter", "");
else
theApp.SetConfig("Adapter", m_adapter_select->GetStringSelection().c_str());
}
m_hacks_panel->Save();
m_renderer_panel->Save();
m_rec_panel->Save();
m_post_panel->Save();
m_osd_panel->Save();
m_debug_panel->Save();
}
void Dialog::Update()
{
GSRendererType renderer = GetSelectedRendererType();
if (renderer == GSRendererType::Null)
{
m_ui.DisableAll();
m_renderer_select->Enable();
m_hacks_panel->m_ui.DisableAll();
m_renderer_panel->m_ui.DisableAll();
m_rec_panel->m_ui.DisableAll();
m_post_panel->m_ui.DisableAll();
m_osd_panel->m_ui.DisableAll();
m_debug_panel->m_ui.DisableAll();
}
else
{
// cross-tab dependencies yay
const bool is_hw = renderer == GSRendererType::OGL || renderer == GSRendererType::DX11 || renderer == GSRendererType::VK || renderer == GSRendererType::Metal || renderer == GSRendererType::DX12;
const bool is_upscale = m_renderer_panel->m_internal_resolution->GetSelection() != 0;
m_hacks_panel->m_is_native_res = !is_hw || !is_upscale;
m_hacks_panel->m_is_hardware = is_hw;
m_renderer_panel->m_is_hardware = is_hw;
m_debug_panel->m_is_ogl_hw = renderer == GSRendererType::OGL;
m_debug_panel->m_is_vk_hw = renderer == GSRendererType::VK;
m_ui.Update();
m_hacks_panel->DoUpdate();
m_renderer_panel->DoUpdate();
m_rec_panel->DoUpdate();
m_post_panel->DoUpdate();
m_osd_panel->DoUpdate();
m_debug_panel->DoUpdate();
}
}
bool RunwxDialog()
{
Dialog GSSettingsDialog;
GSSettingsDialog.Load();
GSSettingsDialog.Update();
if (GSSettingsDialog.ShowModal() == wxID_OK)
GSSettingsDialog.Save();
return true;
}

View File

@ -1,205 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "GS.h"
#include "GSSetting.h"
#include <wx/wx.h>
#include <wx/stdpaths.h>
#include <wx/filename.h>
#include <wx/notebook.h>
#include <wx/spinctrl.h>
#include <wx/wrapsizer.h>
#include <wx/statline.h>
#include <wx/filepicker.h>
#include <vector>
#include <functional>
class GSUIElementHolder
{
class GSwxChoice : public wxChoice
{
public:
const std::vector<GSSetting>& settings;
GSwxChoice(
wxWindow* parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
const wxArrayString& choices,
const std::vector<GSSetting>* settings,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr)
: wxChoice(parent, id, pos, size, choices, style, validator, name)
, settings(*settings)
{
}
};
struct UIElem
{
enum class Type
{
CheckBox,
Choice,
Spin,
Slider,
File,
Directory,
};
Type type;
wxControl* control;
const char* config;
std::function<bool()> prereq;
UIElem(Type type, wxControl* control, const char* config, std::function<bool()> prereq)
: type(type), control(control), config(config), prereq(prereq)
{
}
};
static bool noPrereq() { return true; }
wxWindow* m_window;
std::vector<UIElem> m_elems;
wxStaticText* addWithLabel(wxControl* control, UIElem::Type type, wxSizer* sizer, const char* label, const char* config_name, int tooltip, std::function<bool()> prereq, wxSizerFlags flags = wxSizerFlags().Centre().Expand().Left());
public:
GSUIElementHolder(wxWindow* window);
wxCheckBox* addCheckBox(wxSizer* sizer, const char* label, const char* config_name, int tooltip = -1, std::function<bool()> prereq = noPrereq);
std::pair<wxChoice*, wxStaticText*> addComboBoxAndLabel(wxSizer* sizer, const char* label, const char* config_name, const std::vector<GSSetting>* settings, int tooltip = -1, std::function<bool()> prereq = noPrereq);
wxSpinCtrl* addSpin(wxSizer* sizer, const char* config_name, int min, int max, int initial, int tooltip = -1, std::function<bool()> prereq = noPrereq);
std::pair<wxSpinCtrl*, wxStaticText*> addSpinAndLabel(wxSizer* sizer, const char* label, const char* config_name, int min, int max, int initial, int tooltip = -1, std::function<bool()> prereq = noPrereq);
std::pair<wxSlider*, wxStaticText*> addSliderAndLabel(wxSizer* sizer, const char* label, const char* config_name, int min, int max, int initial, int tooltip = -1, std::function<bool()> prereq = noPrereq);
std::pair<wxFilePickerCtrl*, wxStaticText*> addFilePickerAndLabel(wxSizer* sizer, const char* label, const char* config_name, int tooltip = -1, std::function<bool()> prereq = noPrereq);
std::pair<wxDirPickerCtrl*, wxStaticText*> addDirPickerAndLabel(wxSizer* sizer, const char* label, const char* config_name, int tooltip = -1, std::function<bool()> prereq = noPrereq);
void Load();
void Save();
void Update();
void DisableAll();
};
namespace GSSettingsDialog
{
class RendererTab : public wxPanel
{
public:
GSUIElementHolder m_ui;
wxChoice* m_internal_resolution;
bool m_is_hardware = false;
RendererTab(wxWindow* parent);
void Load() { m_ui.Load(); }
void Save() { m_ui.Save(); }
void DoUpdate() { m_ui.Update(); }
};
class HacksTab : public wxPanel
{
public:
GSUIElementHolder m_ui;
wxSpinCtrl *skip_x_spin, *skip_y_spin;
bool m_is_hardware = false;
bool m_is_native_res = false;
HacksTab(wxWindow* parent);
void Load() { m_ui.Load(); }
void Save() { m_ui.Save(); }
void DoUpdate();
};
class DebugTab : public wxPanel
{
public:
GSUIElementHolder m_ui;
bool m_is_ogl_hw = false;
bool m_is_vk_hw = false;
DebugTab(wxWindow* parent);
void Load() { m_ui.Load(); }
void Save() { m_ui.Save(); }
void DoUpdate();
};
class RecTab : public wxPanel
{
public:
GSUIElementHolder m_ui;
RecTab(wxWindow* parent);
void Load() { m_ui.Load(); }
void Save() { m_ui.Save(); }
void DoUpdate() { m_ui.Update(); }
};
class PostTab : public wxPanel
{
public:
GSUIElementHolder m_ui;
PostTab(wxWindow* parent);
void Load() { m_ui.Load(); }
void Save() { m_ui.Save(); }
void DoUpdate() { m_ui.Update(); }
};
class OSDTab : public wxPanel
{
public:
GSUIElementHolder m_ui;
OSDTab(wxWindow* parent);
void Load() { m_ui.Load(); }
void Save() { m_ui.Save(); }
void DoUpdate() { m_ui.Update(); }
};
class Dialog : public wxDialog
{
GSUIElementHolder m_ui;
wxBoxSizer* m_top_box;
wxChoice* m_renderer_select;
wxChoice* m_adapter_select;
wxChoice* m_bifilter_select;
RendererTab* m_renderer_panel;
HacksTab* m_hacks_panel;
DebugTab* m_debug_panel;
RecTab* m_rec_panel;
PostTab* m_post_panel;
OSDTab* m_osd_panel;
public:
Dialog();
~Dialog();
void Load();
void Save();
void Update();
void CallUpdate(wxCommandEvent& event);
void OnRendererChange(wxCommandEvent& event);
void RendererChange();
GSRendererType GetSelectedRendererType();
};
} // namespace GSSettingsDialog
extern bool RunwxDialog();

View File

@ -1,167 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2015 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include "common/StringUtil.h"
#include "gui/App.h"
#include "gui/ConsoleLogger.h"
#include <unistd.h>
using namespace Threading;
// Redirects and reads data sent to stdout/stderr and sends it to the PCSX2
// console.
class LinuxPipeThread : public pxThread
{
typedef pxThread _parent;
protected:
FILE* m_stdstream;
FILE* m_fp;
const ConsoleColors m_color;
int m_pipe_fd[2];
void ExecuteTaskInThread();
public:
LinuxPipeThread(FILE* stdstream);
virtual ~LinuxPipeThread();
};
LinuxPipeThread::LinuxPipeThread(FILE* stdstream)
: pxThread(stdstream == stderr? L"Redirect_Stderr" : L"Redirect_Stdout")
, m_stdstream(stdstream)
, m_fp(nullptr)
, m_color(stdstream == stderr? Color_Red : Color_Black)
, m_pipe_fd{-1, -1}
{
const wxChar* stream_name = stdstream == stderr? L"stderr" : L"stdout";
// Save the original stdout/stderr file descriptor
int dup_fd = dup(fileno(stdstream));
if (dup_fd == -1)
throw Exception::RuntimeError().SetDiagMsg(StringUtil::StdStringFromFormat(
"Redirect %s failed: dup: %s", stream_name, strerror(errno)));
m_fp = fdopen(dup_fd, "w");
if (m_fp == nullptr) {
int error = errno;
close(dup_fd);
throw Exception::RuntimeError().SetDiagMsg(StringUtil::StdStringFromFormat(
"Redirect %s failed: fdopen: %s", stream_name, strerror(error)));
}
if (pipe(m_pipe_fd) == -1) {
int error = errno;
fclose(m_fp);
throw Exception::RuntimeError().SetDiagMsg(StringUtil::StdStringFromFormat(
"Redirect %s failed: pipe: %s", stream_name, strerror(error)));
}
}
LinuxPipeThread::~LinuxPipeThread()
{
// Close write end of the pipe first so the redirection thread starts
// finishing up and restore the original stdout/stderr file descriptor so
// messages aren't lost.
dup2(fileno(m_fp), m_pipe_fd[1]);
if (m_stdstream == stdout)
Console_SetStdout(stdout);
fclose(m_fp);
// Read end of pipe should only be closed after the thread terminates to
// prevent messages being lost.
m_mtx_InThread.Wait();
close(m_pipe_fd[0]);
}
void LinuxPipeThread::ExecuteTaskInThread()
{
const wxChar* stream_name = m_stdstream == stderr? L"stderr" : L"stdout";
// Redirect stdout/stderr
int stdstream_fd = fileno(m_stdstream);
if (dup2(m_pipe_fd[1], stdstream_fd) != stdstream_fd) {
Console.Error(wxString::Format(L"Redirect %s failed: dup2: %s",
stream_name, strerror(errno)));
return;
}
close(m_pipe_fd[1]);
m_pipe_fd[1] = stdstream_fd;
// Send console output to the original stdout, otherwise there'll be an
// infinite loop.
if (m_stdstream == stdout)
Console_SetStdout(m_fp);
char buffer[2049];
while (ssize_t bytes_read = read(m_pipe_fd[0], buffer, sizeof(buffer) - 1)) {
if (bytes_read == -1) {
if (errno == EINTR) {
continue;
} else {
// Should never happen.
Console.Error(wxString::Format(L"Redirect %s failed: read: %s",
stream_name, strerror(errno)));
break;
}
}
buffer[bytes_read] = 0;
{
ConsoleColorScope cs(m_color);
Console.WriteRaw(fromUTF8(buffer));
}
}
}
class LinuxPipeRedirection : public PipeRedirectionBase
{
DeclareNoncopyableObject(LinuxPipeRedirection);
protected:
LinuxPipeThread m_thread;
public:
LinuxPipeRedirection(FILE* stdstream);
virtual ~LinuxPipeRedirection() = default;
};
LinuxPipeRedirection::LinuxPipeRedirection(FILE* stdstream)
: m_thread(stdstream)
{
pxAssert((stdstream == stderr) || (stdstream == stdout));
try {
m_thread.Start();
} catch (Exception::BaseThreadError& ex) {
// thread object will become invalid because of scoping after we leave
// the constructor, so re-pack a new exception:
throw Exception::RuntimeError().SetDiagMsg(ex.FormatDiagnosticMessage());
}
}
PipeRedirectionBase* NewPipeRedir(FILE* stdstream)
{
try {
return new LinuxPipeRedirection(stdstream);
} catch (Exception::RuntimeError& ex) {
Console.Error(ex.FormatDiagnosticMessage());
}
return nullptr;
}

View File

@ -1,294 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2010 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include "gui/ConsoleLogger.h"
#include <gdk/gdkkeysyms.h>
// Returns a WXK_* keycode, given some kinda GDK input mess!
int TranslateGDKtoWXK( u32 keysym )
{
int key_code;
switch ( keysym )
{
// Shift, Control and Alt don't generate the CHAR events at all
case GDK_KEY_Shift_L:
case GDK_KEY_Shift_R:
key_code = WXK_SHIFT;
break;
case GDK_KEY_Control_L:
case GDK_KEY_Control_R:
key_code = WXK_CONTROL;
break;
case GDK_KEY_Meta_L:
case GDK_KEY_Meta_R:
case GDK_KEY_Alt_L:
case GDK_KEY_Alt_R:
case GDK_KEY_Super_L:
case GDK_KEY_Super_R:
key_code = WXK_ALT;
break;
// neither do the toggle modifies
case GDK_KEY_Scroll_Lock:
key_code = WXK_SCROLL;
break;
case GDK_KEY_Caps_Lock:
key_code = WXK_CAPITAL;
break;
case GDK_KEY_Num_Lock:
key_code = WXK_NUMLOCK;
break;
// various other special keys
case GDK_KEY_Menu:
key_code = WXK_MENU;
break;
case GDK_KEY_Help:
key_code = WXK_HELP;
break;
case GDK_KEY_BackSpace:
key_code = WXK_BACK;
break;
case GDK_KEY_ISO_Left_Tab:
case GDK_KEY_Tab:
key_code = WXK_TAB;
break;
case GDK_KEY_Linefeed:
case GDK_KEY_Return:
key_code = WXK_RETURN;
break;
case GDK_KEY_Clear:
key_code = WXK_CLEAR;
break;
case GDK_KEY_Pause:
key_code = WXK_PAUSE;
break;
case GDK_KEY_Select:
key_code = WXK_SELECT;
break;
case GDK_KEY_Print:
key_code = WXK_PRINT;
break;
case GDK_KEY_Execute:
key_code = WXK_EXECUTE;
break;
case GDK_KEY_Escape:
key_code = WXK_ESCAPE;
break;
// cursor and other extended keyboard keys
case GDK_KEY_Delete:
key_code = WXK_DELETE;
break;
case GDK_KEY_Home:
key_code = WXK_HOME;
break;
case GDK_KEY_Left:
key_code = WXK_LEFT;
break;
case GDK_KEY_Up:
key_code = WXK_UP;
break;
case GDK_KEY_Right:
key_code = WXK_RIGHT;
break;
case GDK_KEY_Down:
key_code = WXK_DOWN;
break;
case GDK_KEY_Prior: // == GDK_KEY_Page_Up
key_code = WXK_PAGEUP;
break;
case GDK_KEY_Next: // == GDK_KEY_Page_Down
key_code = WXK_PAGEDOWN;
break;
case GDK_KEY_End:
key_code = WXK_END;
break;
case GDK_KEY_Begin:
key_code = WXK_HOME;
break;
case GDK_KEY_Insert:
key_code = WXK_INSERT;
break;
// numpad keys
case GDK_KEY_KP_0:
case GDK_KEY_KP_1:
case GDK_KEY_KP_2:
case GDK_KEY_KP_3:
case GDK_KEY_KP_4:
case GDK_KEY_KP_5:
case GDK_KEY_KP_6:
case GDK_KEY_KP_7:
case GDK_KEY_KP_8:
case GDK_KEY_KP_9:
key_code = WXK_NUMPAD0 + keysym - GDK_KEY_KP_0;
break;
case GDK_KEY_KP_Space:
key_code = WXK_NUMPAD_SPACE;
break;
case GDK_KEY_KP_Tab:
key_code = WXK_NUMPAD_TAB;
break;
case GDK_KEY_KP_Enter:
key_code = WXK_NUMPAD_ENTER;
break;
case GDK_KEY_KP_F1:
key_code = WXK_NUMPAD_F1;
break;
case GDK_KEY_KP_F2:
key_code = WXK_NUMPAD_F2;
break;
case GDK_KEY_KP_F3:
key_code = WXK_NUMPAD_F3;
break;
case GDK_KEY_KP_F4:
key_code = WXK_NUMPAD_F4;
break;
case GDK_KEY_KP_Home:
key_code = WXK_NUMPAD_HOME;
break;
case GDK_KEY_KP_Left:
key_code = WXK_NUMPAD_LEFT;
break;
case GDK_KEY_KP_Up:
key_code = WXK_NUMPAD_UP;
break;
case GDK_KEY_KP_Right:
key_code = WXK_NUMPAD_RIGHT;
break;
case GDK_KEY_KP_Down:
key_code = WXK_NUMPAD_DOWN;
break;
case GDK_KEY_KP_Prior: // == GDK_KEY_KP_Page_Up
key_code = WXK_NUMPAD_PAGEUP;
break;
case GDK_KEY_KP_Next: // == GDK_KEY_KP_Page_Down
key_code = WXK_NUMPAD_PAGEDOWN;
break;
case GDK_KEY_KP_End:
key_code = WXK_NUMPAD_END;
break;
case GDK_KEY_KP_Begin:
key_code = WXK_NUMPAD_BEGIN;
break;
case GDK_KEY_KP_Insert:
key_code = WXK_NUMPAD_INSERT;
break;
case GDK_KEY_KP_Delete:
key_code = WXK_NUMPAD_DELETE;
break;
case GDK_KEY_KP_Equal:
key_code = WXK_NUMPAD_EQUAL;
break;
case GDK_KEY_KP_Multiply:
key_code = WXK_NUMPAD_MULTIPLY;
break;
case GDK_KEY_KP_Add:
key_code = WXK_NUMPAD_ADD;
break;
case GDK_KEY_KP_Separator:
// FIXME: what is this?
//
// Some numeric keyboards have a comma on them. I believe this is the symbol
// for the comma, to distinguish it from the period on the numeric keypad.
// --arcum42
key_code = WXK_NUMPAD_SEPARATOR;
break;
case GDK_KEY_KP_Subtract:
key_code = WXK_NUMPAD_SUBTRACT;
break;
case GDK_KEY_KP_Decimal:
key_code = WXK_NUMPAD_DECIMAL;
break;
case GDK_KEY_KP_Divide:
key_code = WXK_NUMPAD_DIVIDE;
break;
// function keys
case GDK_KEY_F1:
case GDK_KEY_F2:
case GDK_KEY_F3:
case GDK_KEY_F4:
case GDK_KEY_F5:
case GDK_KEY_F6:
case GDK_KEY_F7:
case GDK_KEY_F8:
case GDK_KEY_F9:
case GDK_KEY_F10:
case GDK_KEY_F11:
case GDK_KEY_F12:
key_code = WXK_F1 + keysym - GDK_KEY_F1;
break;
default:
key_code = 0;
}
return key_code;
}

View File

@ -1,164 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2020 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "pcsx2/Config.h"
#include "Global.h"
#include "Device.h"
#include "keyboard.h"
#include "common/Path.h"
#ifdef __APPLE__
#include <Carbon/Carbon.h>
#endif
void DefaultKeyboardValues()
{
#ifdef __APPLE__
set_keyboard_key(0, kVK_ANSI_A, PAD_L2);
set_keyboard_key(0, kVK_ANSI_Semicolon, PAD_R2);
set_keyboard_key(0, kVK_ANSI_W, PAD_L1);
set_keyboard_key(0, kVK_ANSI_P, PAD_R1);
set_keyboard_key(0, kVK_ANSI_I, PAD_TRIANGLE);
set_keyboard_key(0, kVK_ANSI_L, PAD_CIRCLE);
set_keyboard_key(0, kVK_ANSI_K, PAD_CROSS);
set_keyboard_key(0, kVK_ANSI_J, PAD_SQUARE);
set_keyboard_key(0, kVK_ANSI_V, PAD_SELECT);
set_keyboard_key(0, kVK_ANSI_N, PAD_START);
set_keyboard_key(0, kVK_ANSI_E, PAD_UP);
set_keyboard_key(0, kVK_ANSI_F, PAD_RIGHT);
set_keyboard_key(0, kVK_ANSI_D, PAD_DOWN);
set_keyboard_key(0, kVK_ANSI_S, PAD_LEFT);
#else
set_keyboard_key(0, XK_a, PAD_L2);
set_keyboard_key(0, XK_semicolon, PAD_R2);
set_keyboard_key(0, XK_w, PAD_L1);
set_keyboard_key(0, XK_p, PAD_R1);
set_keyboard_key(0, XK_i, PAD_TRIANGLE);
set_keyboard_key(0, XK_l, PAD_CIRCLE);
set_keyboard_key(0, XK_k, PAD_CROSS);
set_keyboard_key(0, XK_j, PAD_SQUARE);
set_keyboard_key(0, XK_v, PAD_SELECT);
set_keyboard_key(0, XK_n, PAD_START);
set_keyboard_key(0, XK_e, PAD_UP);
set_keyboard_key(0, XK_f, PAD_RIGHT);
set_keyboard_key(0, XK_d, PAD_DOWN);
set_keyboard_key(0, XK_s, PAD_LEFT);
#endif
}
void PADSaveConfig()
{
FILE* f;
const std::string iniFile = Path::Combine(EmuFolders::Settings, "PAD.ini"); // default path, just in case
f = fopen(iniFile.c_str(), "w");
if (f == NULL)
{
Console.Warning("PAD: failed to save ini %s", iniFile.c_str());
return;
}
fprintf(f, "first_time_wizard = %d\n", g_conf.ftw);
fprintf(f, "options = %d\n", g_conf.packed_options);
fprintf(f, "mouse_sensibility = %d\n", g_conf.get_sensibility());
fprintf(f, "ff_intensity = %g\n", g_conf.get_ff_intensity());
fprintf(f, "uid[0] = %zu\n", g_conf.get_joy_uid(0));
fprintf(f, "uid[1] = %zu\n", g_conf.get_joy_uid(1));
for (u32 pad = 0; pad < GAMEPAD_NUMBER; pad++)
for (auto const& it : g_conf.keysym_map[pad])
fprintf(f, "PAD %d:KEYSYM 0x%x = %d\n", pad, it.first, it.second);
for (auto const& it : g_conf.sdl2_mapping)
fprintf(f, "SDL2 = %s\n", it.c_str());
for (auto const& pair : g_conf.sdl2_hints)
fprintf(f, "SDL_HINT_%s = %s\n", pair.first.c_str(), pair.second.c_str());
fclose(f);
}
void PADLoadConfig()
{
FILE* f;
bool have_user_setting = false;
g_conf.init();
const std::string iniFile = Path::Combine(EmuFolders::Settings, "PAD.ini"); // default path, just in case
f = fopen(iniFile.c_str(), "r");
if (f == nullptr)
{
Console.Warning("PAD: failed to load ini %s", iniFile.c_str());
PADSaveConfig(); //save and return
return;
}
u32 value;
float fvalue;
if (fscanf(f, "first_time_wizard = %u\n", &value) == 1)
g_conf.ftw = value;
if (fscanf(f, "options = %u\n", &value) == 1)
g_conf.packed_options = value;
if (fscanf(f, "mouse_sensibility = %u\n", &value) == 1)
g_conf.set_sensibility(value);
if (fscanf(f, "ff_intensity = %f\n", &fvalue) == 1)
{
if (fvalue > 1)
fvalue /= 0x7fff; // Old config
g_conf.set_ff_intensity(fvalue);
}
size_t uid;
if (fscanf(f, "uid[0] = %zu\n", &uid) == 1)
g_conf.set_joy_uid(0, uid);
if (fscanf(f, "uid[1] = %zu\n", &uid) == 1)
g_conf.set_joy_uid(1, uid);
u32 pad;
u32 keysym;
u32 index;
while (fscanf(f, "PAD %u:KEYSYM 0x%x = %u\n", &pad, &keysym, &index) == 3)
{
set_keyboard_key(pad & 1, keysym, index);
if (pad == 0)
have_user_setting = true;
}
char extra_name[512];
char extra_value[512];
while (fscanf(f, "%511[^ =] = %511[^\n]\n", extra_name, extra_value) == 2)
{
static constexpr const char* HINT_PREFIX = "SDL_HINT_";
if (strcmp(extra_name, "SDL2") == 0)
{
g_conf.sdl2_mapping.push_back(std::string(extra_value));
}
else if (strncmp(extra_name, HINT_PREFIX, strlen(HINT_PREFIX)) == 0)
{
g_conf.sdl2_hints.push_back({extra_name + strlen(HINT_PREFIX), extra_value});
}
}
if (!have_user_setting)
DefaultKeyboardValues();
fclose(f);
}

View File

@ -1,133 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2020 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "Global.h"
class PADconf
{
float ff_intensity;
u32 sensibility;
public:
union
{
struct
{
u16 forcefeedback : 1;
u16 reverse_lx : 1;
u16 reverse_ly : 1;
u16 reverse_rx : 1;
u16 reverse_ry : 1;
u16 mouse_l : 1;
u16 mouse_r : 1;
u16 _free : 9; // The 9 remaining bits are unused, do what you wish with them ;)
} pad_options[GAMEPAD_NUMBER]; // One for each pads
u32 packed_options; // Only first 8 bits of each 16 bits series are really used, rest is padding
};
u32 ftw;
std::map<u32, u32> keysym_map[GAMEPAD_NUMBER];
std::array<size_t, GAMEPAD_NUMBER> unique_id;
std::vector<std::string> sdl2_mapping;
std::vector<std::pair<std::string, std::string>> sdl2_hints;
PADconf() { init(); }
void init()
{
ftw = 1;
packed_options = 0;
ff_intensity = 1.0; // set it at max value by default
sensibility = 100;
for (u32 pad = 0; pad < GAMEPAD_NUMBER; pad++)
{
keysym_map[pad].clear();
}
unique_id.fill(0);
sdl2_mapping.clear();
}
void set_joy_uid(u32 pad, size_t uid)
{
if (pad < GAMEPAD_NUMBER)
unique_id[pad] = uid;
}
size_t get_joy_uid(u32 pad)
{
if (pad < GAMEPAD_NUMBER)
return unique_id[pad];
else
return 0;
}
/**
* Return (a copy of) private memner ff_instensity
**/
float get_ff_intensity()
{
return ff_intensity;
}
/**
* Set intensity while checking that the new value is within
* valid range, more than 0x7FFF will cause pad not to rumble(and less than 0 is obviously bad)
**/
void set_ff_intensity(float new_intensity)
{
ff_intensity = std::min(std::max(new_intensity, 0.f), 1.f);
}
/**
* Set sensibility value.
* There will be an upper range, and less than 0 is obviously wrong.
* We are doing object oriented code, so members are definitely not supposed to be public.
**/
void set_sensibility(u32 new_sensibility)
{
if (new_sensibility > 0)
{
sensibility = new_sensibility;
}
else
{
sensibility = 1;
}
}
u32 get_sensibility()
{
return sensibility;
}
};
extern PADconf g_conf;
static __forceinline void set_keyboard_key(int pad, int keysym, int index)
{
g_conf.keysym_map[pad][keysym] = index;
}
static __forceinline int get_keyboard_key(int pad, int keysym)
{
// You must use find instead of []
// [] will create an element if the key does not exist and return 0
std::map<u32, u32>::iterator it = g_conf.keysym_map[pad].find(keysym);
if (it != g_conf.keysym_map[pad].end())
return it->second;
else
return -1;
}

View File

@ -1,61 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2020 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "Device.h"
#ifdef SDL_BUILD
#include "SDL/joystick.h"
#endif
/**
* Following static methods are just forwarders to their backend
* This is where link between agnostic and specific code is done
**/
/**
* Safely dispatch to the Rumble method above
**/
void Device::DoRumble(unsigned type, unsigned pad)
{
int index = uid_to_index(pad);
if (index >= 0)
device_manager.devices[index]->Rumble(type, pad);
}
size_t Device::index_to_uid(int index)
{
if ((index >= 0) && (index < (int)device_manager.devices.size()))
return device_manager.devices[index]->GetUniqueIdentifier();
else
return 0;
}
int Device::uid_to_index(int pad)
{
size_t uid = g_conf.get_joy_uid(pad);
for (int i = 0; i < (int)device_manager.devices.size(); ++i)
{
if (device_manager.devices[i]->GetUniqueIdentifier() == uid)
return i;
}
// Current uid wasn't found maybe the pad was unplugged. Or
// user didn't select it. Fallback to 1st pad for
// 1st player. And 2nd pad for 2nd player.
if ((int)device_manager.devices.size() > pad)
return pad;
return -1;
}

View File

@ -1,107 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2020 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "Global.h"
#include "InputManager.h"
#ifdef SDL_BUILD
#include <SDL.h>
#endif
enum DeviceAPI
{
NO_API = 0,
KEYBOARD_API = 16,
SDL_AUTO = 17
};
enum DeviceType
{
NO_DEVICE = 0,
KEYBOARD = 1,
MOUSE = 2,
OTHER = 3
};
class Device
{
public:
Device()
: m_unique_id(0)
, m_device_name("")
, api(NO_API)
, type(NO_DEVICE)
, m_deadzone(1500)
, m_no_error(false)
{
}
virtual ~Device()
{
}
Device(const Device&); // copy constructor
Device& operator=(const Device&); // assignment
/*
* Update state of every attached devices
*/
virtual void UpdateDeviceState() = 0;
/*
* Causes devices to rumble
* Rumble will differ according to type which is either 0(small motor) or 1(big motor)
*/
virtual void Rumble(unsigned type, unsigned pad) {}
/*
* Safely dispatch to the Rumble method above
*/
static void DoRumble(unsigned type, unsigned pad);
/*
* Used for GUI checkbox to give feedback to the user
*/
virtual bool TestForce(float strength = 0.6) { return false; }
virtual const char* GetName() = 0;
virtual int GetInput(gamePadValues input) = 0;
int GetDeadzone()
{
return m_deadzone;
}
virtual size_t GetUniqueIdentifier() = 0;
static size_t index_to_uid(int index);
static int uid_to_index(int pad);
bool IsProperlyInitialized()
{
return m_no_error;
}
size_t m_unique_id;
std::string m_device_name;
DeviceAPI api;
DeviceType type;
protected:
int m_deadzone;
bool m_no_error;
};

View File

@ -1,117 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stdio.h>
#include <assert.h>
#include <array>
#include <vector>
#include <map>
#include <string>
#include <memory>
#include <mutex>
#include <queue>
#include "common/Pcsx2Defs.h"
#include "bitwise.h"
#include "common/Console.h"
#include "common/mt_queue.h"
#include "DebugTools/Debug.h"
#define PADdefs
static const u32 GAMEPAD_NUMBER = 2;
static const u32 MAX_KEYS = 24;
#include "Config.h"
enum gamePadValues
{
PAD_L2 = 0, // L2 button
PAD_R2, // R2 button
PAD_L1, // L1 button
PAD_R1, // R1 button
PAD_TRIANGLE, // Triangle button ▲
PAD_CIRCLE, // Circle button ●
PAD_CROSS, // Cross button ✖
PAD_SQUARE, // Square button ■
PAD_SELECT, // Select button
PAD_L3, // Left joystick button (L3)
PAD_R3, // Right joystick button (R3)
PAD_START, // Start button
PAD_UP, // Directional pad ↑
PAD_RIGHT, // Directional pad →
PAD_DOWN, // Directional pad ↓
PAD_LEFT, // Directional pad ←
PAD_L_UP, // Left joystick (Up) ↑
PAD_L_RIGHT, // Left joystick (Right) →
PAD_L_DOWN, // Left joystick (Down) ↓
PAD_L_LEFT, // Left joystick (Left) ←
PAD_R_UP, // Right joystick (Up) ↑
PAD_R_RIGHT, // Right joystick (Right) →
PAD_R_DOWN, // Right joystick (Down) ↓
PAD_R_LEFT // Right joystick (Left) ←
};
static const std::array<gamePadValues, MAX_KEYS> all_keys =
{
PAD_L2, // L2 button
PAD_R2, // R2 button
PAD_L1, // L1 button
PAD_R1, // R1 button
PAD_TRIANGLE, // Triangle button ▲
PAD_CIRCLE, // Circle button ●
PAD_CROSS, // Cross button ✖
PAD_SQUARE, // Square button ■
PAD_SELECT, // Select button
PAD_L3, // Left joystick button (L3)
PAD_R3, // Right joystick button (R3)
PAD_START, // Start button
PAD_UP, // Directional pad ↑
PAD_RIGHT, // Directional pad →
PAD_DOWN, // Directional pad ↓
PAD_LEFT, // Directional pad ←
PAD_L_UP, // Left joystick (Up) ↑
PAD_L_RIGHT, // Left joystick (Right) →
PAD_L_DOWN, // Left joystick (Down) ↓
PAD_L_LEFT, // Left joystick (Left) ←
PAD_R_UP, // Right joystick (Up) ↑
PAD_R_RIGHT, // Right joystick (Right) →
PAD_R_DOWN, // Right joystick (Down) ↓
PAD_R_LEFT // Right joystick (Left) ←
};
enum PadOptions
{
PADOPTION_FORCEFEEDBACK = 0x1,
PADOPTION_REVERSELX = 0x2,
PADOPTION_REVERSELY = 0x4,
PADOPTION_REVERSERX = 0x8,
PADOPTION_REVERSERY = 0x10,
PADOPTION_MOUSE_L = 0x20,
PADOPTION_MOUSE_R = 0x40,
};
static inline bool IsAnalogKey(int index)
{
return ((index >= PAD_L_UP) && (index <= PAD_R_LEFT));
}
#include "KeyStatus.h"
void PADLoadConfig();
void PADSaveConfig();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 947 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 906 B

View File

@ -1,79 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "InputManager.h"
#include "Device.h"
#include "keyboard.h"
#include "state_management.h"
#ifdef SDL_BUILD
#include "SDL/joystick.h"
#endif
InputDeviceManager device_manager;
// Needs to be moved to individual device code, as does the keyboard input.
void PollForJoystickInput(int cpad)
{
int index = Device::uid_to_index(cpad);
if (index < 0)
return;
auto& gamePad = device_manager.devices[index];
gamePad->UpdateDeviceState();
for (u32 i = 0; i < MAX_KEYS; i++)
{
s32 value = gamePad->GetInput((gamePadValues)i);
if (value != 0)
g_key_status.press(cpad, i, value);
else
g_key_status.release(cpad, i);
}
}
void InputDeviceManager::Update()
{
// Poll keyboard/mouse event. There is currently no way to separate pad0 from pad1 event.
// So we will populate both pad in the same time
for (u32 cpad = 0; cpad < GAMEPAD_NUMBER; cpad++)
{
g_key_status.keyboard_state_acces(cpad);
}
UpdateKeyboardInput();
// Get joystick state + Commit
for (u32 cpad = 0; cpad < GAMEPAD_NUMBER; cpad++)
{
g_key_status.joystick_state_acces(cpad);
PollForJoystickInput(cpad);
g_key_status.commit_status(cpad);
}
Pad::rumble_all();
}
/*
* Find and set up joysticks, potentially other devices.
*/
void EnumerateDevices()
{
#ifdef SDL_BUILD
JoystickInfo::EnumerateJoysticks(device_manager.devices);
#endif
}

View File

@ -1,36 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <vector>
#include <memory>
class Device;
class InputDeviceManager
{
public:
void Update();
std::vector<std::unique_ptr<Device>> devices;
};
extern InputDeviceManager device_manager;
/*
* Find every interesting device and create right structure for them(depends on backend)
*/
extern void EnumerateDevices();

View File

@ -1,204 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2020 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "KeyStatus.h"
#include "Config.h"
void KeyStatus::Init()
{
for (u32 pad = 0; pad < GAMEPAD_NUMBER; pad++)
{
m_button[pad] = 0xFFFF;
m_internal_button_kbd[pad] = 0xFFFF;
m_internal_button_joy[pad] = 0xFFFF;
m_state_acces[pad] = false;
for (u32 index = 0; index < MAX_KEYS; index++)
{
m_button_pressure[pad][index] = 0xFF;
m_internal_button_pressure[pad][index] = 0xFF;
}
m_analog[pad].lx = m_analog_released_val;
m_analog[pad].ly = m_analog_released_val;
m_analog[pad].rx = m_analog_released_val;
m_analog[pad].ry = m_analog_released_val;
m_internal_analog_kbd[pad].lx = m_analog_released_val;
m_internal_analog_kbd[pad].ly = m_analog_released_val;
m_internal_analog_kbd[pad].rx = m_analog_released_val;
m_internal_analog_kbd[pad].ry = m_analog_released_val;
m_internal_analog_joy[pad].lx = m_analog_released_val;
m_internal_analog_joy[pad].ly = m_analog_released_val;
m_internal_analog_joy[pad].rx = m_analog_released_val;
m_internal_analog_joy[pad].ry = m_analog_released_val;
}
}
void KeyStatus::press(u32 pad, u32 index, s32 value)
{
if (!IsAnalogKey(index))
{
m_internal_button_pressure[pad][index] = value;
if (m_state_acces[pad])
clear_bit(m_internal_button_kbd[pad], index);
else
clear_bit(m_internal_button_joy[pad], index);
}
else
{
// clamp value
if (value > MAX_ANALOG_VALUE)
value = MAX_ANALOG_VALUE;
else if (value < -MAX_ANALOG_VALUE)
value = -MAX_ANALOG_VALUE;
// Left -> -- -> Right
// Value range : FFFF8002 -> 0 -> 7FFE
// Force range : 80 -> 0 -> 7F
// Normal mode : expect value 0 -> 80 -> FF
// Reverse mode: expect value FF -> 7F -> 0
u8 force = (value >> 8);
if (analog_is_reversed(pad, index))
analog_set(pad, index, m_analog_released_val - force);
else
analog_set(pad, index, m_analog_released_val + force + 1);
}
}
void KeyStatus::release(u32 pad, u32 index)
{
if (!IsAnalogKey(index))
{
if (m_state_acces[pad])
set_bit(m_internal_button_kbd[pad], index);
else
set_bit(m_internal_button_joy[pad], index);
}
else
{
analog_set(pad, index, m_analog_released_val);
}
}
u16 KeyStatus::get(u32 pad)
{
return m_button[pad];
}
void KeyStatus::analog_set(u32 pad, u32 index, u8 value)
{
PADAnalog* m_internal_analog_ref;
if (m_state_acces[pad])
m_internal_analog_ref = &m_internal_analog_kbd[pad];
else
m_internal_analog_ref = &m_internal_analog_joy[pad];
switch (index)
{
case PAD_R_LEFT:
case PAD_R_RIGHT:
m_internal_analog_ref->rx = value;
break;
case PAD_R_DOWN:
case PAD_R_UP:
m_internal_analog_ref->ry = value;
break;
case PAD_L_LEFT:
case PAD_L_RIGHT:
m_internal_analog_ref->lx = value;
break;
case PAD_L_DOWN:
case PAD_L_UP:
m_internal_analog_ref->ly = value;
break;
default:
break;
}
}
bool KeyStatus::analog_is_reversed(u32 pad, u32 index)
{
switch (index)
{
case PAD_L_RIGHT:
case PAD_L_LEFT:
return (g_conf.pad_options[pad].reverse_lx);
case PAD_R_LEFT:
case PAD_R_RIGHT:
return (g_conf.pad_options[pad].reverse_rx);
case PAD_L_UP:
case PAD_L_DOWN:
return (g_conf.pad_options[pad].reverse_ly);
case PAD_R_DOWN:
case PAD_R_UP:
return (g_conf.pad_options[pad].reverse_ry);
default:
return false;
}
}
u8 KeyStatus::get(u32 pad, u32 index)
{
switch (index)
{
case PAD_R_LEFT:
case PAD_R_RIGHT:
return m_analog[pad].rx;
case PAD_R_DOWN:
case PAD_R_UP:
return m_analog[pad].ry;
case PAD_L_LEFT:
case PAD_L_RIGHT:
return m_analog[pad].lx;
case PAD_L_DOWN:
case PAD_L_UP:
return m_analog[pad].ly;
default:
return m_button_pressure[pad][index];
}
}
u8 KeyStatus::analog_merge(u8 kbd, u8 joy)
{
if (kbd != m_analog_released_val)
return kbd;
else
return joy;
}
void KeyStatus::commit_status(u32 pad)
{
m_button[pad] = m_internal_button_kbd[pad] & m_internal_button_joy[pad];
for (u32 index = 0; index < MAX_KEYS; index++)
m_button_pressure[pad][index] = m_internal_button_pressure[pad][index];
m_analog[pad].lx = analog_merge(m_internal_analog_kbd[pad].lx, m_internal_analog_joy[pad].lx);
m_analog[pad].ly = analog_merge(m_internal_analog_kbd[pad].ly, m_internal_analog_joy[pad].ly);
m_analog[pad].rx = analog_merge(m_internal_analog_kbd[pad].rx, m_internal_analog_joy[pad].rx);
m_analog[pad].ry = analog_merge(m_internal_analog_kbd[pad].ry, m_internal_analog_joy[pad].ry);
}

View File

@ -1,71 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2020 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "Global.h"
typedef struct
{
u8 lx, ly;
u8 rx, ry;
} PADAnalog;
#define MAX_ANALOG_VALUE 32766
class KeyStatus
{
private:
const u8 m_analog_released_val;
u16 m_button[GAMEPAD_NUMBER];
u16 m_internal_button_kbd[GAMEPAD_NUMBER];
u16 m_internal_button_joy[GAMEPAD_NUMBER];
u8 m_button_pressure[GAMEPAD_NUMBER][MAX_KEYS];
u8 m_internal_button_pressure[GAMEPAD_NUMBER][MAX_KEYS];
bool m_state_acces[GAMEPAD_NUMBER];
PADAnalog m_analog[GAMEPAD_NUMBER];
PADAnalog m_internal_analog_kbd[GAMEPAD_NUMBER];
PADAnalog m_internal_analog_joy[GAMEPAD_NUMBER];
void analog_set(u32 pad, u32 index, u8 value);
bool analog_is_reversed(u32 pad, u32 index);
u8 analog_merge(u8 kbd, u8 joy);
public:
KeyStatus()
: m_analog_released_val(0x7F)
{
Init();
}
void Init();
void keyboard_state_acces(u32 pad) { m_state_acces[pad] = true; }
void joystick_state_acces(u32 pad) { m_state_acces[pad] = false; }
void press(u32 pad, u32 index, s32 value = 0xFF);
void release(u32 pad, u32 index);
u16 get(u32 pad);
u8 get(u32 pad, u32 index);
void commit_status(u32 pad);
};
extern KeyStatus g_key_status;

View File

@ -1,294 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2020 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <stdarg.h>
// NOTE: Must come first because of the None enum
#include "common/WindowInfo.h"
#include "keyboard.h"
#include "../Gamepad.h"
#include "state_management.h"
#if defined(__unix__) || defined(__APPLE__)
#include "Device.h"
#endif
#ifdef __linux__
#include <unistd.h>
#endif
#include "gui/AppCoreThread.h"
#include "wx_dialog/dialog.h"
#ifndef __APPLE__
Display* GSdsp = nullptr;
Window GSwin;
#endif
const u32 revision = 3;
const u32 build = 0; // increase that with each version
#define PAD_SAVE_STATE_VERSION ((revision << 8) | (build << 0))
PADconf g_conf;
HostKeyEvent event;
static HostKeyEvent s_event;
std::string s_padstrLogPath("logs/");
#ifndef PCSX2_CORE
// PADclose is called from the core thread but PADupdate is called from the main thread
// I kind of hate this solution but it only needs to be here until we switch to Qt so whatever
static std::mutex s_pad_lock;
#endif
KeyStatus g_key_status;
MtQueue<HostKeyEvent> g_ev_fifo;
s32 PADinit()
{
PADLoadConfig();
Pad::reset_all();
query.reset();
for (int port = 0; port < 2; port++)
slots[port] = 0;
return 0;
}
void PADshutdown()
{
}
s32 PADopen(const WindowInfo& wi)
{
memset(&event, 0, sizeof(event));
g_key_status.Init();
g_ev_fifo.reset();
#if defined(__unix__) || defined(__APPLE__)
EnumerateDevices();
#endif
#ifndef __APPLE__
if (wi.type != WindowInfo::Type::X11)
return -1;
GSdsp = static_cast<Display*>(wi.display_connection);
GSwin = reinterpret_cast<Window>(wi.window_handle);
#endif
return 0;
}
void PADclose()
{
#ifndef PCSX2_CORE
std::lock_guard<std::mutex> guard(s_pad_lock);
#endif
device_manager.devices.clear();
}
s32 PADsetSlot(u8 port, u8 slot)
{
port--;
slot--;
if (port > 1 || slot > 3)
{
return 0;
}
// Even if no pad there, record the slot, as it is the active slot regardless.
slots[port] = slot;
return 1;
}
s32 PADfreeze(FreezeAction mode, freezeData* data)
{
if (!data)
return -1;
if (mode == FreezeAction::Size)
{
data->size = sizeof(PadFullFreezeData);
}
else if (mode == FreezeAction::Load)
{
PadFullFreezeData* pdata = (PadFullFreezeData*)(data->data);
Pad::stop_vibrate_all();
if (data->size != sizeof(PadFullFreezeData) || pdata->version != PAD_SAVE_STATE_VERSION ||
strncmp(pdata->format, "LinPad", sizeof(pdata->format)))
return 0;
query = pdata->query;
if (pdata->query.slot < 4)
{
query = pdata->query;
}
// Tales of the Abyss - pad fix
// - restore data for both ports
for (int port = 0; port < 2; port++)
{
for (int slot = 0; slot < 4; slot++)
{
u8 mode = pdata->padData[port][slot].mode;
if (mode != MODE_DIGITAL && mode != MODE_ANALOG && mode != MODE_DS2_NATIVE)
{
break;
}
memcpy(&pads[port][slot], &pdata->padData[port][slot], sizeof(PadFreezeData));
}
if (pdata->slot[port] < 4)
slots[port] = pdata->slot[port];
}
}
else if (mode == FreezeAction::Save)
{
if (data->size != sizeof(PadFullFreezeData))
return 0;
PadFullFreezeData* pdata = (PadFullFreezeData*)(data->data);
// Tales of the Abyss - pad fix
// - PCSX2 only saves port0 (save #1), then port1 (save #2)
memset(pdata, 0, data->size);
strncpy(pdata->format, "LinPad", sizeof(pdata->format));
pdata->version = PAD_SAVE_STATE_VERSION;
pdata->query = query;
for (int port = 0; port < 2; port++)
{
for (int slot = 0; slot < 4; slot++)
{
pdata->padData[port][slot] = pads[port][slot];
}
pdata->slot[port] = slots[port];
}
}
else
{
return -1;
}
return 0;
}
u8 PADstartPoll(int port, int slot)
{
return pad_start_poll(port, slot);
}
u8 PADpoll(u8 value)
{
return pad_poll(value);
}
bool PADcomplete()
{
return pad_complete();
}
// PADkeyEvent is called every vsync (return NULL if no event)
HostKeyEvent* PADkeyEvent()
{
#ifdef SDL_BUILD
// Take the opportunity to handle hot plugging here
SDL_Event events;
while (SDL_PollEvent(&events))
{
switch (events.type)
{
case SDL_CONTROLLERDEVICEADDED:
case SDL_CONTROLLERDEVICEREMOVED:
EnumerateDevices();
break;
default:
break;
}
}
#endif
#if defined(__unix__) || defined(__APPLE__)
if (g_ev_fifo.size() == 0)
{
//PAD_LOG("No events in queue, returning empty event");
s_event = event;
event.type = HostKeyEvent::Type::NoEvent;
event.key = 0;
return &s_event;
}
s_event = g_ev_fifo.dequeue();
AnalyzeKeyEvent(s_event);
//PAD_LOG("Returning Event. Event Type: %d, Key: %d", s_event.type, s_event.key);
return &s_event;
#endif
}
#if defined(__unix__) || defined(__APPLE__)
void PADWriteEvent(HostKeyEvent& evt)
{
// if (evt.evt != 6) { // Skip mouse move events for logging
// PAD_LOG("Pushing Event. Event Type: %d, Key: %d", evt.type, evt.key);
// }
g_ev_fifo.push(evt);
}
#endif
void PADupdate(int pad)
{
#ifndef __APPLE__
// Gamepad inputs don't count as an activity. Therefore screensaver will
// be fired after a couple of minute.
// Emulate an user activity
static int count = 0;
count++;
if (GSdsp && (count & 0xFFF) == 0)
{
// 1 call every 4096 Vsync is enough
XResetScreenSaver(GSdsp);
}
#endif
#ifndef PCSX2_CORE
std::lock_guard<std::mutex> guard(s_pad_lock);
#endif
// Actually PADupdate is always call with pad == 0. So you need to update both
// pads -- Gregory
device_manager.Update();
}
void PADconfigure()
{
ScopedCoreThreadPause paused_core;
PADLoadConfig();
DisplayDialog();
paused_core.AllowResume();
return;
}

Some files were not shown because too many files have changed in this diff Show More