diff --git a/README.md b/README.md index d2dd255ed..929ab50b1 100644 --- a/README.md +++ b/README.md @@ -80,24 +80,6 @@ To set up: The Qt frontend includes an automatic update checker. Builds downloaded after 2020/08/07 will automatically check for updates each time the emulator starts, this can be disabled in Settings. Alternatively, you can force an update check by clicking `Help->Check for Updates`. -### Universal Windows Platform / Xbox One - -The DuckStation fullscreen UI is available for the Universal Windows Platform and Xbox One. - -To use on Xbox One: - -1. Ensure your console is in developer mode. You will need to purchase a developer license from Microsoft. -2. Download the duckstation-uwp.appx file. -3. Navigate to the device portal for your console (displayed in the home screen). -4. Install the appx file by clicking Add in the main page. -5. Set the app to Game mode instead of App mode: Scroll down to DuckStation in the listinng, press the `Change View` button, select `View Details`, and change `App` to `Game`. -6. Upload a BIOS image to the local state directory for DuckStation, or place your BIOS image on a removable USB drive. If using a USB drive, you will need to set the BIOS path in DuckStation's settings to point to this directory. -7. Add games to the local state games directory, or use a removable USB drive. Again, you will have to register this path in Game List Settings for it to scan. -8. Launch the app, and enjoy. By default, the `Change View` button will open the quick menu. -9. Don't forget to enable enhancements, an Xbox One S can do 8x resolution scale with 4K output, Series consoles can go higher. - -**NOTE:** I'd recommend using a USB drive for saving memory cards, as the local state directory will be removed when you uninstall the app. - ### Linux The only supported version of DuckStation for Linux are the AppImages in the releases page. The AppImages require a distribution equivalent to Ubuntu 20.04 or newer to run, which is also the minimum requirement for Qt 6. If you are using a packaged version of DuckStation from another source, please do not ask us for assistance and speak to your packager instead, they have a history of breaking things and there's a good chance that's the issue. diff --git a/dep/msvc/vsprops/Base.props b/dep/msvc/vsprops/Base.props index c7203b153..0b2e7dcde 100644 --- a/dep/msvc/vsprops/Base.props +++ b/dep/msvc/vsprops/Base.props @@ -18,30 +18,15 @@ true stdcpp17 true - _CRT_INTERNAL_NONSTDC_NAMES;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions) + _HAS_EXCEPTIONS=0;_CRT_INTERNAL_NONSTDC_NAMES;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;WIN32;%(PreprocessorDefinitions) /Zc:__cplusplus /Zo /utf-8 %(AdditionalOptions) + false true - - - - _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) - false - - - - - - NotUsing - - _UWP;%(PreprocessorDefinitions) - - - Disabled diff --git a/dep/msvc/vsprops/Configurations.props b/dep/msvc/vsprops/Configurations.props index 68f20f35d..8eff5f8e1 100644 --- a/dep/msvc/vsprops/Configurations.props +++ b/dep/msvc/vsprops/Configurations.props @@ -49,58 +49,14 @@ Release x64 - - DebugUWP - ARM64 - - - DebugUWP - Win32 - - - DebugUWP - x64 - - - ReleaseUWP - ARM64 - - - ReleaseUWP - Win32 - - - ReleaseUWP - x64 - - - true - - - - $(MSBuildProjectName) $(MSBuildProjectName) - - - Win32Proj 10.0 - - - true - en-US - 15.0 - true - Windows Store - 10.0 - 10.0.19041.0 - 10.0.17134.0 - $(SolutionDir)build\$(Configuration)-$(Platform)\ diff --git a/dep/msvc/vsprops/StaticLibrary.props b/dep/msvc/vsprops/StaticLibrary.props index 6c8f21e65..3e9a63c15 100644 --- a/dep/msvc/vsprops/StaticLibrary.props +++ b/dep/msvc/vsprops/StaticLibrary.props @@ -8,12 +8,6 @@ StaticLibrary - - true - false - false - - diff --git a/dep/msvc/vsprops/Targets.props b/dep/msvc/vsprops/Targets.props index 2d3e2bf8f..1d15da672 100644 --- a/dep/msvc/vsprops/Targets.props +++ b/dep/msvc/vsprops/Targets.props @@ -1,14 +1,4 @@ - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/duckstation-uwp.sln b/duckstation-uwp.sln deleted file mode 100644 index 87a83f494..000000000 --- a/duckstation-uwp.sln +++ /dev/null @@ -1,360 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29230.47 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glad", "dep\glad\glad.vcxproj", "{43540154-9E1E-409C-834F-B84BE5621388}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencies", "{BA490C0E-497D-4634-A21E-E65012006385}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "imgui", "dep\imgui\imgui.vcxproj", "{BB08260F-6FBC-46AF-8924-090EE71360C6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "src\common\common.vcxproj", "{EE054E08-3799-4A59-A422-18259C105FFD}" - ProjectSection(ProjectDependencies) = postProject - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2} = {7F909E29-4808-4BD9-A60C-56C51A3AAEC2} - {43540154-9E1E-409C-834F-B84BE5621388} = {43540154-9E1E-409C-834F-B84BE5621388} - {ED601289-AC1A-46B8-A8ED-17DB9EB73423} = {ED601289-AC1A-46B8-A8ED-17DB9EB73423} - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017} = {425D6C99-D1C8-43C2-B8AC-4D7B1D941017} - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035} = {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035} - {7FF9FDB9-D504-47DB-A16A-B08071999620} = {7FF9FDB9-D504-47DB-A16A-B08071999620} - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3} = {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "src\core\core.vcxproj", "{868B98C8-65A1-494B-8346-250A73A48C0A}" - ProjectSection(ProjectDependencies) = postProject - {EE054E08-3799-4A59-A422-18259C105FFD} = {EE054E08-3799-4A59-A422-18259C105FFD} - {BB08260F-6FBC-46AF-8924-090EE71360C6} = {BB08260F-6FBC-46AF-8924-090EE71360C6} - {8906836E-F06E-46E8-B11A-74E5E8C7B8FB} = {8906836E-F06E-46E8-B11A-74E5E8C7B8FB} - {ED601289-AC1A-46B8-A8ED-17DB9EB73423} = {ED601289-AC1A-46B8-A8ED-17DB9EB73423} - {09553C96-9F39-49BF-8AE6-7ACBD07C410C} = {09553C96-9F39-49BF-8AE6-7ACBD07C410C} - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035} = {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035} - {7FF9FDB9-D504-47DB-A16A-B08071999620} = {7FF9FDB9-D504-47DB-A16A-B08071999620} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stb", "dep\stb\stb.vcxproj", "{ED601289-AC1A-46B8-A8ED-17DB9EB73423}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simpleini", "dep\simpleini\simpleini.vcxproj", "{3773F4CC-614E-4028-8595-22E08CA649E3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyxml2", "dep\tinyxml2\tinyxml2.vcxproj", "{933118A9-68C5-47B4-B151-B03C93961623}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "dep\minizip\minizip.vcxproj", "{8BDA439C-6358-45FB-9994-2FF083BABE06}" - ProjectSection(ProjectDependencies) = postProject - {7FF9FDB9-D504-47DB-A16A-B08071999620} = {7FF9FDB9-D504-47DB-A16A-B08071999620} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "dep\zlib\zlib.vcxproj", "{7FF9FDB9-D504-47DB-A16A-B08071999620}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchdr", "dep\libchdr\libchdr.vcxproj", "{425D6C99-D1C8-43C2-B8AC-4D7B1D941017}" - ProjectSection(ProjectDependencies) = postProject - {DD944834-7899-4C1C-A4C1-064B5009D239} = {DD944834-7899-4C1C-A4C1-064B5009D239} - {7FF9FDB9-D504-47DB-A16A-B08071999620} = {7FF9FDB9-D504-47DB-A16A-B08071999620} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lzma", "dep\lzma\lzma.vcxproj", "{DD944834-7899-4C1C-A4C1-064B5009D239}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "frontend-common", "src\frontend-common\frontend-common.vcxproj", "{6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}" - ProjectSection(ProjectDependencies) = postProject - {075CED82-6A20-46DF-94C7-9624AC9DDBEB} = {075CED82-6A20-46DF-94C7-9624AC9DDBEB} - {8BDA439C-6358-45FB-9994-2FF083BABE06} = {8BDA439C-6358-45FB-9994-2FF083BABE06} - {933118A9-68C5-47B4-B151-B03C93961623} = {933118A9-68C5-47B4-B151-B03C93961623} - {868B98C8-65A1-494B-8346-250A73A48C0A} = {868B98C8-65A1-494B-8346-250A73A48C0A} - {3773F4CC-614E-4028-8595-22E08CA649E3} = {3773F4CC-614E-4028-8595-22E08CA649E3} - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64} = {4BA0A6D4-3AE1-42B2-9347-096FD023FF64} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xxhash", "dep\xxhash\xxhash.vcxproj", "{09553C96-9F39-49BF-8AE6-7ACBD07C410C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scmversion", "src\scmversion\scmversion.vcxproj", "{075CED82-6A20-46DF-94C7-9624AC9DDBEB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glslang", "dep\glslang\glslang.vcxproj", "{7F909E29-4808-4BD9-A60C-56C51A3AAEC2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vulkan-loader", "dep\vulkan-loader\vulkan-loader.vcxproj", "{9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vixl", "dep\vixl\vixl.vcxproj", "{8906836E-F06E-46E8-B11A-74E5E8C7B8FB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsamplerate", "dep\libsamplerate\libsamplerate.vcxproj", "{39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rcheevos", "dep\rcheevos\rcheevos.vcxproj", "{4BA0A6D4-3AE1-42B2-9347-096FD023FF64}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "duckstation-uwp", "src\duckstation-uwp\duckstation-uwp.vcxproj", "{E2A6CEA9-9537-4C61-B637-81F1F17EF638}" - ProjectSection(ProjectDependencies) = postProject - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6} = {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - DebugUWP|ARM64 = DebugUWP|ARM64 - DebugUWP|x64 = DebugUWP|x64 - DebugUWP|x86 = DebugUWP|x86 - ReleaseUWP|ARM64 = ReleaseUWP|ARM64 - ReleaseUWP|x64 = ReleaseUWP|x64 - ReleaseUWP|x86 = ReleaseUWP|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {43540154-9E1E-409C-834F-B84BE5621388}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {43540154-9E1E-409C-834F-B84BE5621388}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {43540154-9E1E-409C-834F-B84BE5621388}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {43540154-9E1E-409C-834F-B84BE5621388}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {43540154-9E1E-409C-834F-B84BE5621388}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {43540154-9E1E-409C-834F-B84BE5621388}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {43540154-9E1E-409C-834F-B84BE5621388}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {43540154-9E1E-409C-834F-B84BE5621388}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {43540154-9E1E-409C-834F-B84BE5621388}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {43540154-9E1E-409C-834F-B84BE5621388}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {43540154-9E1E-409C-834F-B84BE5621388}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {43540154-9E1E-409C-834F-B84BE5621388}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {BB08260F-6FBC-46AF-8924-090EE71360C6}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {EE054E08-3799-4A59-A422-18259C105FFD}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {EE054E08-3799-4A59-A422-18259C105FFD}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {EE054E08-3799-4A59-A422-18259C105FFD}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {EE054E08-3799-4A59-A422-18259C105FFD}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {EE054E08-3799-4A59-A422-18259C105FFD}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {EE054E08-3799-4A59-A422-18259C105FFD}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {EE054E08-3799-4A59-A422-18259C105FFD}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {EE054E08-3799-4A59-A422-18259C105FFD}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {EE054E08-3799-4A59-A422-18259C105FFD}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {EE054E08-3799-4A59-A422-18259C105FFD}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {EE054E08-3799-4A59-A422-18259C105FFD}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {EE054E08-3799-4A59-A422-18259C105FFD}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {868B98C8-65A1-494B-8346-250A73A48C0A}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {868B98C8-65A1-494B-8346-250A73A48C0A}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {868B98C8-65A1-494B-8346-250A73A48C0A}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {868B98C8-65A1-494B-8346-250A73A48C0A}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {868B98C8-65A1-494B-8346-250A73A48C0A}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {868B98C8-65A1-494B-8346-250A73A48C0A}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {868B98C8-65A1-494B-8346-250A73A48C0A}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {868B98C8-65A1-494B-8346-250A73A48C0A}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {868B98C8-65A1-494B-8346-250A73A48C0A}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {868B98C8-65A1-494B-8346-250A73A48C0A}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {868B98C8-65A1-494B-8346-250A73A48C0A}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {868B98C8-65A1-494B-8346-250A73A48C0A}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {ED601289-AC1A-46B8-A8ED-17DB9EB73423}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {3773F4CC-614E-4028-8595-22E08CA649E3}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {3773F4CC-614E-4028-8595-22E08CA649E3}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {3773F4CC-614E-4028-8595-22E08CA649E3}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {3773F4CC-614E-4028-8595-22E08CA649E3}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {3773F4CC-614E-4028-8595-22E08CA649E3}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {3773F4CC-614E-4028-8595-22E08CA649E3}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {3773F4CC-614E-4028-8595-22E08CA649E3}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {3773F4CC-614E-4028-8595-22E08CA649E3}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {3773F4CC-614E-4028-8595-22E08CA649E3}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {3773F4CC-614E-4028-8595-22E08CA649E3}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {3773F4CC-614E-4028-8595-22E08CA649E3}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {3773F4CC-614E-4028-8595-22E08CA649E3}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {933118A9-68C5-47B4-B151-B03C93961623}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {933118A9-68C5-47B4-B151-B03C93961623}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {933118A9-68C5-47B4-B151-B03C93961623}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {933118A9-68C5-47B4-B151-B03C93961623}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {933118A9-68C5-47B4-B151-B03C93961623}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {933118A9-68C5-47B4-B151-B03C93961623}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {933118A9-68C5-47B4-B151-B03C93961623}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {933118A9-68C5-47B4-B151-B03C93961623}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {933118A9-68C5-47B4-B151-B03C93961623}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {933118A9-68C5-47B4-B151-B03C93961623}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {933118A9-68C5-47B4-B151-B03C93961623}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {933118A9-68C5-47B4-B151-B03C93961623}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {8BDA439C-6358-45FB-9994-2FF083BABE06}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {7FF9FDB9-D504-47DB-A16A-B08071999620}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {DD944834-7899-4C1C-A4C1-064B5009D239}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {DD944834-7899-4C1C-A4C1-064B5009D239}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {DD944834-7899-4C1C-A4C1-064B5009D239}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {DD944834-7899-4C1C-A4C1-064B5009D239}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {DD944834-7899-4C1C-A4C1-064B5009D239}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {DD944834-7899-4C1C-A4C1-064B5009D239}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {DD944834-7899-4C1C-A4C1-064B5009D239}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {DD944834-7899-4C1C-A4C1-064B5009D239}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {DD944834-7899-4C1C-A4C1-064B5009D239}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {DD944834-7899-4C1C-A4C1-064B5009D239}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {DD944834-7899-4C1C-A4C1-064B5009D239}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {DD944834-7899-4C1C-A4C1-064B5009D239}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {6245DEC8-D2DA-47EE-A373-CBD6FCF3ECE6}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {09553C96-9F39-49BF-8AE6-7ACBD07C410C}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {075CED82-6A20-46DF-94C7-9624AC9DDBEB}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {8906836E-F06E-46E8-B11A-74E5E8C7B8FB}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {8906836E-F06E-46E8-B11A-74E5E8C7B8FB}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {8906836E-F06E-46E8-B11A-74E5E8C7B8FB}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {8906836E-F06E-46E8-B11A-74E5E8C7B8FB}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {8906836E-F06E-46E8-B11A-74E5E8C7B8FB}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {8906836E-F06E-46E8-B11A-74E5E8C7B8FB}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {8906836E-F06E-46E8-B11A-74E5E8C7B8FB}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {8906836E-F06E-46E8-B11A-74E5E8C7B8FB}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.DebugUWP|ARM64.ActiveCfg = DebugUWP|ARM64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.DebugUWP|ARM64.Build.0 = DebugUWP|ARM64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.DebugUWP|ARM64.Deploy.0 = DebugUWP|ARM64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.DebugUWP|x64.ActiveCfg = DebugUWP|x64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.DebugUWP|x64.Build.0 = DebugUWP|x64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.DebugUWP|x64.Deploy.0 = DebugUWP|x64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.DebugUWP|x86.ActiveCfg = DebugUWP|Win32 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.DebugUWP|x86.Build.0 = DebugUWP|Win32 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.DebugUWP|x86.Deploy.0 = DebugUWP|Win32 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.ReleaseUWP|ARM64.ActiveCfg = ReleaseUWP|ARM64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.ReleaseUWP|ARM64.Build.0 = ReleaseUWP|ARM64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.ReleaseUWP|ARM64.Deploy.0 = ReleaseUWP|ARM64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.ReleaseUWP|x64.ActiveCfg = ReleaseUWP|x64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.ReleaseUWP|x64.Build.0 = ReleaseUWP|x64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.ReleaseUWP|x64.Deploy.0 = ReleaseUWP|x64 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.ReleaseUWP|x86.ActiveCfg = ReleaseUWP|Win32 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.ReleaseUWP|x86.Build.0 = ReleaseUWP|Win32 - {E2A6CEA9-9537-4C61-B637-81F1F17EF638}.ReleaseUWP|x86.Deploy.0 = ReleaseUWP|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {43540154-9E1E-409C-834F-B84BE5621388} = {BA490C0E-497D-4634-A21E-E65012006385} - {BB08260F-6FBC-46AF-8924-090EE71360C6} = {BA490C0E-497D-4634-A21E-E65012006385} - {ED601289-AC1A-46B8-A8ED-17DB9EB73423} = {BA490C0E-497D-4634-A21E-E65012006385} - {3773F4CC-614E-4028-8595-22E08CA649E3} = {BA490C0E-497D-4634-A21E-E65012006385} - {933118A9-68C5-47B4-B151-B03C93961623} = {BA490C0E-497D-4634-A21E-E65012006385} - {8BDA439C-6358-45FB-9994-2FF083BABE06} = {BA490C0E-497D-4634-A21E-E65012006385} - {7FF9FDB9-D504-47DB-A16A-B08071999620} = {BA490C0E-497D-4634-A21E-E65012006385} - {425D6C99-D1C8-43C2-B8AC-4D7B1D941017} = {BA490C0E-497D-4634-A21E-E65012006385} - {DD944834-7899-4C1C-A4C1-064B5009D239} = {BA490C0E-497D-4634-A21E-E65012006385} - {09553C96-9F39-49BF-8AE6-7ACBD07C410C} = {BA490C0E-497D-4634-A21E-E65012006385} - {7F909E29-4808-4BD9-A60C-56C51A3AAEC2} = {BA490C0E-497D-4634-A21E-E65012006385} - {9C8DDEB0-2B8F-4F5F-BA86-127CDF27F035} = {BA490C0E-497D-4634-A21E-E65012006385} - {8906836E-F06E-46E8-B11A-74E5E8C7B8FB} = {BA490C0E-497D-4634-A21E-E65012006385} - {39F0ADFF-3A84-470D-9CF0-CA49E164F2F3} = {BA490C0E-497D-4634-A21E-E65012006385} - {4BA0A6D4-3AE1-42B2-9347-096FD023FF64} = {BA490C0E-497D-4634-A21E-E65012006385} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {26E40B32-7C1D-48D0-95F4-1A500E054028} - EndGlobalSection -EndGlobal diff --git a/src/common/assert.cpp b/src/common/assert.cpp index 6d83991dc..0c049d2ee 100644 --- a/src/common/assert.cpp +++ b/src/common/assert.cpp @@ -3,7 +3,7 @@ #include #include -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) #include "windows_headers.h" #include #include @@ -13,7 +13,7 @@ static std::mutex s_AssertFailedMutex; static inline void FreezeThreads(void** ppHandle) { -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0); if (hSnapshot != INVALID_HANDLE_VALUE) { @@ -43,7 +43,7 @@ static inline void FreezeThreads(void** ppHandle) static inline void ResumeThreads(void* pHandle) { -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) HANDLE hSnapshot = (HANDLE)pHandle; if (pHandle != INVALID_HANDLE_VALUE) { @@ -79,7 +79,7 @@ void Y_OnAssertFailed(const char* szMessage, const char* szFunction, const char* char szMsg[512]; std::snprintf(szMsg, sizeof(szMsg), "%s in function %s (%s:%u)", szMessage, szFunction, szFile, uLine); -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) SetConsoleTextAttribute(GetStdHandle(STD_ERROR_HANDLE), FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY); WriteConsoleA(GetStdHandle(STD_ERROR_HANDLE), szMsg, static_cast(std::strlen(szMsg)), NULL, NULL); OutputDebugStringA(szMsg); @@ -114,7 +114,7 @@ void Y_OnPanicReached(const char* szMessage, const char* szFunction, const char* char szMsg[512]; std::snprintf(szMsg, sizeof(szMsg), "%s in function %s (%s:%u)", szMessage, szFunction, szFile, uLine); -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) SetConsoleTextAttribute(GetStdHandle(STD_ERROR_HANDLE), FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY); WriteConsoleA(GetStdHandle(STD_ERROR_HANDLE), szMsg, static_cast(std::strlen(szMsg)), NULL, NULL); OutputDebugStringA(szMsg); diff --git a/src/common/byte_stream.cpp b/src/common/byte_stream.cpp index 8c5c9b1f5..9d1b22093 100644 --- a/src/common/byte_stream.cpp +++ b/src/common/byte_stream.cpp @@ -286,7 +286,7 @@ public: { if (m_discarded) { -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) // delete the temporary file if (!DeleteFileW(StringUtil::UTF8StringToWideString(m_temporaryFileName).c_str())) { @@ -294,14 +294,6 @@ public: "AtomicUpdatedFileByteStream::~AtomicUpdatedFileByteStream(): Failed to delete temporary file '%s'", m_temporaryFileName.c_str()); } -#elif defined(_UWP) - // delete the temporary file - if (!DeleteFileFromAppW(StringUtil::UTF8StringToWideString(m_temporaryFileName).c_str())) - { - Log_WarningPrintf( - "AtomicUpdatedFileByteStream::~AtomicUpdatedFileByteStream(): Failed to delete temporary file '%s'", - m_temporaryFileName.c_str()); - } #else // delete the temporary file if (remove(m_temporaryFileName.c_str()) < 0) @@ -326,7 +318,7 @@ public: fflush(m_pFile); -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) // move the atomic file name to the original file name if (!MoveFileExW(StringUtil::UTF8StringToWideString(m_temporaryFileName).c_str(), StringUtil::UTF8StringToWideString(m_originalFileName).c_str(), MOVEFILE_REPLACE_EXISTING)) @@ -339,17 +331,6 @@ public: { m_committed = true; } -#elif defined(_UWP) - if (!FileSystem::RenamePath(m_temporaryFileName.c_str(), m_originalFileName.c_str())) - { - Log_WarningPrintf("AtomicUpdatedFileByteStream::Commit(): Failed to rename temporary file '%s' to '%s'", - m_temporaryFileName.c_str(), m_originalFileName.c_str()); - m_discarded = true; - } - else - { - m_committed = true; - } #else // move the atomic file name to the original file name if (rename(m_temporaryFileName.c_str(), m_originalFileName.c_str()) < 0) @@ -1049,7 +1030,6 @@ std::unique_ptr ByteStream::OpenFile(const char* fileName, u32 openM { DebugAssert(openMode & (BYTESTREAM_OPEN_CREATE | BYTESTREAM_OPEN_WRITE)); #ifdef _WIN32 -#ifndef _UWP // generate the temporary file name u32 fileNameLength = static_cast(std::strlen(fileName)); char* temporaryFileName = (char*)alloca(fileNameLength + 8); @@ -1058,35 +1038,14 @@ std::unique_ptr ByteStream::OpenFile(const char* fileName, u32 openM // fill in random characters _mktemp_s(temporaryFileName, fileNameLength + 8); const std::wstring wideTemporaryFileName(StringUtil::UTF8StringToWideString(temporaryFileName)); -#else - // On UWP, preserve the extension, as it affects permissions. - std::string temporaryFileName; - const char* extension = std::strrchr(fileName, '.'); - if (extension) - temporaryFileName.append(fileName, extension - fileName); - else - temporaryFileName.append(fileName); - - temporaryFileName.append("_XXXXXX"); - _mktemp_s(temporaryFileName.data(), temporaryFileName.size() + 1); - if (extension) - temporaryFileName.append(extension); - - const std::wstring wideTemporaryFileName(StringUtil::UTF8StringToWideString(temporaryFileName)); -#endif // massive hack here DWORD desiredAccess = GENERIC_WRITE; if (openMode & BYTESTREAM_OPEN_READ) desiredAccess |= GENERIC_READ; -#ifndef _UWP HANDLE hFile = CreateFileW(wideTemporaryFileName.c_str(), desiredAccess, FILE_SHARE_DELETE, NULL, CREATE_NEW, 0, NULL); -#else - HANDLE hFile = - CreateFile2FromAppW(wideTemporaryFileName.c_str(), desiredAccess, FILE_SHARE_DELETE, CREATE_NEW, nullptr); -#endif if (hFile == INVALID_HANDLE_VALUE) return nullptr; diff --git a/src/common/common.props b/src/common/common.props index ae0da01ca..4296f37b3 100644 --- a/src/common/common.props +++ b/src/common/common.props @@ -2,15 +2,15 @@ - WITH_OPENGL=1;WITH_VULKAN=1;%(PreprocessorDefinitions) - $(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan\include;%(AdditionalIncludeDirectories) + WITH_OPENGL=1;WITH_VULKAN=1;%(PreprocessorDefinitions) + $(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan\include;%(AdditionalIncludeDirectories) $(SolutionDir)dep\fmt\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\glslang;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\minizip\include;$(SolutionDir)src;%(AdditionalIncludeDirectories) - $(RootBuildDir)glad\glad.lib;$(RootBuildDir)glslang\glslang.lib;%(AdditionalDependencies) + $(RootBuildDir)glad\glad.lib;$(RootBuildDir)glslang\glslang.lib;%(AdditionalDependencies) $(RootBuildDir)zstd\zstd.lib;$(RootBuildDir)fmt\fmt.lib;$(RootBuildDir)zlib\zlib.lib;$(RootBuildDir)minizip\minizip.lib;$(RootBuildDir)lzma\lzma.lib;d3dcompiler.lib;d3d11.lib;%(AdditionalDependencies) diff --git a/src/common/common.vcxproj b/src/common/common.vcxproj index 260391222..aa05b0426 100644 --- a/src/common/common.vcxproj +++ b/src/common/common.vcxproj @@ -27,35 +27,30 @@ - true + true - true + true - true + true - true + true - true + true - true + true - true + true - - true - - - true - + @@ -74,52 +69,48 @@ - - true - + - true + true - true + true - true + true - true + true - true + true - true + true - true + true - true + true - true + true - true + true - true + true - true - - - true + true + @@ -142,30 +133,25 @@ - true + true - true + true - true + true - true + true - true + true - true + true - - true - - - true - + @@ -176,47 +162,43 @@ - - true - + - true + true - true + true - true + true - true + true - true + true - true + true - true + true - true + true - true + true - true + true - true - - - true + true + @@ -224,7 +206,7 @@ - true + true @@ -239,4 +221,4 @@ - \ No newline at end of file + diff --git a/src/common/common.vcxproj.filters b/src/common/common.vcxproj.filters index c931d9b7a..15eefe891 100644 --- a/src/common/common.vcxproj.filters +++ b/src/common/common.vcxproj.filters @@ -117,7 +117,6 @@ d3d12 - @@ -245,7 +244,6 @@ - vulkan @@ -279,4 +277,4 @@ vulkan - \ No newline at end of file + diff --git a/src/common/crash_handler.cpp b/src/common/crash_handler.cpp index 33c74b022..35e3d27d4 100644 --- a/src/common/crash_handler.cpp +++ b/src/common/crash_handler.cpp @@ -4,7 +4,7 @@ #include #include -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) #include "windows_headers.h" #include "thirdparty/StackWalker.h" diff --git a/src/common/d3d12/shader_cache.cpp b/src/common/d3d12/shader_cache.cpp index 4ef40a3e5..3049fd8ce 100644 --- a/src/common/d3d12/shader_cache.cpp +++ b/src/common/d3d12/shader_cache.cpp @@ -6,10 +6,6 @@ #include Log_SetChannel(D3D12::ShaderCache); -#ifdef _UWP -#include -#endif - namespace D3D12 { #pragma pack(push, 1) @@ -24,19 +20,7 @@ struct CacheIndexEntry }; #pragma pack(pop) -static bool CanUsePipelineCache() -{ -#ifdef _UWP - // GetCachedBlob crashes on XBox UWP for some reason... - const auto version_info = winrt::Windows::System::Profile::AnalyticsInfo::VersionInfo(); - const auto device_family = version_info.DeviceFamily(); - return (device_family != L"Windows.Xbox"); -#else - return true; -#endif -} - -ShaderCache::ShaderCache() : m_use_pipeline_cache(CanUsePipelineCache()) {} +ShaderCache::ShaderCache() = default; ShaderCache::~ShaderCache() { @@ -80,17 +64,14 @@ void ShaderCache::Open(std::string_view base_path, D3D_FEATURE_LEVEL feature_lev CreateNew(shader_index_filename, shader_blob_filename, m_shader_index_file, m_shader_blob_file); } - if (m_use_pipeline_cache) - { - const std::string base_pipelines_filename = GetCacheBaseFileName(base_path, "pipelines", feature_level, debug); - const std::string pipelines_index_filename = base_pipelines_filename + ".idx"; - const std::string pipelines_blob_filename = base_pipelines_filename + ".bin"; + const std::string base_pipelines_filename = GetCacheBaseFileName(base_path, "pipelines", feature_level, debug); + const std::string pipelines_index_filename = base_pipelines_filename + ".idx"; + const std::string pipelines_blob_filename = base_pipelines_filename + ".bin"; - if (!ReadExisting(pipelines_index_filename, pipelines_blob_filename, m_pipeline_index_file, m_pipeline_blob_file, - m_pipeline_index)) - { - CreateNew(pipelines_index_filename, pipelines_blob_filename, m_pipeline_index_file, m_pipeline_blob_file); - } + if (!ReadExisting(pipelines_index_filename, pipelines_blob_filename, m_pipeline_index_file, m_pipeline_blob_file, + m_pipeline_index)) + { + CreateNew(pipelines_index_filename, pipelines_blob_filename, m_pipeline_index_file, m_pipeline_blob_file); } } } @@ -110,14 +91,10 @@ void ShaderCache::InvalidatePipelineCache() m_pipeline_index_file = nullptr; } - if (m_use_pipeline_cache) - { - const std::string base_pipelines_filename = - GetCacheBaseFileName(m_base_path, "pipelines", m_feature_level, m_debug); - const std::string pipelines_index_filename = base_pipelines_filename + ".idx"; - const std::string pipelines_blob_filename = base_pipelines_filename + ".bin"; - CreateNew(pipelines_index_filename, pipelines_blob_filename, m_pipeline_index_file, m_pipeline_blob_file); - } + const std::string base_pipelines_filename = GetCacheBaseFileName(m_base_path, "pipelines", m_feature_level, m_debug); + const std::string pipelines_index_filename = base_pipelines_filename + ".idx"; + const std::string pipelines_blob_filename = base_pipelines_filename + ".bin"; + CreateNew(pipelines_index_filename, pipelines_blob_filename, m_pipeline_index_file, m_pipeline_blob_file); } bool ShaderCache::CreateNew(const std::string& index_filename, const std::string& blob_filename, std::FILE*& index_file, diff --git a/src/common/d3d12/shader_cache.h b/src/common/d3d12/shader_cache.h index a6840305a..55ddd6f1b 100644 --- a/src/common/d3d12/shader_cache.h +++ b/src/common/d3d12/shader_cache.h @@ -111,7 +111,6 @@ private: CacheIndex m_pipeline_index; D3D_FEATURE_LEVEL m_feature_level = D3D_FEATURE_LEVEL_11_0; - bool m_use_pipeline_cache = false; bool m_debug = false; }; diff --git a/src/common/file_system.cpp b/src/common/file_system.cpp index 79d9c79fd..b22db26ee 100644 --- a/src/common/file_system.cpp +++ b/src/common/file_system.cpp @@ -23,19 +23,6 @@ #include #include #include - -#if defined(_UWP) -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif - #else #include #include @@ -514,7 +501,7 @@ std::vector FileSystem::GetRootDirectoryList() { std::vector results; -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) char buf[256]; const DWORD size = GetLogicalDriveStringsA(sizeof(buf), buf); if (size != 0 && size < (sizeof(buf) - 1)) @@ -527,28 +514,6 @@ std::vector FileSystem::GetRootDirectoryList() ptr += len + 1u; } } -#elif defined(_UWP) - if (const auto install_location = winrt::Windows::ApplicationModel::Package::Current().InstalledLocation(); - install_location) - { - if (const auto path = install_location.Path(); !path.empty()) - results.push_back(StringUtil::WideStringToUTF8String(path)); - } - - if (const auto local_location = winrt::Windows::Storage::ApplicationData::Current().LocalFolder(); local_location) - { - if (const auto path = local_location.Path(); !path.empty()) - results.push_back(StringUtil::WideStringToUTF8String(path)); - } - - const auto devices = winrt::Windows::Storage::KnownFolders::RemovableDevices(); - const auto folders_task(devices.GetFoldersAsync()); - for (const auto& storage_folder : folders_task.get()) - { - const auto path = storage_folder.Path(); - if (!path.empty()) - results.push_back(StringUtil::WideStringToUTF8String(path)); - } #else const char* home_path = std::getenv("HOME"); if (home_path) @@ -588,127 +553,6 @@ std::string Path::Combine(const std::string_view& base, const std::string_view& return ret; } -#ifdef _UWP -static std::FILE* OpenCFileUWP(const wchar_t* wfilename, const wchar_t* mode, FileSystem::FileShareMode share_mode) -{ - DWORD access = 0; - DWORD share = 0; - DWORD disposition = 0; - - switch (share_mode) - { - case FileSystem::FileShareMode::DenyNone: - share = FILE_SHARE_READ | FILE_SHARE_WRITE; - break; - case FileSystem::FileShareMode::DenyRead: - share = FILE_SHARE_WRITE; - break; - case FileSystem::FileShareMode::DenyWrite: - share = FILE_SHARE_READ; - break; - case FileSystem::FileShareMode::DenyReadWrite: - default: - share = 0; - break; - } - - int flags = 0; - const wchar_t* tmode = mode; - while (*tmode) - { - if (*tmode == L'r' && *(tmode + 1) == L'+') - { - access = GENERIC_READ | GENERIC_WRITE; - disposition = OPEN_EXISTING; - flags |= _O_RDWR; - tmode += 2; - } - else if (*tmode == L'w' && *(tmode + 1) == L'+') - { - access = GENERIC_READ | GENERIC_WRITE; - disposition = CREATE_ALWAYS; - flags |= _O_RDWR | _O_CREAT | _O_TRUNC; - tmode += 2; - } - else if (*tmode == L'a' && *(tmode + 1) == L'+') - { - access = GENERIC_READ | GENERIC_WRITE; - disposition = CREATE_ALWAYS; - flags |= _O_RDWR | _O_APPEND | _O_CREAT | _O_TRUNC; - tmode += 2; - } - else if (*tmode == L'r') - { - access = GENERIC_READ; - disposition = OPEN_EXISTING; - flags |= _O_RDONLY; - tmode++; - } - else if (*tmode == L'w') - { - access = GENERIC_WRITE; - disposition = CREATE_ALWAYS; - flags |= _O_WRONLY | _O_CREAT | _O_TRUNC; - tmode++; - } - else if (*tmode == L'a') - { - access = GENERIC_READ | GENERIC_WRITE; - disposition = CREATE_ALWAYS; - flags |= _O_WRONLY | _O_APPEND | _O_CREAT | _O_TRUNC; - tmode++; - } - else if (*tmode == L'b') - { - flags |= _O_BINARY; - tmode++; - } - else if (*tmode == L'S') - { - flags |= _O_SEQUENTIAL; - tmode++; - } - else if (*tmode == L'R') - { - flags |= _O_RANDOM; - tmode++; - } - else - { - Log_ErrorPrintf("Unknown mode flags: '%s'", StringUtil::WideStringToUTF8String(mode).c_str()); - return nullptr; - } - } - - HANDLE hFile = CreateFileFromAppW(wfilename, access, share, nullptr, disposition, 0, nullptr); - if (hFile == INVALID_HANDLE_VALUE) - return nullptr; - - if (flags & _O_APPEND && !SetFilePointerEx(hFile, LARGE_INTEGER{}, nullptr, FILE_END)) - { - Log_ErrorPrintf("SetFilePointerEx() failed: %08X", GetLastError()); - CloseHandle(hFile); - return nullptr; - } - - int fd = _open_osfhandle(reinterpret_cast(hFile), flags); - if (fd < 0) - { - CloseHandle(hFile); - return nullptr; - } - - std::FILE* fp = _wfdopen(fd, mode); - if (!fp) - { - _close(fd); - return nullptr; - } - - return fp; -} -#endif // _UWP - std::FILE* FileSystem::OpenCFile(const char* filename, const char* mode) { #ifdef _WIN32 @@ -718,13 +562,7 @@ std::FILE* FileSystem::OpenCFile(const char* filename, const char* mode) { std::FILE* fp; if (_wfopen_s(&fp, wfilename.c_str(), wmode.c_str()) != 0) - { -#ifdef _UWP - return OpenCFileUWP(wfilename.c_str(), wmode.c_str(), FileShareMode::DenyReadWrite); -#else return nullptr; -#endif - } return fp; } @@ -744,10 +582,7 @@ int FileSystem::OpenFDFile(const char* filename, int flags, int mode) #ifdef _WIN32 const std::wstring wfilename(StringUtil::UTF8StringToWideString(filename)); if (!wfilename.empty()) - { - // TODO: UWP return _wopen(wfilename.c_str(), flags, mode); - } return -1; #else @@ -792,11 +627,7 @@ std::FILE* FileSystem::OpenSharedCFile(const char* filename, const char* mode, F if (fp) return fp; -#ifdef _UWP - return OpenCFileUWP(wfilename.c_str(), wmode.c_str(), share_mode); -#else return nullptr; -#endif #else return std::fopen(filename, mode); #endif @@ -1023,19 +854,6 @@ static u32 TranslateWin32Attributes(u32 Win32Attributes) return r; } -static DWORD WrapGetFileAttributes(const wchar_t* path) -{ -#ifndef _UWP - return GetFileAttributesW(path); -#else - WIN32_FILE_ATTRIBUTE_DATA fad; - if (!GetFileAttributesExFromAppW(path, GetFileExInfoStandard, &fad)) - return INVALID_FILE_ATTRIBUTES; - - return fad.dwFileAttributes; -#endif -} - static u32 RecursiveFindFiles(const char* origin_path, const char* parent_path, const char* path, const char* pattern, u32 flags, FileSystem::FindResultsArray* results) { @@ -1057,12 +875,7 @@ static u32 RecursiveFindFiles(const char* origin_path, const char* parent_path, std::string utf8_filename; utf8_filename.reserve((sizeof(wfd.cFileName) / sizeof(wfd.cFileName[0])) * 2); -#ifndef _UWP HANDLE hFind = FindFirstFileW(StringUtil::UTF8StringToWideString(tempStr).c_str(), &wfd); -#else - HANDLE hFind = FindFirstFileExFromAppW(StringUtil::UTF8StringToWideString(tempStr).c_str(), FindExInfoBasic, &wfd, - FindExSearchNameMatch, nullptr, 0); -#endif if (hFind == INVALID_HANDLE_VALUE) return 0; @@ -1244,7 +1057,6 @@ bool FileSystem::StatFile(const char* path, FILESYSTEM_STAT_DATA* sd) if (wpath.empty()) return false; -#ifndef _UWP // determine attributes for the path. if it's a directory, things have to be handled differently.. DWORD fileAttributes = GetFileAttributesW(wpath.c_str()); if (fileAttributes == INVALID_FILE_ATTRIBUTES) @@ -1284,17 +1096,6 @@ bool FileSystem::StatFile(const char* path, FILESYSTEM_STAT_DATA* sd) sd->ModificationTime = ConvertFileTimeToUnixTime(bhfi.ftLastWriteTime); sd->Size = static_cast(((u64)bhfi.nFileSizeHigh) << 32 | (u64)bhfi.nFileSizeLow); return true; -#else - WIN32_FILE_ATTRIBUTE_DATA fad; - if (!GetFileAttributesExFromAppW(wpath.c_str(), GetFileExInfoStandard, &fad)) - return false; - - sd->Attributes = TranslateWin32Attributes(fad.dwFileAttributes); - sd->CreationTime = ConvertFileTimeToUnixTime(fad.ftCreationTime); - sd->ModificationTime = ConvertFileTimeToUnixTime(fad.ftLastWriteTime); - sd->Size = static_cast(((u64)fad.nFileSizeHigh) << 32 | (u64)fad.nFileSizeLow); - return true; -#endif } bool FileSystem::StatFile(std::FILE* fp, FILESYSTEM_STAT_DATA* sd) @@ -1335,7 +1136,7 @@ bool FileSystem::FileExists(const char* path) return false; // determine attributes for the path. if it's a directory, things have to be handled differently.. - DWORD fileAttributes = WrapGetFileAttributes(wpath.c_str()); + DWORD fileAttributes = GetFileAttributesW(wpath.c_str()); if (fileAttributes == INVALID_FILE_ATTRIBUTES) return false; @@ -1357,7 +1158,7 @@ bool FileSystem::DirectoryExists(const char* path) return false; // determine attributes for the path. if it's a directory, things have to be handled differently.. - DWORD fileAttributes = WrapGetFileAttributes(wpath.c_str()); + DWORD fileAttributes = GetFileAttributesW(wpath.c_str()); if (fileAttributes == INVALID_FILE_ATTRIBUTES) return false; @@ -1373,11 +1174,7 @@ bool FileSystem::DirectoryIsEmpty(const char* path) wpath += L"\\*"; WIN32_FIND_DATAW wfd; -#ifndef _UWP HANDLE hFind = FindFirstFileW(wpath.c_str(), &wfd); -#else - HANDLE hFind = FindFirstFileExFromAppW(wpath.c_str(), FindExInfoBasic, &wfd, FindExSearchNameMatch, nullptr, 0); -#endif if (hFind == INVALID_HANDLE_VALUE) return true; @@ -1406,14 +1203,9 @@ bool FileSystem::CreateDirectory(const char* Path, bool Recursive) if (wpath.empty()) return false; - // try just flat-out, might work if there's no other segments that have to be made -#ifndef _UWP + // try just flat-out, might work if there's no other segments that have to be made if (CreateDirectoryW(wpath.c_str(), nullptr)) return true; -#else - if (CreateDirectoryFromAppW(wpath.c_str(), nullptr)) - return true; -#endif if (!Recursive) return false; @@ -1423,7 +1215,7 @@ bool FileSystem::CreateDirectory(const char* Path, bool Recursive) if (lastError == ERROR_ALREADY_EXISTS) { // check the attributes - u32 Attributes = WrapGetFileAttributes(wpath.c_str()); + u32 Attributes = GetFileAttributesW(wpath.c_str()); if (Attributes != INVALID_FILE_ATTRIBUTES && Attributes & FILE_ATTRIBUTE_DIRECTORY) return true; else @@ -1442,11 +1234,7 @@ bool FileSystem::CreateDirectory(const char* Path, bool Recursive) { if (wpath[i] == L'\\' || wpath[i] == L'/') { -#ifndef _UWP const BOOL result = CreateDirectoryW(tempPath.c_str(), nullptr); -#else - const BOOL result = CreateDirectoryFromAppW(tempPath.c_str(), nullptr); -#endif if (!result) { lastError = GetLastError(); @@ -1466,11 +1254,7 @@ bool FileSystem::CreateDirectory(const char* Path, bool Recursive) // re-create the end if it's not a separator, check / as well because windows can interpret them if (wpath[pathLength - 1] != L'\\' && wpath[pathLength - 1] != L'/') { -#ifndef _UWP const BOOL result = CreateDirectoryW(wpath.c_str(), nullptr); -#else - const BOOL result = CreateDirectoryFromAppW(wpath.c_str(), nullptr); -#endif if (!result) { lastError = GetLastError(); @@ -1495,15 +1279,11 @@ bool FileSystem::DeleteFile(const char* path) return false; const std::wstring wpath(StringUtil::UTF8StringToWideString(path)); - const DWORD fileAttributes = WrapGetFileAttributes(wpath.c_str()); + const DWORD fileAttributes = GetFileAttributesW(wpath.c_str()); if (fileAttributes == INVALID_FILE_ATTRIBUTES || fileAttributes & FILE_ATTRIBUTE_DIRECTORY) return false; -#ifndef _UWP return (DeleteFileW(wpath.c_str()) == TRUE); -#else - return (DeleteFileFromAppW(wpath.c_str()) == TRUE); -#endif } bool FileSystem::RenamePath(const char* old_path, const char* new_path) @@ -1511,29 +1291,11 @@ bool FileSystem::RenamePath(const char* old_path, const char* new_path) const std::wstring old_wpath(StringUtil::UTF8StringToWideString(old_path)); const std::wstring new_wpath(StringUtil::UTF8StringToWideString(new_path)); -#ifndef _UWP if (!MoveFileExW(old_wpath.c_str(), new_wpath.c_str(), MOVEFILE_REPLACE_EXISTING)) { Log_ErrorPrintf("MoveFileEx('%s', '%s') failed: %08X", old_path, new_path, GetLastError()); return false; } -#else - // try moving if it doesn't exist, since ReplaceFile fails on non-existing destinations - if (WrapGetFileAttributes(new_wpath.c_str()) != INVALID_FILE_ATTRIBUTES) - { - if (!DeleteFileFromAppW(new_wpath.c_str())) - { - Log_ErrorPrintf("DeleteFileFromAppW('%s') failed: %08X", new_wpath.c_str(), GetLastError()); - return false; - } - } - - if (!MoveFileFromAppW(old_wpath.c_str(), new_wpath.c_str())) - { - Log_ErrorPrintf("MoveFileFromAppW('%s', '%s') failed: %08X", old_path, new_path, GetLastError()); - return false; - } -#endif return true; } @@ -1551,10 +1313,8 @@ std::string FileSystem::GetProgramPath() // Fall back to the main module if this fails. HMODULE module = nullptr; -#ifndef _UWP GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, reinterpret_cast(&GetProgramPath), &module); -#endif for (;;) { @@ -1610,13 +1370,8 @@ bool FileSystem::SetPathCompression(const char* path, bool enable) const bool isFile = !(attrs & FILE_ATTRIBUTE_DIRECTORY); const DWORD flags = isFile ? FILE_ATTRIBUTE_NORMAL : (FILE_FLAG_BACKUP_SEMANTICS | FILE_ATTRIBUTE_DIRECTORY); -#ifndef _UWP const HANDLE handle = CreateFileW(wpath.c_str(), FILE_GENERIC_WRITE | FILE_GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, nullptr, OPEN_EXISTING, flags, nullptr); -#else - const HANDLE handle = CreateFileFromAppW(wpath.c_str(), FILE_GENERIC_WRITE | FILE_GENERIC_READ, - FILE_SHARE_READ | FILE_SHARE_DELETE, nullptr, OPEN_EXISTING, flags, nullptr); -#endif if (handle == INVALID_HANDLE_VALUE) return false; diff --git a/src/common/http_downloader_uwp.cpp b/src/common/http_downloader_uwp.cpp deleted file mode 100644 index e3159923a..000000000 --- a/src/common/http_downloader_uwp.cpp +++ /dev/null @@ -1,165 +0,0 @@ -#include "http_downloader_uwp.h" -#include "assert.h" -#include "log.h" -#include "string_util.h" -#include "timer.h" -#include -Log_SetChannel(HTTPDownloaderWinHttp); - -#include -#include -#include - -using namespace winrt::Windows::Foundation; -using namespace winrt::Windows::Web::Http; - -namespace Common { - -HTTPDownloaderUWP::HTTPDownloaderUWP(std::string user_agent) : HTTPDownloader(), m_user_agent(std::move(user_agent)) {} - -HTTPDownloaderUWP::~HTTPDownloaderUWP() = default; - -std::unique_ptr HTTPDownloader::Create(const char* user_agent) -{ - std::string user_agent_str; - if (user_agent) - user_agent_str = user_agent; - - return std::make_unique(user_agent ? std::string(user_agent) : std::string()); -} - -HTTPDownloader::Request* HTTPDownloaderUWP::InternalCreateRequest() -{ - Request* req = new Request(); - return req; -} - -void HTTPDownloaderUWP::InternalPollRequests() -{ - // noop - uses async -} - -bool HTTPDownloaderUWP::StartRequest(HTTPDownloader::Request* request) -{ - Request* req = static_cast(request); - - try - { - const std::wstring url_wide(StringUtil::UTF8StringToWideString(req->url)); - const Uri uri(url_wide); - - if (!m_user_agent.empty() && - !req->client.DefaultRequestHeaders().UserAgent().TryParseAdd(StringUtil::UTF8StringToWideString(m_user_agent))) - { - Log_WarningPrintf("Failed to set user agent to '%s'", m_user_agent.c_str()); - } - - if (req->type == Request::Type::Post) - { - const HttpStringContent post_content(StringUtil::UTF8StringToWideString(req->post_data), - winrt::Windows::Storage::Streams::UnicodeEncoding::Utf8, - L"application/x-www-form-urlencoded"); - req->request_async = req->client.PostAsync(uri, post_content); - } - else - { - req->request_async = req->client.GetAsync(uri); - } - - req->request_async.Completed( - [req](const IAsyncOperationWithProgress& operation, AsyncStatus status) { - if (status == AsyncStatus::Completed) - { - Log_DevPrintf("Request for '%s' completed start portion", req->url.c_str()); - try - { - req->state.store(Request::State::Receiving); - req->start_time = Common::Timer::GetCurrentValue(); - - const HttpResponseMessage response(req->request_async.get()); - req->status_code = static_cast(response.StatusCode()); - - const IHttpContent content(response.Content()); - req->receive_async = content.ReadAsBufferAsync(); - req->receive_async.Completed( - [req]( - const IAsyncOperationWithProgress& inner_operation, - AsyncStatus inner_status) { - if (inner_status == AsyncStatus::Completed) - { - const winrt::Windows::Storage::Streams::IBuffer buffer(inner_operation.get()); - if (buffer && buffer.Length() > 0) - { - req->data.resize(buffer.Length()); - std::memcpy(req->data.data(), buffer.data(), req->data.size()); - } - - Log_DevPrintf("End of request '%s', %zu bytes received", req->url.c_str(), req->data.size()); - req->state.store(Request::State::Complete); - } - else if (inner_status == AsyncStatus::Canceled) - { - // don't do anything, the request has been freed - } - else - { - Log_ErrorPrintf("Request for '%s' failed during recieve phase: %08X", req->url.c_str(), - inner_operation.ErrorCode().value); - req->status_code = -1; - req->state.store(Request::State::Complete); - } - }); - } - catch (const winrt::hresult_error& err) - { - Log_ErrorPrintf("Failed to receive HTTP request for '%s': %08X %s", req->url.c_str(), err.code(), - StringUtil::WideStringToUTF8String(err.message()).c_str()); - req->status_code = -1; - req->state.store(Request::State::Complete); - } - - req->receive_async = nullptr; - } - else if (status == AsyncStatus::Canceled) - { - // don't do anything, the request has been freed - } - else - { - Log_ErrorPrintf("Request for '%s' failed during start phase: %08X", req->url.c_str(), - operation.ErrorCode().value); - req->status_code = -1; - req->state.store(Request::State::Complete); - } - - req->request_async = nullptr; - }); - } - catch (const winrt::hresult_error& err) - { - Log_ErrorPrintf("Failed to start HTTP request for '%s': %08X %s", req->url.c_str(), err.code(), - StringUtil::WideStringToUTF8String(err.message()).c_str()); - req->callback(-1, req->data); - delete req; - return false; - } - - Log_DevPrintf("Started HTTP request for '%s'", req->url.c_str()); - req->state = Request::State::Started; - req->start_time = Common::Timer::GetCurrentValue(); - return true; -} - -void HTTPDownloaderUWP::CloseRequest(HTTPDownloader::Request* request) -{ - Request* req = static_cast(request); - if (req->request_async) - req->request_async.Cancel(); - if (req->receive_async) - req->receive_async.Cancel(); - - req->client.Close(); - delete req; -} - -} // namespace FrontendCommon \ No newline at end of file diff --git a/src/common/http_downloader_uwp.h b/src/common/http_downloader_uwp.h deleted file mode 100644 index 3a0be4299..000000000 --- a/src/common/http_downloader_uwp.h +++ /dev/null @@ -1,38 +0,0 @@ -#pragma once -#pragma once -#include "http_downloader.h" - -#include "common/windows_headers.h" - -#include - -namespace Common { - -class HTTPDownloaderUWP final : public HTTPDownloader -{ -public: - HTTPDownloaderUWP(std::string user_agent); - ~HTTPDownloaderUWP() override; - -protected: - Request* InternalCreateRequest() override; - void InternalPollRequests() override; - bool StartRequest(HTTPDownloader::Request* request) override; - void CloseRequest(HTTPDownloader::Request* request) override; - -private: - struct Request : HTTPDownloader::Request - { - std::wstring object_name; - winrt::Windows::Web::Http::HttpClient client; - winrt::Windows::Foundation::IAsyncOperationWithProgress - request_async{nullptr}; - winrt::Windows::Foundation::IAsyncOperationWithProgress - receive_async{}; - }; - - std::string m_user_agent; -}; - -} // namespace FrontendCommon \ No newline at end of file diff --git a/src/common/threading.cpp b/src/common/threading.cpp index b4a8bc6ec..ab6ae79eb 100644 --- a/src/common/threading.cpp +++ b/src/common/threading.cpp @@ -212,7 +212,7 @@ Threading::ThreadHandle& Threading::ThreadHandle::operator=(const ThreadHandle& u64 Threading::ThreadHandle::GetCPUTime() const { -#if defined(_WIN32) && !defined(_UWP) && !defined(_M_ARM64) +#if defined(_WIN32) && !defined(_M_ARM64) u64 ret = 0; if (m_native_handle) QueryThreadCycleTime((HANDLE)m_native_handle, &ret); @@ -459,7 +459,7 @@ Threading::ThreadHandle& Threading::Thread::operator=(Thread&& thread) u64 Threading::GetThreadCpuTime() { -#if defined(_WIN32) && !defined(_UWP) && !defined(_M_ARM64) +#if defined(_WIN32) && !defined(_M_ARM64) u64 ret = 0; QueryThreadCycleTime(GetCurrentThread(), &ret); return ret; @@ -477,7 +477,7 @@ u64 Threading::GetThreadCpuTime() u64 Threading::GetThreadTicksPerSecond() { -#if defined(_WIN32) && !defined(_UWP) && !defined(_M_ARM64) +#if defined(_WIN32) && !defined(_M_ARM64) // On x86, despite what the MS documentation says, this basically appears to be rdtsc. // So, the frequency is our base clock speed (and stable regardless of power management). static u64 frequency = 0; diff --git a/src/common/timer.cpp b/src/common/timer.cpp index 113a0a2fa..41ffbde81 100644 --- a/src/common/timer.cpp +++ b/src/common/timer.cpp @@ -113,7 +113,6 @@ void Timer::SleepUntil(Value value, bool exact) if (diff <= 0) return; -#ifndef _UWP HANDLE timer = GetSleepTimer(); if (timer) { @@ -131,7 +130,6 @@ void Timer::SleepUntil(Value value, bool exact) return; } } -#endif // falling back to sleep... bad. Sleep(static_cast(static_cast(diff) / 1000000)); diff --git a/src/common/window_info.cpp b/src/common/window_info.cpp index 5327a8c88..5176dad62 100644 --- a/src/common/window_info.cpp +++ b/src/common/window_info.cpp @@ -2,7 +2,7 @@ #include "common/log.h" Log_SetChannel(WindowInfo); -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) #include "common/windows_headers.h" #include diff --git a/src/common/window_info.h b/src/common/window_info.h index fe27f0815..342d316c4 100644 --- a/src/common/window_info.h +++ b/src/common/window_info.h @@ -8,7 +8,6 @@ struct WindowInfo { Surfaceless, Win32, - WinRT, X11, Wayland, MacOS, diff --git a/src/common/windows_headers.h b/src/common/windows_headers.h index 0e242a789..6ff6ed307 100644 --- a/src/common/windows_headers.h +++ b/src/common/windows_headers.h @@ -7,23 +7,14 @@ #define NOMINMAX 1 #endif -// require vista+, but don't set it when compiling for UWP -#ifndef WINAPI_FAMILY +// require vista+ #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif #define _WIN32_WINNT _WIN32_WINNT_VISTA -#endif #include -// hurr i'm windows, i like to conflict, fixme properly later please... -#if defined(FindTexture) -#undef FindTexture -#endif -#if defined(DrawText) -#undef DrawText -#endif #if defined(CreateDirectory) #undef CreateDirectory #endif @@ -33,12 +24,3 @@ #if defined(DeleteFile) #undef DeleteFile #endif -#if defined(Yield) -#undef Yield -#endif -#if defined(LoadIcon) -#undef LoadIcon -#endif -#if defined(GetObject) -#undef GetObject -#endif \ No newline at end of file diff --git a/src/core/core.props b/src/core/core.props index 0e59e3b41..7f3b8c7d7 100644 --- a/src/core/core.props +++ b/src/core/core.props @@ -4,14 +4,13 @@ - WITH_CHEEVOS=1;%(PreprocessorDefinitions) - WITH_CUBEB=1;%(PreprocessorDefinitions) - WITH_RAINTEGRATION=1;%(PreprocessorDefinitions) + WITH_CHEEVOS=1;WITH_CUBEB=1;%(PreprocessorDefinitions) + WITH_RAINTEGRATION=1;%(PreprocessorDefinitions) WITH_RECOMPILER=1;%(PreprocessorDefinitions) - WITH_MMAP_FASTMEM=1;%(PreprocessorDefinitions) + WITH_MMAP_FASTMEM=1;%(PreprocessorDefinitions) $(SolutionDir)dep\tinyxml2\include;$(SolutionDir)dep\glad\include;$(SolutionDir)dep\stb\include;$(SolutionDir)dep\imgui\include;$(SolutionDir)dep\xxhash\include;$(SolutionDir)dep\zlib\include;$(SolutionDir)dep\rcheevos\include;$(SolutionDir)dep\rapidjson\include;$(SolutionDir)src;%(AdditionalIncludeDirectories) - $(SolutionDir)dep\rainterface;%(AdditionalIncludeDirectories) + $(SolutionDir)dep\rainterface;%(AdditionalIncludeDirectories) $(SolutionDir)dep\xbyak\xbyak;%(AdditionalIncludeDirectories) $(SolutionDir)dep\vixl\include;%(AdditionalIncludeDirectories) @@ -21,7 +20,7 @@ $(RootBuildDir)tinyxml2\tinyxml2.lib;$(RootBuildDir)rcheevos\rcheevos.lib;$(RootBuildDir)imgui\imgui.lib;$(RootBuildDir)stb\stb.lib;$(RootBuildDir)xxhash\xxhash.lib;$(RootBuildDir)zlib\zlib.lib;$(RootBuildDir)util\util.lib;$(RootBuildDir)common\common.lib;%(AdditionalDependencies) - $(RootBuildDir)rainterface\rainterface.lib;%(AdditionalDependencies) + $(RootBuildDir)rainterface\rainterface.lib;%(AdditionalDependencies) $(RootBuildDir)vixl\vixl.lib;%(AdditionalDependencies) diff --git a/src/core/core.vcxproj b/src/core/core.vcxproj index e7165b3a3..f9c735d1c 100644 --- a/src/core/core.vcxproj +++ b/src/core/core.vcxproj @@ -39,7 +39,7 @@ - true + true @@ -49,7 +49,7 @@ - true + true @@ -109,7 +109,7 @@ - true + true @@ -121,7 +121,7 @@ - true + true @@ -165,4 +165,4 @@ - \ No newline at end of file + diff --git a/src/core/cpu_code_cache.cpp b/src/core/cpu_code_cache.cpp index d5c186d2c..0af97a0c5 100644 --- a/src/core/cpu_code_cache.cpp +++ b/src/core/cpu_code_cache.cpp @@ -26,7 +26,7 @@ static constexpr u32 INVALIDATE_THRESHOLD_TO_DISABLE_LINKING = 10; #ifdef WITH_RECOMPILER // Currently remapping the code buffer doesn't work in macOS or Haiku. -#if !defined(__HAIKU__) && !defined(__APPLE__) && !defined(_UWP) +#if !defined(__HAIKU__) && !defined(__APPLE__) #define USE_STATIC_CODE_BUFFER 1 #endif @@ -1069,8 +1069,6 @@ bool InitializeFastmem() Assert(mode != CPUFastmemMode::MMap); #endif - s_code_buffer.ReserveCode(Common::PageFaultHandler::GetHandlerCodeSize()); - if (!Common::PageFaultHandler::InstallHandler(&s_host_code_map, s_code_buffer.GetCodePointer(), s_code_buffer.GetTotalSize(), handler)) { diff --git a/src/core/system.cpp b/src/core/system.cpp index 5dd175e2a..997e25af4 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -55,10 +55,8 @@ Log_SetChannel(System); #ifdef _WIN32 #include "common/windows_headers.h" -#ifndef _UWP #include #endif -#endif // #define PROFILE_MEMORY_SAVE_STATES 1 @@ -4256,7 +4254,7 @@ void System::HostDisplayResized() void System::SetTimerResolutionIncreased(bool enabled) { -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) static bool current_state = false; if (current_state == enabled) return; diff --git a/src/duckstation-uwp/.gitignore b/src/duckstation-uwp/.gitignore deleted file mode 100644 index 2297123c5..000000000 --- a/src/duckstation-uwp/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -database/ -inputprofiles/ -resources/ -shaders/ -BundleArtifacts/ -duckstation-uwp.pfx \ No newline at end of file diff --git a/src/duckstation-uwp/Assets/LargeTile.scale-100.png b/src/duckstation-uwp/Assets/LargeTile.scale-100.png deleted file mode 100644 index 4b0ef4b94..000000000 Binary files a/src/duckstation-uwp/Assets/LargeTile.scale-100.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/LargeTile.scale-125.png b/src/duckstation-uwp/Assets/LargeTile.scale-125.png deleted file mode 100644 index 45cf55b1e..000000000 Binary files a/src/duckstation-uwp/Assets/LargeTile.scale-125.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/LargeTile.scale-150.png b/src/duckstation-uwp/Assets/LargeTile.scale-150.png deleted file mode 100644 index 014868e37..000000000 Binary files a/src/duckstation-uwp/Assets/LargeTile.scale-150.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/LargeTile.scale-200.png b/src/duckstation-uwp/Assets/LargeTile.scale-200.png deleted file mode 100644 index 2d481044d..000000000 Binary files a/src/duckstation-uwp/Assets/LargeTile.scale-200.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/LargeTile.scale-400.png b/src/duckstation-uwp/Assets/LargeTile.scale-400.png deleted file mode 100644 index 1e095e886..000000000 Binary files a/src/duckstation-uwp/Assets/LargeTile.scale-400.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/LockScreenLogo.scale-200.png b/src/duckstation-uwp/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 735f57adb..000000000 Binary files a/src/duckstation-uwp/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/SmallTile.scale-100.png b/src/duckstation-uwp/Assets/SmallTile.scale-100.png deleted file mode 100644 index 22154a005..000000000 Binary files a/src/duckstation-uwp/Assets/SmallTile.scale-100.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/SmallTile.scale-125.png b/src/duckstation-uwp/Assets/SmallTile.scale-125.png deleted file mode 100644 index a9692405e..000000000 Binary files a/src/duckstation-uwp/Assets/SmallTile.scale-125.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/SmallTile.scale-150.png b/src/duckstation-uwp/Assets/SmallTile.scale-150.png deleted file mode 100644 index eb5b166e5..000000000 Binary files a/src/duckstation-uwp/Assets/SmallTile.scale-150.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/SmallTile.scale-200.png b/src/duckstation-uwp/Assets/SmallTile.scale-200.png deleted file mode 100644 index 2712512e8..000000000 Binary files a/src/duckstation-uwp/Assets/SmallTile.scale-200.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/SmallTile.scale-400.png b/src/duckstation-uwp/Assets/SmallTile.scale-400.png deleted file mode 100644 index 3570a150c..000000000 Binary files a/src/duckstation-uwp/Assets/SmallTile.scale-400.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/SplashScreen.scale-100.png b/src/duckstation-uwp/Assets/SplashScreen.scale-100.png deleted file mode 100644 index 6231d0d2d..000000000 Binary files a/src/duckstation-uwp/Assets/SplashScreen.scale-100.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/SplashScreen.scale-125.png b/src/duckstation-uwp/Assets/SplashScreen.scale-125.png deleted file mode 100644 index d75cd027f..000000000 Binary files a/src/duckstation-uwp/Assets/SplashScreen.scale-125.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/SplashScreen.scale-150.png b/src/duckstation-uwp/Assets/SplashScreen.scale-150.png deleted file mode 100644 index 76cb3e102..000000000 Binary files a/src/duckstation-uwp/Assets/SplashScreen.scale-150.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/SplashScreen.scale-200.png b/src/duckstation-uwp/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 1008aca35..000000000 Binary files a/src/duckstation-uwp/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/SplashScreen.scale-400.png b/src/duckstation-uwp/Assets/SplashScreen.scale-400.png deleted file mode 100644 index 645c6bb6a..000000000 Binary files a/src/duckstation-uwp/Assets/SplashScreen.scale-400.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square150x150Logo.scale-100.png b/src/duckstation-uwp/Assets/Square150x150Logo.scale-100.png deleted file mode 100644 index 6d132a875..000000000 Binary files a/src/duckstation-uwp/Assets/Square150x150Logo.scale-100.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square150x150Logo.scale-125.png b/src/duckstation-uwp/Assets/Square150x150Logo.scale-125.png deleted file mode 100644 index f05e4604c..000000000 Binary files a/src/duckstation-uwp/Assets/Square150x150Logo.scale-125.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square150x150Logo.scale-150.png b/src/duckstation-uwp/Assets/Square150x150Logo.scale-150.png deleted file mode 100644 index cd2cac9a0..000000000 Binary files a/src/duckstation-uwp/Assets/Square150x150Logo.scale-150.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square150x150Logo.scale-200.png b/src/duckstation-uwp/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index 863e4ef91..000000000 Binary files a/src/duckstation-uwp/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square150x150Logo.scale-400.png b/src/duckstation-uwp/Assets/Square150x150Logo.scale-400.png deleted file mode 100644 index 045913a3c..000000000 Binary files a/src/duckstation-uwp/Assets/Square150x150Logo.scale-400.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png deleted file mode 100644 index db57efd60..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png deleted file mode 100644 index 5cf25729b..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png deleted file mode 100644 index 4d1f4620f..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png deleted file mode 100644 index 137ac4497..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png deleted file mode 100644 index 6374d0219..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-16.png deleted file mode 100644 index db57efd60..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-16.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-256.png deleted file mode 100644 index 4d1f4620f..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-256.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-32.png deleted file mode 100644 index 137ac4497..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-32.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-48.png deleted file mode 100644 index 6374d0219..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.altform-unplated_targetsize-48.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.scale-100.png b/src/duckstation-uwp/Assets/Square44x44Logo.scale-100.png deleted file mode 100644 index 44b92a911..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.scale-100.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.scale-125.png b/src/duckstation-uwp/Assets/Square44x44Logo.scale-125.png deleted file mode 100644 index 3890bbfd5..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.scale-125.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.scale-150.png b/src/duckstation-uwp/Assets/Square44x44Logo.scale-150.png deleted file mode 100644 index 9a99b0af1..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.scale-150.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.scale-200.png b/src/duckstation-uwp/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index 95ae49964..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.scale-400.png b/src/duckstation-uwp/Assets/Square44x44Logo.scale-400.png deleted file mode 100644 index b84abd2fe..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.scale-400.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-16.png b/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-16.png deleted file mode 100644 index 78927eb6d..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-16.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-24.png b/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-24.png deleted file mode 100644 index 82ed7fa0c..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-24.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index 26eb22fb4..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-256.png b/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-256.png deleted file mode 100644 index db333e184..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-256.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-32.png b/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-32.png deleted file mode 100644 index 89a192373..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-32.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-48.png b/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-48.png deleted file mode 100644 index 75d0a3ab5..000000000 Binary files a/src/duckstation-uwp/Assets/Square44x44Logo.targetsize-48.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/StoreLogo.backup.png b/src/duckstation-uwp/Assets/StoreLogo.backup.png deleted file mode 100644 index 7385b56c0..000000000 Binary files a/src/duckstation-uwp/Assets/StoreLogo.backup.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/StoreLogo.scale-100.png b/src/duckstation-uwp/Assets/StoreLogo.scale-100.png deleted file mode 100644 index e2a5aba4c..000000000 Binary files a/src/duckstation-uwp/Assets/StoreLogo.scale-100.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/StoreLogo.scale-125.png b/src/duckstation-uwp/Assets/StoreLogo.scale-125.png deleted file mode 100644 index d8120d319..000000000 Binary files a/src/duckstation-uwp/Assets/StoreLogo.scale-125.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/StoreLogo.scale-150.png b/src/duckstation-uwp/Assets/StoreLogo.scale-150.png deleted file mode 100644 index 252be5560..000000000 Binary files a/src/duckstation-uwp/Assets/StoreLogo.scale-150.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/StoreLogo.scale-200.png b/src/duckstation-uwp/Assets/StoreLogo.scale-200.png deleted file mode 100644 index 30ad00de0..000000000 Binary files a/src/duckstation-uwp/Assets/StoreLogo.scale-200.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/StoreLogo.scale-400.png b/src/duckstation-uwp/Assets/StoreLogo.scale-400.png deleted file mode 100644 index 2f9adfad7..000000000 Binary files a/src/duckstation-uwp/Assets/StoreLogo.scale-400.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/Wide310x150Logo.scale-200.png b/src/duckstation-uwp/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 288995b39..000000000 Binary files a/src/duckstation-uwp/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/WideTile.scale-100.png b/src/duckstation-uwp/Assets/WideTile.scale-100.png deleted file mode 100644 index 11fbe3620..000000000 Binary files a/src/duckstation-uwp/Assets/WideTile.scale-100.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/WideTile.scale-125.png b/src/duckstation-uwp/Assets/WideTile.scale-125.png deleted file mode 100644 index 53fb67842..000000000 Binary files a/src/duckstation-uwp/Assets/WideTile.scale-125.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/WideTile.scale-150.png b/src/duckstation-uwp/Assets/WideTile.scale-150.png deleted file mode 100644 index d87729e47..000000000 Binary files a/src/duckstation-uwp/Assets/WideTile.scale-150.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/WideTile.scale-200.png b/src/duckstation-uwp/Assets/WideTile.scale-200.png deleted file mode 100644 index 6231d0d2d..000000000 Binary files a/src/duckstation-uwp/Assets/WideTile.scale-200.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/WideTile.scale-400.png b/src/duckstation-uwp/Assets/WideTile.scale-400.png deleted file mode 100644 index 1008aca35..000000000 Binary files a/src/duckstation-uwp/Assets/WideTile.scale-400.png and /dev/null differ diff --git a/src/duckstation-uwp/Assets/duck_128.png b/src/duckstation-uwp/Assets/duck_128.png deleted file mode 100644 index bc6655bbd..000000000 Binary files a/src/duckstation-uwp/Assets/duck_128.png and /dev/null differ diff --git a/src/duckstation-uwp/Package.appxmanifest b/src/duckstation-uwp/Package.appxmanifest deleted file mode 100644 index e429a5174..000000000 --- a/src/duckstation-uwp/Package.appxmanifest +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - DuckStation - Stenzek - Assets\StoreLogo.png - - - - - - - - - - - - - - - - - - .cue - .chd - .ecm - .iso - .mds - .psexe - .psf - .minipsf - .m3u - .mcd - - DuckStation Disc Image - Assets\duck_128.png - - - - - - - - - - - - \ No newline at end of file diff --git a/src/duckstation-uwp/PropertySheet.props b/src/duckstation-uwp/PropertySheet.props deleted file mode 100644 index e34141b01..000000000 --- a/src/duckstation-uwp/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/duckstation-uwp/duckstation-uwp.vcxproj b/src/duckstation-uwp/duckstation-uwp.vcxproj deleted file mode 100644 index 259236f51..000000000 --- a/src/duckstation-uwp/duckstation-uwp.vcxproj +++ /dev/null @@ -1,212 +0,0 @@ - - - - - true - false - true - {e2a6cea9-9537-4c61-b637-81f1f17ef638} - duckstation-uwp - DuckStationUWP - en-US - 15.0 - true - Windows Store - 10.0 - 10.0.19041.0 - 10.0.17134.0 - false - true - false - - - $(SolutionDir)build\$(Configuration)-$(Platform)\$(ProjectName)\ - $(SolutionDir)build\$(Configuration)-$(Platform)\$(ProjectName)\ - false - $(ProjectName) - False - True - duckstation-uwp.pfx - SHA256 - False - False - True - Always - x64 - 0 - - - - - - - - - - Level4 - %(AdditionalOptions) /bigobj - - - WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions) - - - false - - - - - - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - - true - - - true - - - true - - - true - - - true - - - - - true - - - true - - - true - - - true - - - true - - - true - - - true - - - - - - - - - - - - - - - - - - - - false - - - - - - - - - - $(RootBuildDir)frontend-common\frontend-common.lib;%(AdditionalDependencies) - - - - \ No newline at end of file diff --git a/src/duckstation-uwp/duckstation-uwp.vcxproj.filters b/src/duckstation-uwp/duckstation-uwp.vcxproj.filters deleted file mode 100644 index 7f3bfafc5..000000000 --- a/src/duckstation-uwp/duckstation-uwp.vcxproj.filters +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - Data\resources - - - Data\resources - - - Data\resources - - - Data\resources - - - Data\resources - - - Data\resources - - - Data\resources - - - Data\resources - - - Data\resources - - - Data\resources - - - Data\resources - - - Data\resources - - - Data\resources - - - Data\resources - - - - - - - - {db9086fe-bacc-4437-8272-1aa6642082db} - - - {fa7724ab-a364-49f2-9cdb-11307aa3f63e} - - - {8eda719e-58c6-484f-b00f-90ee69cd6cb5} - - - {1d471d6d-942e-4e06-9b74-36c5620c9d43} - - - {bf7c6843-57df-4e82-bf4e-7ffea724e92d} - - - {26b9c7e0-8acd-44be-848e-7da8e32238fa} - - - {1c1f164b-4184-422c-8d95-9c4cbb6a21eb} - - - - - - - Data\database - - - Data\database - - - Data\shaders - - - Data\shaders - - - Data\shaders - - - Data\shaders - - - Data\shaders\dolphinfx - - - Data\shaders\dolphinfx - - - Data\shaders\dolphinfx - - - Data\inputprofiles - - - Data\inputprofiles - - - Data\inputprofiles - - - Data\inputprofiles - - - Data\inputprofiles - - - - - - - - - - Data\resources - - - Data\resources - - - - - Data\database - - - Data\database - - - - - Data\database - - - \ No newline at end of file diff --git a/src/duckstation-uwp/packages.config b/src/duckstation-uwp/packages.config deleted file mode 100644 index 6d1e442a5..000000000 --- a/src/duckstation-uwp/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/duckstation-uwp/uwp_host_interface.cpp b/src/duckstation-uwp/uwp_host_interface.cpp deleted file mode 100644 index cc573a6e2..000000000 --- a/src/duckstation-uwp/uwp_host_interface.cpp +++ /dev/null @@ -1,764 +0,0 @@ -#include "uwp_host_interface.h" -#include "common/assert.h" -#include "common/byte_stream.h" -#include "common/file_system.h" -#include "common/log.h" -#include "common/string_util.h" -#include "core/controller.h" -#include "core/gpu.h" -#include "core/host_display.h" -#include "core/imgui_fullscreen.h" -#include "core/imgui_styles.h" -#include "core/system.h" -#include "frontend-common/controller_interface.h" -#include "frontend-common/d3d11_host_display.h" -#include "frontend-common/d3d12_host_display.h" -#include "frontend-common/fullscreen_ui.h" -#include "frontend-common/icon.h" -#include "frontend-common/ini_settings_interface.h" -#include "imgui.h" -#include "imgui_internal.h" -#include "imgui_stdlib.h" -#include "uwp_key_map.h" -#include -#include -Log_SetChannel(UWPHostInterface); - -#include -#include -#include -#include -#include - -static bool IsRunningOnXbox() -{ - const auto version_info = winrt::Windows::System::Profile::AnalyticsInfo::VersionInfo(); - const auto device_family = version_info.DeviceFamily(); - return (device_family == L"Windows.Xbox"); -} - -UWPHostInterface::UWPHostInterface() = default; - -UWPHostInterface::~UWPHostInterface() = default; - -winrt::Windows::ApplicationModel::Core::IFrameworkView UWPHostInterface::CreateView() -{ - return *this; -} - -void UWPHostInterface::Initialize(const winrt::Windows::ApplicationModel::Core::CoreApplicationView& a) -{ - winrt::Windows::ApplicationModel::Core::CoreApplication::Suspending({this, &UWPHostInterface::OnSuspending}); - winrt::Windows::ApplicationModel::Core::CoreApplication::Resuming({this, &UWPHostInterface::OnResuming}); -} - -void UWPHostInterface::Load(const winrt::hstring&) {} - -void UWPHostInterface::Uninitialize() {} - -const char* UWPHostInterface::GetFrontendName() const -{ - return "DuckStation UWP Frontend"; -} - -bool UWPHostInterface::Initialize() -{ - Log::SetDebugOutputParams(true, nullptr, LOGLEVEL_DEBUG); - if (!SetDirectories()) - return false; - - m_settings_interface = std::make_unique(GetSettingsFileName()); - m_flags.force_fullscreen_ui = true; - m_fullscreen_ui_enabled = true; - - if (!CommonHostInterface::Initialize()) - return false; - - SetImGuiKeyMap(); - - const bool start_fullscreen = m_flags.start_fullscreen || g_settings.start_fullscreen; - if (!CreateDisplay(start_fullscreen)) - { - Log_ErrorPrintf("Failed to create host display"); - return false; - } - - return true; -} - -void UWPHostInterface::Shutdown() -{ - DestroyDisplay(); - - CommonHostInterface::Shutdown(); -} - -void UWPHostInterface::SetDefaultSettings(SettingsInterface& si) -{ - CommonHostInterface::SetDefaultSettings(si); - - si.SetStringValue("CPU", "FastmemMode", "LUT"); - si.SetStringValue("Main", "ControllerBackend", "XInput"); - si.AddToStringList("GameList", "RecursivePaths", GetUserDirectoryRelativePath("games").c_str()); - - // TODO: Maybe we should bind this to F1 in the future. - si.SetStringValue("Hotkeys", "OpenQuickMenu", "Keyboard/Escape"); - - if (IsRunningOnXbox()) - SetDefaultSettingsForXbox(si); -} - -bool UWPHostInterface::CreateDisplay(bool fullscreen) -{ - Assert(!m_display); - - m_appview = winrt::Windows::UI::ViewManagement::ApplicationView::GetForCurrentView(); - m_appview.PreferredLaunchWindowingMode( - fullscreen ? winrt::Windows::UI::ViewManagement::ApplicationViewWindowingMode::FullScreen : - winrt::Windows::UI::ViewManagement::ApplicationViewWindowingMode::Auto); - - m_window.Activate(); - - const auto di = winrt::Windows::Graphics::Display::DisplayInformation::GetForCurrentView(); - const auto hdi = winrt::Windows::Graphics::Display::Core::HdmiDisplayInformation::GetForCurrentView(); - const s32 resolution_scale = static_cast(di.ResolutionScale()); - - WindowInfo wi; - wi.type = WindowInfo::Type::WinRT; - wi.window_handle = winrt::get_unknown(m_window); - wi.surface_scale = static_cast(resolution_scale) / 100.0f; - wi.surface_width = static_cast(m_window.Bounds().Width * wi.surface_scale); - wi.surface_height = static_cast(m_window.Bounds().Height * wi.surface_scale); - if (hdi) - { - try - { - const auto dm = hdi.GetCurrentDisplayMode(); - const u32 hdmi_width = dm.ResolutionWidthInRawPixels(); - const u32 hdmi_height = dm.ResolutionHeightInRawPixels(); - wi.surface_refresh_rate = static_cast(dm.RefreshRate()); - Log_InfoPrintf("HDMI mode: %ux%u @ %.2f hz", hdmi_width, hdmi_height, wi.surface_refresh_rate); - - // If we're running on Xbox, use the HDMI mode instead of the CoreWindow size. - // In UWP, the CoreWindow is always 1920x1080, even when running at 4K. - if (IsRunningOnXbox()) - { - GAMING_DEVICE_MODEL_INFORMATION gdinfo = {}; - if (SUCCEEDED(GetGamingDeviceModelInformation(&gdinfo)) && gdinfo.vendorId == GAMING_DEVICE_VENDOR_ID_MICROSOFT) - { - Log_InfoPrintf("Overriding core window size %ux%u with HDMI size %ux%u", wi.surface_width, wi.surface_height, - hdmi_width, hdmi_height); - wi.surface_scale *= static_cast(hdmi_width) / static_cast(wi.surface_width); - wi.surface_width = hdmi_width; - wi.surface_height = hdmi_height; - } - } - } - catch (const winrt::hresult_error&) - { - } - } - - if (g_settings.gpu_renderer == GPURenderer::HardwareD3D12) - m_display = std::make_unique(); - else - m_display = std::make_unique(); - - if (!m_display->CreateRenderDevice(wi, g_settings.gpu_adapter, g_settings.gpu_use_debug_device, - g_settings.gpu_threaded_presentation) || - !m_display->InitializeRenderDevice(GetShaderCacheBasePath(), g_settings.gpu_use_debug_device, - g_settings.gpu_threaded_presentation) || - !CreateHostDisplayResources()) - { - m_display->DestroyRenderDevice(); - m_display.reset(); - ReportError("Failed to create/initialize display render device"); - return false; - } - - if (!CreateHostDisplayResources()) - Log_WarningPrint("Failed to create host display resources"); - - Log_InfoPrintf("Host display initialized at %ux%u resolution", m_display->GetWindowWidth(), - m_display->GetWindowHeight()); - return true; -} - -void UWPHostInterface::DestroyDisplay() -{ - ReleaseHostDisplayResources(); - - if (m_display) - m_display->DestroyRenderDevice(); - - m_display.reset(); -} - -bool UWPHostInterface::AcquireHostDisplay() -{ - return true; -} - -void UWPHostInterface::ReleaseHostDisplay() -{ - // restore vsync, since we don't want to burn cycles at the menu - m_display->SetVSync(true); -} - -void UWPHostInterface::PollAndUpdate() -{ - CommonHostInterface::PollAndUpdate(); - - ImGuiIO& io = ImGui::GetIO(); - if (m_text_input_requested != io.WantTextInput) - { - const bool activate = io.WantTextInput; - Log_InfoPrintf("%s input pane...", activate ? "showing" : "hiding"); - - m_text_input_requested = activate; - m_dispatcher.RunAsync(winrt::Windows::UI::Core::CoreDispatcherPriority::Normal, [this, activate]() { - const auto input_pane = winrt::Windows::UI::ViewManagement::InputPane::GetForCurrentView(); - if (input_pane) - { - if (activate) - input_pane.TryShow(); - else - input_pane.TryHide(); - } - }); - } -} - -void UWPHostInterface::RequestExit() -{ - m_shutdown_flag.store(true); - m_dispatcher.RunAsync(winrt::Windows::UI::Core::CoreDispatcherPriority::Normal, - [this]() { winrt::Windows::ApplicationModel::Core::CoreApplication::Exit(); }); -} - -void UWPHostInterface::SetMouseMode(bool relative, bool hide_cursor) {} - -void UWPHostInterface::Run() -{ - if (!Initialize()) - { - Shutdown(); - return; - } - - m_emulation_thread = std::thread(&UWPHostInterface::EmulationThreadEntryPoint, this); - - m_dispatcher.ProcessEvents(winrt::Windows::UI::Core::CoreProcessEventsOption::ProcessUntilQuit); - m_shutdown_flag.store(true); - m_emulation_thread.join(); -} - -void UWPHostInterface::EmulationThreadEntryPoint() -{ - if (m_fullscreen_ui_enabled) - { - FullscreenUI::SetDebugMenuAllowed(true); - FullscreenUI::QueueGameListRefresh(); - } - - // process events to pick up controllers before updating input map - PollAndUpdate(); - UpdateInputMap(); - - if (m_was_running_on_suspend && ShouldSaveResumeState()) - ResumeSystemFromMostRecentState(); - - while (!m_shutdown_flag.load()) - { - RunCallbacks(); - PollAndUpdate(); - - ImGui::NewFrame(); - - if (System::IsRunning()) - { - if (m_display_all_frames) - System::RunFrame(); - else - System::RunFrames(); - - UpdateControllerMetaState(); - if (m_frame_step_request) - { - m_frame_step_request = false; - PauseSystem(true); - } - } - - // rendering - { - DrawImGuiWindows(); - ImGui::Render(); - ImGui::EndFrame(); - - m_display->Render(); - - if (System::IsRunning()) - { - System::UpdatePerformanceCounters(); - - if (m_throttler_enabled) - System::Throttle(); - } - } - } - - // Save state on exit so it can be resumed - if (!System::IsShutdown()) - PowerOffSystem(ShouldSaveResumeState()); -} - -void UWPHostInterface::ReportMessage(const char* message) -{ - Log_InfoPrint(message); - AddOSDMessage(message, 10.0f); -} - -void UWPHostInterface::ReportError(const char* message) -{ - Log_ErrorPrint(message); - - if (!m_display) - return; - - const bool was_in_frame = GImGui->FrameCount != GImGui->FrameCountEnded; - if (was_in_frame) - ImGui::EndFrame(); - - bool done = false; - while (!done) - { - RunCallbacks(); - PollAndUpdate(); - if (m_fullscreen_ui_enabled) - FullscreenUI::SetImGuiNavInputs(); - - ImGui::NewFrame(); - done = FullscreenUI::DrawErrorWindow(message); - ImGui::EndFrame(); - m_display->Render(); - } - - if (was_in_frame) - ImGui::NewFrame(); -} - -bool UWPHostInterface::ConfirmMessage(const char* message) -{ - Log_InfoPrintf("Confirm: %s", message); - - if (!m_display) - return true; - - const bool was_in_frame = GImGui->FrameCount != GImGui->FrameCountEnded; - if (was_in_frame) - ImGui::EndFrame(); - - bool done = false; - bool result = true; - while (!done) - { - RunCallbacks(); - PollAndUpdate(); - if (m_fullscreen_ui_enabled) - FullscreenUI::SetImGuiNavInputs(); - - ImGui::NewFrame(); - done = FullscreenUI::DrawConfirmWindow(message, &result); - ImGui::EndFrame(); - m_display->Render(); - } - - if (was_in_frame) - ImGui::NewFrame(); - - return result; -} - -void UWPHostInterface::RunLater(std::function callback) -{ - std::unique_lock lock(m_queued_callbacks_lock); - m_queued_callbacks.push_back(std::move(callback)); -} - -void UWPHostInterface::OnDisplayInvalidated() {} - -void UWPHostInterface::OnSystemPerformanceCountersUpdated() {} - -bool UWPHostInterface::IsFullscreen() const -{ - return m_appview.IsFullScreenMode(); -} - -bool UWPHostInterface::SetFullscreen(bool enabled) -{ - m_dispatcher.RunAsync(winrt::Windows::UI::Core::CoreDispatcherPriority::Normal, [this, enabled]() { - if (enabled) - m_appview.TryEnterFullScreenMode(); - else - m_appview.ExitFullScreenMode(); - }); - - return true; -} - -void UWPHostInterface::RunCallbacks() -{ - std::unique_lock lock(m_queued_callbacks_lock); - - while (!m_queued_callbacks.empty()) - { - auto callback = std::move(m_queued_callbacks.front()); - m_queued_callbacks.pop_front(); - lock.unlock(); - callback(); - lock.lock(); - } -} - -void UWPHostInterface::SetWindow(const winrt::Windows::UI::Core::CoreWindow& window) -{ - m_window = window; - m_dispatcher = m_window.Dispatcher(); - - window.Closed({this, &UWPHostInterface::OnClosed}); - window.SizeChanged({this, &UWPHostInterface::OnSizeChanged}); - window.KeyDown({this, &UWPHostInterface::OnKeyDown}); - window.KeyUp({this, &UWPHostInterface::OnKeyUp}); - window.CharacterReceived({this, &UWPHostInterface::OnCharacterReceived}); - window.PointerPressed({this, &UWPHostInterface::OnPointerPressed}); - window.PointerReleased({this, &UWPHostInterface::OnPointerPressed}); - window.PointerMoved({this, &UWPHostInterface::OnPointerMoved}); - window.PointerWheelChanged({this, &UWPHostInterface::OnPointerWheelChanged}); -} - -bool UWPHostInterface::SetDirectories() -{ - const auto install_location = winrt::Windows::ApplicationModel::Package::Current().InstalledLocation(); - m_program_directory = StringUtil::WideStringToUTF8String(install_location.Path()); - if (m_program_directory.empty()) - { - Log_ErrorPrintf("Failed to get install location"); - return false; - } - - Log_InfoPrintf("Program directory: %s", m_program_directory.c_str()); - - const auto local_location = winrt::Windows::Storage::ApplicationData::Current().LocalFolder(); - m_user_directory = StringUtil::WideStringToUTF8String(local_location.Path()); - if (m_user_directory.empty()) - { - Log_ErrorPrintf("Failed to get user directory"); - return false; - } - - Log_InfoPrintf("User directory: %s", m_user_directory.c_str()); - return true; -} - -void UWPHostInterface::OnSuspending(const IInspectable&, - const winrt::Windows::ApplicationModel::SuspendingEventArgs& args) -{ - if (IsEmulationThreadRunning()) - { - RunLater([this]() { - if (ShouldSaveResumeState()) - SaveResumeSaveState(); - - m_was_running_on_suspend.store(System::IsRunning()); - PauseSystem(true); - m_suspend_sync_event.Signal(); - }); - - m_suspend_sync_event.Wait(); - } -} - -void UWPHostInterface::OnResuming(const IInspectable&, const IInspectable&) -{ - if (IsEmulationThreadRunning()) - { - if (m_was_running_on_suspend.load()) - RunLater([this]() { PauseSystem(false); }); - } - else - { - RunLater([this]() { - if (ShouldSaveResumeState()) - ResumeSystemFromMostRecentState(); - }); - } -} - -void UWPHostInterface::OnClosed(const IInspectable&, const winrt::Windows::UI::Core::CoreWindowEventArgs& args) -{ - if (IsEmulationThreadRunning()) - { - m_shutdown_flag.store(true); - m_emulation_thread.join(); - } - args.Handled(true); -} - -void UWPHostInterface::OnSizeChanged(const IInspectable&, - const winrt::Windows::UI::Core::WindowSizeChangedEventArgs& args) -{ - if (IsEmulationThreadRunning()) - { - const auto size = args.Size(); - const float width = size.Width; - const float height = size.Height; - RunLater([this, width, height]() { - if (!m_display) - return; - - m_display->ResizeRenderWindow(static_cast(width * m_display->GetWindowScale()), - static_cast(height * m_display->GetWindowScale())); - OnHostDisplayResized(); - }); - } - - args.Handled(true); -} - -void UWPHostInterface::OnKeyDown(const IInspectable&, const winrt::Windows::UI::Core::KeyEventArgs& args) -{ - const auto status = args.KeyStatus(); - if (!status.WasKeyDown && !status.IsKeyReleased && IsEmulationThreadRunning()) - { - const HostKeyCode code = static_cast(args.VirtualKey()); - RunLater([this, code]() { - ImGuiIO& io = ImGui::GetIO(); - if (code < countof(io.KeysDown)) - io.KeysDown[code] = true; - - if (!io.WantCaptureKeyboard) - HandleHostKeyEvent(code, 0, true); - }); - } - - args.Handled(true); -} - -void UWPHostInterface::OnKeyUp(const IInspectable&, const winrt::Windows::UI::Core::KeyEventArgs& args) -{ - const auto status = args.KeyStatus(); - if (status.WasKeyDown && status.IsKeyReleased && IsEmulationThreadRunning()) - { - const HostKeyCode code = static_cast(args.VirtualKey()); - RunLater([this, code]() { - ImGuiIO& io = ImGui::GetIO(); - if (code < countof(io.KeysDown)) - io.KeysDown[code] = false; - - if (!io.WantCaptureKeyboard) - HandleHostKeyEvent(code, 0, false); - }); - } - - args.Handled(true); -} - -void UWPHostInterface::OnCharacterReceived(const IInspectable&, - const winrt::Windows::UI::Core::CharacterReceivedEventArgs& args) -{ - if (IsEmulationThreadRunning()) - { - const u32 code = args.KeyCode(); - RunLater([this, code]() { ImGui::GetIO().AddInputCharacter(code); }); - } - - args.Handled(true); -} - -void UWPHostInterface::OnPointerPressed(const IInspectable&, const winrt::Windows::UI::Core::PointerEventArgs& args) -{ - const auto pointer = args.CurrentPoint(); - if (pointer.PointerDevice().PointerDeviceType() == winrt::Windows::Devices::Input::PointerDeviceType::Mouse) - UpdateMouseButtonState(pointer); - - args.Handled(true); -} - -void UWPHostInterface::OnPointerReleased(const IInspectable&, const winrt::Windows::UI::Core::PointerEventArgs& args) -{ - const auto pointer = args.CurrentPoint(); - if (pointer.PointerDevice().PointerDeviceType() == winrt::Windows::Devices::Input::PointerDeviceType::Mouse) - UpdateMouseButtonState(pointer); - - args.Handled(true); -} - -void UWPHostInterface::OnPointerMoved(const IInspectable&, const winrt::Windows::UI::Core::PointerEventArgs& args) -{ - const auto pointer = args.CurrentPoint(); - if (pointer.PointerDevice().PointerDeviceType() == winrt::Windows::Devices::Input::PointerDeviceType::Mouse) - { - const auto pos = pointer.Position(); - const float x = pos.X * m_display->GetWindowScale(); - const float y = pos.Y * m_display->GetWindowScale(); - - if (IsEmulationThreadRunning()) - { - RunLater([this, x, y]() { - m_display->SetMousePosition(static_cast(x), static_cast(y)); - - if (ImGui::GetCurrentContext()) - { - ImGuiIO& io = ImGui::GetIO(); - io.MousePos.x = x; - io.MousePos.y = y; - } - }); - } - - UpdateMouseButtonState(pointer); - } - - args.Handled(true); -} - -void UWPHostInterface::OnPointerWheelChanged(const IInspectable&, - const winrt::Windows::UI::Core::PointerEventArgs& args) -{ - const auto pointer = args.CurrentPoint(); - const auto properties = pointer.Properties(); - const s32 delta = properties.MouseWheelDelta(); - const bool horizontal = properties.IsHorizontalMouseWheel(); - - if (IsEmulationThreadRunning()) - { - RunLater([this, delta, horizontal]() { - if (ImGui::GetCurrentContext()) - { - ImGuiIO& io = ImGui::GetIO(); - const float dw = static_cast(std::clamp(delta, -1, 1)); - if (horizontal) - io.MouseWheelH = dw; - else - io.MouseWheel = dw; - } - }); - } - - args.Handled(true); -} - -void UWPHostInterface::UpdateMouseButtonState(const winrt::Windows::UI::Input::PointerPoint& point) -{ - const auto properties = point.Properties(); - const bool states[3] = {properties.IsLeftButtonPressed(), properties.IsRightButtonPressed(), - properties.IsMiddleButtonPressed()}; - - if (IsEmulationThreadRunning()) - { - RunLater([this, states]() { - if (!ImGui::GetCurrentContext()) - return; - - ImGuiIO& io = ImGui::GetIO(); - for (u32 i = 0; i < countof(states); i++) - { - if (io.MouseDown[i] == states[i]) - continue; - - io.MouseDown[i] = states[i]; - HandleHostMouseEvent(static_cast(i + 1u), states[i]); - } - }); - } -} - -std::optional UWPHostInterface::GetHostKeyCode(const std::string_view key_code) const -{ - for (const auto& it : s_key_map) - { - if (key_code.compare(it.second) == 0) - return static_cast(it.first); - } - - return std::nullopt; -} - -const char* UWPHostInterface::GetKeyCodeName(int key_code) -{ - const auto it = s_key_map.find(key_code); - return (it != s_key_map.end()) ? it->second : nullptr; -} - -void UWPHostInterface::SetImGuiKeyMap() -{ - using namespace winrt::Windows::System; - - ImGuiIO& io = ImGui::GetIO(); - io.KeyMap[ImGuiKey_Tab] = static_cast(VirtualKey::Tab); - io.KeyMap[ImGuiKey_LeftArrow] = static_cast(VirtualKey::Left); - io.KeyMap[ImGuiKey_RightArrow] = static_cast(VirtualKey::Right); - io.KeyMap[ImGuiKey_UpArrow] = static_cast(VirtualKey::Up); - io.KeyMap[ImGuiKey_DownArrow] = static_cast(VirtualKey::Down); - io.KeyMap[ImGuiKey_PageUp] = static_cast(VirtualKey::PageUp); - io.KeyMap[ImGuiKey_PageDown] = static_cast(VirtualKey::PageDown); - io.KeyMap[ImGuiKey_Home] = static_cast(VirtualKey::Home); - io.KeyMap[ImGuiKey_End] = static_cast(VirtualKey::End); - io.KeyMap[ImGuiKey_Insert] = static_cast(VirtualKey::Insert); - io.KeyMap[ImGuiKey_Delete] = static_cast(VirtualKey::Delete); - io.KeyMap[ImGuiKey_Backspace] = static_cast(VirtualKey::Back); - io.KeyMap[ImGuiKey_Space] = static_cast(VirtualKey::Space); - io.KeyMap[ImGuiKey_Enter] = static_cast(VirtualKey::Enter); - io.KeyMap[ImGuiKey_Escape] = static_cast(VirtualKey::Escape); - io.KeyMap[ImGuiKey_A] = static_cast(VirtualKey::A); - io.KeyMap[ImGuiKey_C] = static_cast(VirtualKey::C); - io.KeyMap[ImGuiKey_V] = static_cast(VirtualKey::V); - io.KeyMap[ImGuiKey_X] = static_cast(VirtualKey::X); - io.KeyMap[ImGuiKey_Y] = static_cast(VirtualKey::Y); - io.KeyMap[ImGuiKey_Z] = static_cast(VirtualKey::Z); -} - -void UWPHostInterface::SetDefaultSettingsForXbox(SettingsInterface& si) -{ - si.SetStringValue("GPU", "Renderer", "D3D12"); - - si.SetBoolValue("Main", "SyncToHostRefreshRate", true); - si.SetBoolValue("Display", "VSync", true); - si.SetBoolValue("Display", "DisplayAllFrames", true); - si.SetFloatValue("Display", "MaxFPS", 60.0f); - - // Set up an analog controller in port 1. - si.SetStringValue("Controller1", "Type", "AnalogController"); - si.SetStringValue("Controller1", "ButtonUp", "Controller0/Button11"); - si.SetStringValue("Controller1", "ButtonDown", "Controller0/Button12"); - si.SetStringValue("Controller1", "ButtonLeft", "Controller0/Button13"); - si.SetStringValue("Controller1", "ButtonRight", "Controller0/Button14"); - si.SetStringValue("Controller1", "ButtonStart", "Controller0/Button6"); - si.SetStringValue("Controller1", "ButtonTriangle", "Controller0/Button3"); - si.SetStringValue("Controller1", "ButtonCross", "Controller0/Button0"); - si.SetStringValue("Controller1", "ButtonCircle", "Controller0/Button1"); - si.SetStringValue("Controller1", "ButtonSquare", "Controller0/Button2"); - si.SetStringValue("Controller1", "ButtonL1", "Controller0/Button9"); - si.SetStringValue("Controller1", "ButtonL2", "Controller0/+Axis4"); - si.SetStringValue("Controller1", "ButtonR1", "Controller0/Button10"); - si.SetStringValue("Controller1", "ButtonR2", "Controller0/+Axis5"); - si.SetStringValue("Controller1", "ButtonL3", "Controller0/Button7"); - si.SetStringValue("Controller1", "ButtonR3", "Controller0/Button8"); - si.SetStringValue("Controller1", "AxisLeftX", "Controller0/Axis0"); - si.SetStringValue("Controller1", "AxisLeftY", "Controller0/Axis1"); - si.SetStringValue("Controller1", "AxisRightX", "Controller0/Axis2"); - si.SetStringValue("Controller1", "AxisRightY", "Controller0/Axis3"); - si.SetStringValue("Controller1", "Rumble", "Controller0"); - si.SetStringValue("Controller1", "ForceAnalogOnReset", "true"); - si.SetStringValue("Controller1", "AnalogDPadInDigitalMode", "true"); - - // Repurpose the select button to open the menu. - // Not ideal, but all we can do until we have chords. - si.SetStringValue("Hotkeys", "OpenQuickMenu", "Controller0/Button4"); -} - -int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int) -{ - winrt::Windows::ApplicationModel::Core::CoreApplication::Run(winrt::make()); -} diff --git a/src/duckstation-uwp/uwp_host_interface.h b/src/duckstation-uwp/uwp_host_interface.h deleted file mode 100644 index 899d6e766..000000000 --- a/src/duckstation-uwp/uwp_host_interface.h +++ /dev/null @@ -1,122 +0,0 @@ -#pragma once -#include "common/event.h" -#include "common/window_info.h" -#include "common/windows_headers.h" -#include "core/host_display.h" -#include "core/host_interface.h" -#include "frontend-common/common_host.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class INISettingsInterface; - -class UWPHostInterface - : public CommonHostInterface, - public winrt::implements -{ -public: - UWPHostInterface(); - ~UWPHostInterface(); - - const char* GetFrontendName() const override; - bool Initialize() override; - void Shutdown() override; - - void ReportMessage(const char* message) override; - void ReportError(const char* message) override; - bool ConfirmMessage(const char* message) override; - - void RunLater(std::function callback) override; - - void OnDisplayInvalidated() override; - void OnSystemPerformanceCountersUpdated() override; - - bool IsFullscreen() const override; - bool SetFullscreen(bool enabled) override; - - winrt::Windows::ApplicationModel::Core::IFrameworkView CreateView(); - void Initialize(const winrt::Windows::ApplicationModel::Core::CoreApplicationView&); - void Load(const winrt::hstring&); - void Uninitialize(); - void Run(); - void SetWindow(const winrt::Windows::UI::Core::CoreWindow& window); - -protected: - enum : u32 - { - DEFAULT_WINDOW_WIDTH = 1280, - DEFAULT_WINDOW_HEIGHT = 720 - }; - - ALWAYS_INLINE bool IsEmulationThreadRunning() const { return m_emulation_thread.joinable(); } - - void SetDefaultSettings(SettingsInterface& si) override; - - bool AcquireHostDisplay() override; - void ReleaseHostDisplay() override; - - void PollAndUpdate() override; - void RequestExit() override; - - void SetMouseMode(bool relative, bool hide_cursor) override; - - bool CreateDisplay(bool fullscreen); - void DestroyDisplay(); - void RunCallbacks(); - void EmulationThreadEntryPoint(); - - bool SetDirectories(); - void OnSuspending(const IInspectable&, const winrt::Windows::ApplicationModel::SuspendingEventArgs& args); - void OnResuming(const IInspectable&, const IInspectable&); - void OnClosed(const IInspectable&, const winrt::Windows::UI::Core::CoreWindowEventArgs& args); - void OnSizeChanged(const IInspectable&, const winrt::Windows::UI::Core::WindowSizeChangedEventArgs& args); - void OnKeyDown(const IInspectable&, const winrt::Windows::UI::Core::KeyEventArgs& args); - void OnKeyUp(const IInspectable&, const winrt::Windows::UI::Core::KeyEventArgs& args); - void OnCharacterReceived(const IInspectable&, const winrt::Windows::UI::Core::CharacterReceivedEventArgs& args); - void OnPointerPressed(const IInspectable&, const winrt::Windows::UI::Core::PointerEventArgs& args); - void OnPointerReleased(const IInspectable&, const winrt::Windows::UI::Core::PointerEventArgs& args); - void OnPointerMoved(const IInspectable&, const winrt::Windows::UI::Core::PointerEventArgs& args); - void OnPointerWheelChanged(const IInspectable&, const winrt::Windows::UI::Core::PointerEventArgs& args); - void UpdateMouseButtonState(const winrt::Windows::UI::Input::PointerPoint& point); - - std::optional GetHostKeyCode(const std::string_view key_code) const override; - const char* GetKeyCodeName(int key_code); - void SetImGuiKeyMap(); - - void SetDefaultSettingsForXbox(SettingsInterface& si); - - std::deque> m_queued_callbacks; - std::mutex m_queued_callbacks_lock; - - winrt::Windows::UI::Core::CoreWindow m_window{nullptr}; - winrt::Windows::UI::Core::CoreDispatcher m_dispatcher{nullptr}; - winrt::Windows::UI::ViewManagement::ApplicationView m_appview{nullptr}; - - std::thread m_emulation_thread; - std::atomic_bool m_shutdown_flag{false}; - - bool m_text_input_requested = false; - - Common::Event m_suspend_sync_event; - std::atomic_bool m_was_running_on_suspend{false}; - std::atomic_bool m_was_running_on_background{false}; -}; diff --git a/src/duckstation-uwp/uwp_key_map.h b/src/duckstation-uwp/uwp_key_map.h deleted file mode 100644 index 8c5379455..000000000 --- a/src/duckstation-uwp/uwp_key_map.h +++ /dev/null @@ -1,149 +0,0 @@ -#include -#include - -static const std::map s_key_map = { - {static_cast(winrt::Windows::System::VirtualKey::LeftButton), "LeftButton"}, - {static_cast(winrt::Windows::System::VirtualKey::RightButton), "RightButton"}, - {static_cast(winrt::Windows::System::VirtualKey::Cancel), "Cancel"}, - {static_cast(winrt::Windows::System::VirtualKey::MiddleButton), "MiddleButton"}, - {static_cast(winrt::Windows::System::VirtualKey::XButton1), "XButton1"}, - {static_cast(winrt::Windows::System::VirtualKey::XButton2), "XButton2"}, - {static_cast(winrt::Windows::System::VirtualKey::Back), "Back"}, - {static_cast(winrt::Windows::System::VirtualKey::Tab), "Tab"}, - {static_cast(winrt::Windows::System::VirtualKey::Clear), "Clear"}, - {static_cast(winrt::Windows::System::VirtualKey::Enter), "Return"}, - {static_cast(winrt::Windows::System::VirtualKey::Shift), "Shift"}, - {static_cast(winrt::Windows::System::VirtualKey::Control), "Control"}, - {static_cast(winrt::Windows::System::VirtualKey::Menu), "Menu"}, - {static_cast(winrt::Windows::System::VirtualKey::Pause), "Pause"}, - {static_cast(winrt::Windows::System::VirtualKey::CapitalLock), "CapitalLock"}, - {static_cast(winrt::Windows::System::VirtualKey::Kana), "Kana"}, - {static_cast(winrt::Windows::System::VirtualKey::Hangul), "Hangul"}, - {static_cast(winrt::Windows::System::VirtualKey::Junja), "Junja"}, - {static_cast(winrt::Windows::System::VirtualKey::Final), "Final"}, - {static_cast(winrt::Windows::System::VirtualKey::Hanja), "Hanja"}, - {static_cast(winrt::Windows::System::VirtualKey::Kanji), "Kanji"}, - {static_cast(winrt::Windows::System::VirtualKey::Escape), "Escape"}, - {static_cast(winrt::Windows::System::VirtualKey::Convert), "Convert"}, - {static_cast(winrt::Windows::System::VirtualKey::NonConvert), "NonConvert"}, - {static_cast(winrt::Windows::System::VirtualKey::Accept), "Accept"}, - {static_cast(winrt::Windows::System::VirtualKey::ModeChange), "ModeChange"}, - {static_cast(winrt::Windows::System::VirtualKey::Space), "Space"}, - {static_cast(winrt::Windows::System::VirtualKey::PageUp), "PageUp"}, - {static_cast(winrt::Windows::System::VirtualKey::PageDown), "PageDown"}, - {static_cast(winrt::Windows::System::VirtualKey::End), "End"}, - {static_cast(winrt::Windows::System::VirtualKey::Home), "Home"}, - {static_cast(winrt::Windows::System::VirtualKey::Left), "Left"}, - {static_cast(winrt::Windows::System::VirtualKey::Up), "Up"}, - {static_cast(winrt::Windows::System::VirtualKey::Right), "Right"}, - {static_cast(winrt::Windows::System::VirtualKey::Down), "Down"}, - {static_cast(winrt::Windows::System::VirtualKey::Select), "Select"}, - {static_cast(winrt::Windows::System::VirtualKey::Print), "Print"}, - {static_cast(winrt::Windows::System::VirtualKey::Execute), "Execute"}, - {static_cast(winrt::Windows::System::VirtualKey::Snapshot), "Snapshot"}, - {static_cast(winrt::Windows::System::VirtualKey::Insert), "Insert"}, - {static_cast(winrt::Windows::System::VirtualKey::Delete), "Delete"}, - {static_cast(winrt::Windows::System::VirtualKey::Help), "Help"}, - {static_cast(winrt::Windows::System::VirtualKey::Number0), "Number0"}, - {static_cast(winrt::Windows::System::VirtualKey::Number1), "Number1"}, - {static_cast(winrt::Windows::System::VirtualKey::Number2), "Number2"}, - {static_cast(winrt::Windows::System::VirtualKey::Number3), "Number3"}, - {static_cast(winrt::Windows::System::VirtualKey::Number4), "Number4"}, - {static_cast(winrt::Windows::System::VirtualKey::Number5), "Number5"}, - {static_cast(winrt::Windows::System::VirtualKey::Number6), "Number6"}, - {static_cast(winrt::Windows::System::VirtualKey::Number7), "Number7"}, - {static_cast(winrt::Windows::System::VirtualKey::Number8), "Number8"}, - {static_cast(winrt::Windows::System::VirtualKey::Number9), "Number9"}, - {static_cast(winrt::Windows::System::VirtualKey::A), "A"}, - {static_cast(winrt::Windows::System::VirtualKey::B), "B"}, - {static_cast(winrt::Windows::System::VirtualKey::C), "C"}, - {static_cast(winrt::Windows::System::VirtualKey::D), "D"}, - {static_cast(winrt::Windows::System::VirtualKey::E), "E"}, - {static_cast(winrt::Windows::System::VirtualKey::F), "F"}, - {static_cast(winrt::Windows::System::VirtualKey::G), "G"}, - {static_cast(winrt::Windows::System::VirtualKey::H), "H"}, - {static_cast(winrt::Windows::System::VirtualKey::I), "I"}, - {static_cast(winrt::Windows::System::VirtualKey::J), "J"}, - {static_cast(winrt::Windows::System::VirtualKey::K), "K"}, - {static_cast(winrt::Windows::System::VirtualKey::L), "L"}, - {static_cast(winrt::Windows::System::VirtualKey::M), "M"}, - {static_cast(winrt::Windows::System::VirtualKey::N), "N"}, - {static_cast(winrt::Windows::System::VirtualKey::O), "O"}, - {static_cast(winrt::Windows::System::VirtualKey::P), "P"}, - {static_cast(winrt::Windows::System::VirtualKey::Q), "Q"}, - {static_cast(winrt::Windows::System::VirtualKey::R), "R"}, - {static_cast(winrt::Windows::System::VirtualKey::S), "S"}, - {static_cast(winrt::Windows::System::VirtualKey::T), "T"}, - {static_cast(winrt::Windows::System::VirtualKey::U), "U"}, - {static_cast(winrt::Windows::System::VirtualKey::V), "V"}, - {static_cast(winrt::Windows::System::VirtualKey::W), "W"}, - {static_cast(winrt::Windows::System::VirtualKey::X), "X"}, - {static_cast(winrt::Windows::System::VirtualKey::Y), "Y"}, - {static_cast(winrt::Windows::System::VirtualKey::Z), "Z"}, - {static_cast(winrt::Windows::System::VirtualKey::LeftWindows), "LeftWindows"}, - {static_cast(winrt::Windows::System::VirtualKey::RightWindows), "RightWindows"}, - {static_cast(winrt::Windows::System::VirtualKey::Application), "Application"}, - {static_cast(winrt::Windows::System::VirtualKey::Sleep), "Sleep"}, - {static_cast(winrt::Windows::System::VirtualKey::NumberPad0), "Keypad+0"}, - {static_cast(winrt::Windows::System::VirtualKey::NumberPad1), "Keypad+1"}, - {static_cast(winrt::Windows::System::VirtualKey::NumberPad2), "Keypad+2"}, - {static_cast(winrt::Windows::System::VirtualKey::NumberPad3), "Keypad+3"}, - {static_cast(winrt::Windows::System::VirtualKey::NumberPad4), "Keypad+4"}, - {static_cast(winrt::Windows::System::VirtualKey::NumberPad5), "Keypad+5"}, - {static_cast(winrt::Windows::System::VirtualKey::NumberPad6), "Keypad+6"}, - {static_cast(winrt::Windows::System::VirtualKey::NumberPad7), "Keypad+7"}, - {static_cast(winrt::Windows::System::VirtualKey::NumberPad8), "Keypad+8"}, - {static_cast(winrt::Windows::System::VirtualKey::NumberPad9), "Keypad+9"}, - {static_cast(winrt::Windows::System::VirtualKey::Multiply), "Multiply"}, - {static_cast(winrt::Windows::System::VirtualKey::Add), "Add"}, - {static_cast(winrt::Windows::System::VirtualKey::Separator), "Separator"}, - {static_cast(winrt::Windows::System::VirtualKey::Subtract), "Subtract"}, - {static_cast(winrt::Windows::System::VirtualKey::Decimal), "Decimal"}, - {static_cast(winrt::Windows::System::VirtualKey::Divide), "Divide"}, - {static_cast(winrt::Windows::System::VirtualKey::F1), "F1"}, - {static_cast(winrt::Windows::System::VirtualKey::F2), "F2"}, - {static_cast(winrt::Windows::System::VirtualKey::F3), "F3"}, - {static_cast(winrt::Windows::System::VirtualKey::F4), "F4"}, - {static_cast(winrt::Windows::System::VirtualKey::F5), "F5"}, - {static_cast(winrt::Windows::System::VirtualKey::F6), "F6"}, - {static_cast(winrt::Windows::System::VirtualKey::F7), "F7"}, - {static_cast(winrt::Windows::System::VirtualKey::F8), "F8"}, - {static_cast(winrt::Windows::System::VirtualKey::F9), "F9"}, - {static_cast(winrt::Windows::System::VirtualKey::F10), "F10"}, - {static_cast(winrt::Windows::System::VirtualKey::F11), "F11"}, - {static_cast(winrt::Windows::System::VirtualKey::F12), "F12"}, - {static_cast(winrt::Windows::System::VirtualKey::F13), "F13"}, - {static_cast(winrt::Windows::System::VirtualKey::F14), "F14"}, - {static_cast(winrt::Windows::System::VirtualKey::F15), "F15"}, - {static_cast(winrt::Windows::System::VirtualKey::F16), "F16"}, - {static_cast(winrt::Windows::System::VirtualKey::F17), "F17"}, - {static_cast(winrt::Windows::System::VirtualKey::F18), "F18"}, - {static_cast(winrt::Windows::System::VirtualKey::F19), "F19"}, - {static_cast(winrt::Windows::System::VirtualKey::F20), "F20"}, - {static_cast(winrt::Windows::System::VirtualKey::F21), "F21"}, - {static_cast(winrt::Windows::System::VirtualKey::F22), "F22"}, - {static_cast(winrt::Windows::System::VirtualKey::F23), "F23"}, - {static_cast(winrt::Windows::System::VirtualKey::F24), "F24"}, - {static_cast(winrt::Windows::System::VirtualKey::NavigationView), "NavigationView"}, - {static_cast(winrt::Windows::System::VirtualKey::NavigationMenu), "NavigationMenu"}, - {static_cast(winrt::Windows::System::VirtualKey::NavigationUp), "NavigationUp"}, - {static_cast(winrt::Windows::System::VirtualKey::NavigationDown), "NavigationDown"}, - {static_cast(winrt::Windows::System::VirtualKey::NavigationLeft), "NavigationLeft"}, - {static_cast(winrt::Windows::System::VirtualKey::NavigationRight), "NavigationRight"}, - {static_cast(winrt::Windows::System::VirtualKey::NavigationAccept), "NavigationAccept"}, - {static_cast(winrt::Windows::System::VirtualKey::NavigationCancel), "NavigationCancel"}, - {static_cast(winrt::Windows::System::VirtualKey::NumberKeyLock), "NumberKeyLock"}, - {static_cast(winrt::Windows::System::VirtualKey::Scroll), "Scroll"}, - {static_cast(winrt::Windows::System::VirtualKey::LeftShift), "LeftShift"}, - {static_cast(winrt::Windows::System::VirtualKey::RightShift), "RightShift"}, - {static_cast(winrt::Windows::System::VirtualKey::LeftControl), "LeftControl"}, - {static_cast(winrt::Windows::System::VirtualKey::RightControl), "RightControl"}, - {static_cast(winrt::Windows::System::VirtualKey::LeftMenu), "LeftMenu"}, - {static_cast(winrt::Windows::System::VirtualKey::RightMenu), "RightMenu"}, - {static_cast(winrt::Windows::System::VirtualKey::GoBack), "GoBack"}, - {static_cast(winrt::Windows::System::VirtualKey::GoForward), "GoForward"}, - {static_cast(winrt::Windows::System::VirtualKey::Refresh), "Refresh"}, - {static_cast(winrt::Windows::System::VirtualKey::Stop), "Stop"}, - {static_cast(winrt::Windows::System::VirtualKey::Search), "Search"}, - {static_cast(winrt::Windows::System::VirtualKey::Favorites), "Favorites"}, - {static_cast(winrt::Windows::System::VirtualKey::GoHome), "GoHome"}}; diff --git a/src/frontend-common/frontend-common.props b/src/frontend-common/frontend-common.props index 93b69a71e..67ff17ad4 100644 --- a/src/frontend-common/frontend-common.props +++ b/src/frontend-common/frontend-common.props @@ -11,7 +11,7 @@ - + WITH_SDL2=1;WITH_DINPUT=1;WITH_DISCORD_PRESENCE=1;%(PreprocessorDefinitions) $(SolutionDir)dep\cubeb\include;$(SolutionDir)dep\discord-rpc\include;%(AdditionalIncludeDirectories) @@ -21,5 +21,5 @@ - + diff --git a/src/frontend-common/frontend-common.vcxproj b/src/frontend-common/frontend-common.vcxproj index 4e34c63fb..b54c008f9 100644 --- a/src/frontend-common/frontend-common.vcxproj +++ b/src/frontend-common/frontend-common.vcxproj @@ -4,9 +4,7 @@ - - true - + @@ -18,10 +16,10 @@ - true + true - true + true @@ -29,14 +27,14 @@ - true + true - true + true @@ -45,9 +43,7 @@ - - true - + @@ -58,10 +54,10 @@ - true + true - true + true @@ -69,14 +65,14 @@ - true + true - true + true @@ -91,4 +87,4 @@ - \ No newline at end of file + diff --git a/src/frontend-common/fullscreen_ui.cpp b/src/frontend-common/fullscreen_ui.cpp index af5165a0e..6083b893b 100644 --- a/src/frontend-common/fullscreen_ui.cpp +++ b/src/frontend-common/fullscreen_ui.cpp @@ -2884,7 +2884,6 @@ void FullscreenUI::DrawDisplaySettingsPage() fullscreen_mode_set = true; } -#ifndef _UWP if (MenuButtonWithValue("Fullscreen Resolution", "Selects the resolution to use in fullscreen modes.", fullscreen_mode.empty() ? "Borderless Fullscreen" : fullscreen_mode.c_str())) { @@ -2911,7 +2910,6 @@ void FullscreenUI::DrawDisplaySettingsPage() }; OpenChoiceDialog(ICON_FA_TV " Fullscreen Resolution", false, std::move(options), std::move(callback)); } -#endif #endif const GPURenderer renderer = diff --git a/src/frontend-common/inhibit_screensaver.cpp b/src/frontend-common/inhibit_screensaver.cpp index 16e681298..9a0c07b15 100644 --- a/src/frontend-common/inhibit_screensaver.cpp +++ b/src/frontend-common/inhibit_screensaver.cpp @@ -4,7 +4,7 @@ #include Log_SetChannel(FrontendCommon); -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) #include "common/windows_headers.h" static bool SetScreensaverInhibitWin32(bool inhibit, const WindowInfo& wi) @@ -93,7 +93,7 @@ static bool SetScreensaverInhibit(bool inhibit, const WindowInfo& wi) { switch (wi.type) { -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) case WindowInfo::Type::Win32: return SetScreensaverInhibitWin32(inhibit, wi); #endif diff --git a/src/frontend-common/input_manager.cpp b/src/frontend-common/input_manager.cpp index 380954a6f..1cd7df21a 100644 --- a/src/frontend-common/input_manager.cpp +++ b/src/frontend-common/input_manager.cpp @@ -870,7 +870,7 @@ void InputManager::UpdatePointerRelativeDelta(u32 index, InputPointerAxis axis, bool InputManager::IsUsingRawInput() { -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) return static_cast(s_input_sources[static_cast(InputSourceType::RawInput)]); #else return false; diff --git a/src/util/cd_image_device.cpp b/src/util/cd_image_device.cpp index a577f59f4..082822a2e 100644 --- a/src/util/cd_image_device.cpp +++ b/src/util/cd_image_device.cpp @@ -53,7 +53,7 @@ static void DeinterleaveSubcode(const u8* subcode_in, u8* subcode_out) } } -#if defined(_WIN32) && !defined(_UWP) +#if defined(_WIN32) // The include order here is critical. // clang-format off diff --git a/src/util/ini_settings_interface.cpp b/src/util/ini_settings_interface.cpp index 3c350c3fc..2b06ea922 100644 --- a/src/util/ini_settings_interface.cpp +++ b/src/util/ini_settings_interface.cpp @@ -22,33 +22,12 @@ static std::string GetTemporaryFileName(const std::string& original_filename) { std::string temporary_filename; temporary_filename.reserve(original_filename.length() + 8); + temporary_filename.append(original_filename); #ifdef _WIN32 - // On UWP, preserve the extension, as it affects permissions. -#ifdef _UWP - const std::string_view original_view(original_filename); - const std::string_view extension(Path::GetExtension(original_view)); - if (extension.length() < original_filename.length()) - { - temporary_filename.append(original_view.substr(0, original_filename.length() - extension.length() - 1)); - temporary_filename.append("_XXXXXX"); - _mktemp_s(temporary_filename.data(), temporary_filename.length() + 1); - temporary_filename += '.'; - temporary_filename.append(extension); - } - else - { - temporary_filename.append(original_filename); - temporary_filename.append(".XXXXXXX"); - _mktemp_s(temporary_filename.data(), temporary_filename.length() + 1); - } -#else - temporary_filename.append(original_filename); temporary_filename.append(".XXXXXXX"); _mktemp_s(temporary_filename.data(), temporary_filename.length() + 1); -#endif #else - temporary_filename.append(original_filename); temporary_filename.append(".XXXXXX"); #if defined(__linux__) || defined(__ANDROID__) || defined(__APPLE__) mkstemp(temporary_filename.data()); diff --git a/src/util/jit_code_buffer.cpp b/src/util/jit_code_buffer.cpp index 28e4f86e6..ab3188f9f 100644 --- a/src/util/jit_code_buffer.cpp +++ b/src/util/jit_code_buffer.cpp @@ -44,21 +44,7 @@ bool JitCodeBuffer::Allocate(u32 size /* = 64 * 1024 * 1024 */, u32 far_code_siz m_total_size = size + far_code_size; #if defined(_WIN32) -#if !defined(_UWP) m_code_ptr = static_cast(VirtualAlloc(nullptr, m_total_size, MEM_COMMIT, PAGE_EXECUTE_READWRITE)); -#else - m_code_ptr = static_cast( - VirtualAlloc2FromApp(GetCurrentProcess(), nullptr, m_total_size, MEM_COMMIT, PAGE_READWRITE, nullptr, 0)); - if (m_code_ptr) - { - ULONG old_protection; - if (!VirtualProtectFromApp(m_code_ptr, m_total_size, PAGE_EXECUTE_READWRITE, &old_protection)) - { - VirtualFree(m_code_ptr, m_total_size, MEM_RELEASE); - return false; - } - } -#endif if (!m_code_ptr) { Log_ErrorPrintf("VirtualAlloc(RWX, %u) for internal buffer failed: %u", m_total_size, GetLastError()); diff --git a/src/util/memory_arena.cpp b/src/util/memory_arena.cpp index c016ca216..9c1f7de06 100644 --- a/src/util/memory_arena.cpp +++ b/src/util/memory_arena.cpp @@ -127,13 +127,8 @@ bool MemoryArena::Create(size_t size, bool writable, bool executable) #if defined(_WIN32) const DWORD protect = (writable ? (executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE) : PAGE_READONLY); -#ifndef _UWP m_file_handle = CreateFileMappingA(INVALID_HANDLE_VALUE, nullptr, protect, Truncate32(size >> 32), Truncate32(size), file_mapping_name.c_str()); -#else - m_file_handle = CreateFileMappingFromApp(INVALID_HANDLE_VALUE, nullptr, protect, size, - StringUtil::UTF8StringToWideString(file_mapping_name).c_str()); -#endif if (!m_file_handle) { Log_ErrorPrintf("CreateFileMapping failed: %u", GetLastError()); @@ -254,16 +249,8 @@ void* MemoryArena::CreateViewPtr(size_t offset, size_t size, bool writable, bool void* base_pointer; #if defined(_WIN32) const DWORD desired_access = FILE_MAP_READ | (writable ? FILE_MAP_WRITE : 0) | (executable ? FILE_MAP_EXECUTE : 0); -#ifndef _UWP base_pointer = MapViewOfFileEx(m_file_handle, desired_access, Truncate32(offset >> 32), Truncate32(offset), size, fixed_address); -#else - // UWP does not support fixed mappings. - if (!fixed_address) - base_pointer = MapViewOfFileFromApp(m_file_handle, desired_access, offset, size); - else - base_pointer = nullptr; -#endif if (!base_pointer) return nullptr; #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) diff --git a/src/util/page_fault_handler.cpp b/src/util/page_fault_handler.cpp index ce806bfbb..cea0174b5 100644 --- a/src/util/page_fault_handler.cpp +++ b/src/util/page_fault_handler.cpp @@ -80,7 +80,7 @@ static bool IsStoreInstruction(const void* ptr) } #endif -#if defined(_WIN32) && !defined(_UWP) && (defined(CPU_X64) || defined(CPU_AARCH64)) +#if defined(_WIN32) && (defined(CPU_X64) || defined(CPU_AARCH64)) static PVOID s_veh_handle; static LONG ExceptionHandler(PEXCEPTION_POINTERS exi) @@ -116,145 +116,6 @@ static LONG ExceptionHandler(PEXCEPTION_POINTERS exi) return EXCEPTION_CONTINUE_SEARCH; } -u32 GetHandlerCodeSize() -{ - return 0; -} - -#elif defined(_UWP) - -// https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64?view=msvc-160 -struct UNWIND_INFO -{ - BYTE version : 3; - BYTE flags : 5; - BYTE size_of_prologue; - BYTE count_of_unwind_codes; - BYTE frame_register : 4; - BYTE frame_offset_scaled : 4; - ULONG exception_handler_address; -}; - -struct UnwindHandler -{ - RUNTIME_FUNCTION runtime_function; - UNWIND_INFO unwind_info; - uint8_t exception_handler_code[32]; -}; - -static constexpr size_t UNWIND_HANDLER_ALLOC_SIZE = 4096; -static_assert(sizeof(UnwindHandler) <= UNWIND_HANDLER_ALLOC_SIZE); - -static EXCEPTION_DISPOSITION UnwindExceptionHandler(PEXCEPTION_RECORD ExceptionRecord, ULONG64 EstablisherFrame, - PCONTEXT ContextRecord, PDISPATCHER_CONTEXT DispatcherContext) -{ - if (s_in_handler) - return ExceptionContinueSearch; - - s_in_handler = true; - - void* const exception_pc = reinterpret_cast(DispatcherContext->ControlPc); - void* const exception_address = reinterpret_cast(ExceptionRecord->ExceptionInformation[1]); - bool const is_write = ExceptionRecord->ExceptionInformation[0] == 1; - - std::lock_guard guard(m_handler_lock); - for (const RegisteredHandler& rh : m_handlers) - { - if (static_cast(exception_pc) >= static_cast(rh.start_pc) && - static_cast(exception_pc) <= (static_cast(rh.start_pc) + rh.code_size)) - { - if (rh.callback(exception_pc, exception_address, is_write) == HandlerResult::ContinueExecution) - { - s_in_handler = false; - return ExceptionContinueExecution; - } - } - } - - s_in_handler = false; - return ExceptionContinueSearch; -} - -static PRUNTIME_FUNCTION GetRuntimeFunctionCallback(DWORD64 ControlPc, PVOID Context) -{ - std::lock_guard guard(m_handler_lock); - for (const RegisteredHandler& rh : m_handlers) - { - if (ControlPc >= reinterpret_cast(rh.start_pc) && - ControlPc <= (reinterpret_cast(rh.start_pc) + rh.code_size)) - { - return reinterpret_cast(rh.start_pc); - } - } - - return nullptr; -} - -static bool InstallFunctionTableCallback(const void* owner, void* start_pc, u32 code_size) -{ - if (code_size < UNWIND_HANDLER_ALLOC_SIZE) - { - Log_ErrorPrintf("Invalid code size: %u @ %p", code_size, UNWIND_HANDLER_ALLOC_SIZE); - return false; - } - - if (!RtlInstallFunctionTableCallback(reinterpret_cast(owner) | 0x3, reinterpret_cast(start_pc), - static_cast(code_size), &GetRuntimeFunctionCallback, nullptr, nullptr)) - { - Log_ErrorPrintf("RtlInstallFunctionTableCallback() failed: %08X", GetLastError()); - return false; - } - - // This is only valid on x86 for now. -#ifndef CPU_X64 - Log_ErrorPrint("Exception unwind codegen not implemented"); - return false; -#else - UnwindHandler* uh = static_cast(start_pc); - ULONG old_protection; - if (!VirtualProtectFromApp(uh, UNWIND_HANDLER_ALLOC_SIZE, PAGE_READWRITE, &old_protection)) - { - Log_ErrorPrintf("VirtualProtectFromApp(RW) for exception handler failed: %08X", GetLastError()); - return false; - } - - uh->runtime_function.BeginAddress = UNWIND_HANDLER_ALLOC_SIZE; - uh->runtime_function.EndAddress = code_size; - uh->runtime_function.UnwindInfoAddress = offsetof(UnwindHandler, unwind_info); - - uh->unwind_info.version = 1; - uh->unwind_info.flags = UNW_FLAG_EHANDLER; - uh->unwind_info.size_of_prologue = 0; - uh->unwind_info.count_of_unwind_codes = 0; - uh->unwind_info.frame_register = 0; - uh->unwind_info.frame_offset_scaled = 0; - uh->unwind_info.exception_handler_address = offsetof(UnwindHandler, exception_handler_code); - - // mov rax, handler - const void* handler = UnwindExceptionHandler; - uh->exception_handler_code[0] = 0x48; - uh->exception_handler_code[1] = 0xb8; - std::memcpy(&uh->exception_handler_code[2], &handler, sizeof(handler)); - - // jmp rax - uh->exception_handler_code[10] = 0xff; - uh->exception_handler_code[11] = 0xe0; - - if (!VirtualProtectFromApp(uh, UNWIND_HANDLER_ALLOC_SIZE, PAGE_EXECUTE_READ, &old_protection)) - { - Log_ErrorPrintf("VirtualProtectFromApp(RX) for exception handler failed: %08X", GetLastError()); - return false; - } - - return true; -#endif -} - -u32 GetHandlerCodeSize() -{ - return UNWIND_HANDLER_ALLOC_SIZE; -} - #elif defined(USE_SIGSEGV) static struct sigaction s_old_sigsegv_action; @@ -345,18 +206,6 @@ static void SIGSEGVHandler(int sig, siginfo_t* info, void* ctx) sa.sa_handler(sig); } -u32 GetHandlerCodeSize() -{ - return 0; -} - -#else - -u32 GetHandlerCodeSize() -{ - return 0; -} - #endif bool InstallHandler(const void* owner, void* start_pc, u32 code_size, Callback callback) @@ -375,19 +224,13 @@ bool InstallHandler(const void* owner, void* start_pc, u32 code_size, Callback c if (was_empty) { -#if defined(_WIN32) && !defined(_UWP) && (defined(CPU_X64) || defined(CPU_AARCH64)) +#if defined(_WIN32) && (defined(CPU_X64) || defined(CPU_AARCH64)) s_veh_handle = AddVectoredExceptionHandler(1, ExceptionHandler); if (!s_veh_handle) { Log_ErrorPrint("Failed to add vectored exception handler"); return false; } -#elif defined(_UWP) - if (!InstallFunctionTableCallback(owner, start_pc, code_size)) - { - Log_ErrorPrint("Failed to install function table callback"); - return false; - } #elif defined(USE_SIGSEGV) struct sigaction sa = {}; sa.sa_sigaction = SIGSEGVHandler; @@ -427,11 +270,9 @@ bool RemoveHandler(const void* owner) if (m_handlers.empty()) { -#if defined(_WIN32) && !defined(_UWP) && (defined(CPU_X64) || defined(CPU_AARCH64)) +#if defined(_WIN32) && (defined(CPU_X64) || defined(CPU_AARCH64)) RemoveVectoredExceptionHandler(s_veh_handle); s_veh_handle = nullptr; -#elif defined(_UWP) - // nothing to do here, any unregistered regions will be ignored #elif defined(USE_SIGSEGV) // restore old signal handler #if defined(__APPLE__) || defined(__aarch64__) diff --git a/src/util/page_fault_handler.h b/src/util/page_fault_handler.h index 695b39fb7..5e2996c5a 100644 --- a/src/util/page_fault_handler.h +++ b/src/util/page_fault_handler.h @@ -11,8 +11,6 @@ enum class HandlerResult using Callback = HandlerResult (*)(void* exception_pc, void* fault_address, bool is_write); using Handle = void*; -u32 GetHandlerCodeSize(); - bool InstallHandler(const void* owner, void* start_pc, u32 code_size, Callback callback); bool RemoveHandler(const void* owner);