diff options
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| m--------- | externals/vcpkg | 0 | ||||
| -rw-r--r-- | src/common/zstd_compression.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/nfc/nfc_device.cpp | 16 | ||||
| -rw-r--r-- | src/core/hle/service/nfc/nfc_device.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/nfp/nfp_device.cpp | 16 | ||||
| -rw-r--r-- | src/core/hle/service/nfp/nfp_device.h | 1 | ||||
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 63 | ||||
| -rw-r--r-- | vcpkg.json | 2 |
9 files changed, 65 insertions, 38 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6932b6fab..61c95444f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -210,7 +210,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) | |||
| 210 | # ======================================================================= | 210 | # ======================================================================= |
| 211 | 211 | ||
| 212 | # Enforce the search mode of non-required packages for better and shorter failure messages | 212 | # Enforce the search mode of non-required packages for better and shorter failure messages |
| 213 | find_package(Boost 1.73.0 REQUIRED context) | 213 | find_package(Boost 1.81.0 REQUIRED context) |
| 214 | find_package(enet 1.3 MODULE) | 214 | find_package(enet 1.3 MODULE) |
| 215 | find_package(fmt 9 REQUIRED) | 215 | find_package(fmt 9 REQUIRED) |
| 216 | find_package(inih 52 MODULE COMPONENTS INIReader) | 216 | find_package(inih 52 MODULE COMPONENTS INIReader) |
diff --git a/externals/vcpkg b/externals/vcpkg | |||
| Subproject 9b22b40c6c61bf0da2d46346dd44a11e90972cc | Subproject a7b6122f6b6504d16d96117336a056269357993 | ||
diff --git a/src/common/zstd_compression.cpp b/src/common/zstd_compression.cpp index b71a41b78..cb6ec171b 100644 --- a/src/common/zstd_compression.cpp +++ b/src/common/zstd_compression.cpp | |||
| @@ -33,7 +33,7 @@ std::vector<u8> CompressDataZSTDDefault(const u8* source, std::size_t source_siz | |||
| 33 | 33 | ||
| 34 | std::vector<u8> DecompressDataZSTD(std::span<const u8> compressed) { | 34 | std::vector<u8> DecompressDataZSTD(std::span<const u8> compressed) { |
| 35 | const std::size_t decompressed_size = | 35 | const std::size_t decompressed_size = |
| 36 | ZSTD_getDecompressedSize(compressed.data(), compressed.size()); | 36 | ZSTD_getFrameContentSize(compressed.data(), compressed.size()); |
| 37 | std::vector<u8> decompressed(decompressed_size); | 37 | std::vector<u8> decompressed(decompressed_size); |
| 38 | 38 | ||
| 39 | const std::size_t uncompressed_result_size = ZSTD_decompress( | 39 | const std::size_t uncompressed_result_size = ZSTD_decompress( |
diff --git a/src/core/hle/service/nfc/nfc_device.cpp b/src/core/hle/service/nfc/nfc_device.cpp index 3f17d0c7a..c7db74d14 100644 --- a/src/core/hle/service/nfc/nfc_device.cpp +++ b/src/core/hle/service/nfc/nfc_device.cpp | |||
| @@ -42,8 +42,18 @@ NfcDevice::~NfcDevice() { | |||
| 42 | }; | 42 | }; |
| 43 | 43 | ||
| 44 | void NfcDevice::NpadUpdate(Core::HID::ControllerTriggerType type) { | 44 | void NfcDevice::NpadUpdate(Core::HID::ControllerTriggerType type) { |
| 45 | if (type == Core::HID::ControllerTriggerType::Connected || | 45 | if (!is_initalized) { |
| 46 | type == Core::HID::ControllerTriggerType::Disconnected) { | 46 | return; |
| 47 | } | ||
| 48 | |||
| 49 | if (type == Core::HID::ControllerTriggerType::Connected) { | ||
| 50 | Initialize(); | ||
| 51 | availability_change_event->Signal(); | ||
| 52 | return; | ||
| 53 | } | ||
| 54 | |||
| 55 | if (type == Core::HID::ControllerTriggerType::Disconnected) { | ||
| 56 | device_state = NFP::DeviceState::Unavailable; | ||
| 47 | availability_change_event->Signal(); | 57 | availability_change_event->Signal(); |
| 48 | return; | 58 | return; |
| 49 | } | 59 | } |
| @@ -113,6 +123,7 @@ void NfcDevice::Initialize() { | |||
| 113 | device_state = | 123 | device_state = |
| 114 | npad_device->HasNfc() ? NFP::DeviceState::Initialized : NFP::DeviceState::Unavailable; | 124 | npad_device->HasNfc() ? NFP::DeviceState::Initialized : NFP::DeviceState::Unavailable; |
| 115 | encrypted_tag_data = {}; | 125 | encrypted_tag_data = {}; |
| 126 | is_initalized = true; | ||
| 116 | } | 127 | } |
| 117 | 128 | ||
| 118 | void NfcDevice::Finalize() { | 129 | void NfcDevice::Finalize() { |
| @@ -121,6 +132,7 @@ void NfcDevice::Finalize() { | |||
| 121 | StopDetection(); | 132 | StopDetection(); |
| 122 | } | 133 | } |
| 123 | device_state = NFP::DeviceState::Unavailable; | 134 | device_state = NFP::DeviceState::Unavailable; |
| 135 | is_initalized = false; | ||
| 124 | } | 136 | } |
| 125 | 137 | ||
| 126 | Result NfcDevice::StartDetection(NFP::TagProtocol allowed_protocol) { | 138 | Result NfcDevice::StartDetection(NFP::TagProtocol allowed_protocol) { |
diff --git a/src/core/hle/service/nfc/nfc_device.h b/src/core/hle/service/nfc/nfc_device.h index a6e114d36..ea63f0537 100644 --- a/src/core/hle/service/nfc/nfc_device.h +++ b/src/core/hle/service/nfc/nfc_device.h | |||
| @@ -67,6 +67,7 @@ private: | |||
| 67 | Kernel::KEvent* deactivate_event = nullptr; | 67 | Kernel::KEvent* deactivate_event = nullptr; |
| 68 | Kernel::KEvent* availability_change_event = nullptr; | 68 | Kernel::KEvent* availability_change_event = nullptr; |
| 69 | 69 | ||
| 70 | bool is_initalized{}; | ||
| 70 | NFP::TagProtocol allowed_protocols{}; | 71 | NFP::TagProtocol allowed_protocols{}; |
| 71 | NFP::DeviceState device_state{NFP::DeviceState::Unavailable}; | 72 | NFP::DeviceState device_state{NFP::DeviceState::Unavailable}; |
| 72 | 73 | ||
diff --git a/src/core/hle/service/nfp/nfp_device.cpp b/src/core/hle/service/nfp/nfp_device.cpp index 268337d2e..5990e1473 100644 --- a/src/core/hle/service/nfp/nfp_device.cpp +++ b/src/core/hle/service/nfp/nfp_device.cpp | |||
| @@ -66,8 +66,18 @@ NfpDevice::~NfpDevice() { | |||
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | void NfpDevice::NpadUpdate(Core::HID::ControllerTriggerType type) { | 68 | void NfpDevice::NpadUpdate(Core::HID::ControllerTriggerType type) { |
| 69 | if (type == Core::HID::ControllerTriggerType::Connected || | 69 | if (!is_initalized) { |
| 70 | type == Core::HID::ControllerTriggerType::Disconnected) { | 70 | return; |
| 71 | } | ||
| 72 | |||
| 73 | if (type == Core::HID::ControllerTriggerType::Connected) { | ||
| 74 | Initialize(); | ||
| 75 | availability_change_event->Signal(); | ||
| 76 | return; | ||
| 77 | } | ||
| 78 | |||
| 79 | if (type == Core::HID::ControllerTriggerType::Disconnected) { | ||
| 80 | device_state = DeviceState::Unavailable; | ||
| 71 | availability_change_event->Signal(); | 81 | availability_change_event->Signal(); |
| 72 | return; | 82 | return; |
| 73 | } | 83 | } |
| @@ -145,6 +155,7 @@ void NfpDevice::Initialize() { | |||
| 145 | device_state = npad_device->HasNfc() ? DeviceState::Initialized : DeviceState::Unavailable; | 155 | device_state = npad_device->HasNfc() ? DeviceState::Initialized : DeviceState::Unavailable; |
| 146 | encrypted_tag_data = {}; | 156 | encrypted_tag_data = {}; |
| 147 | tag_data = {}; | 157 | tag_data = {}; |
| 158 | is_initalized = true; | ||
| 148 | } | 159 | } |
| 149 | 160 | ||
| 150 | void NfpDevice::Finalize() { | 161 | void NfpDevice::Finalize() { |
| @@ -155,6 +166,7 @@ void NfpDevice::Finalize() { | |||
| 155 | StopDetection(); | 166 | StopDetection(); |
| 156 | } | 167 | } |
| 157 | device_state = DeviceState::Unavailable; | 168 | device_state = DeviceState::Unavailable; |
| 169 | is_initalized = false; | ||
| 158 | } | 170 | } |
| 159 | 171 | ||
| 160 | Result NfpDevice::StartDetection(TagProtocol allowed_protocol) { | 172 | Result NfpDevice::StartDetection(TagProtocol allowed_protocol) { |
diff --git a/src/core/hle/service/nfp/nfp_device.h b/src/core/hle/service/nfp/nfp_device.h index 8813df998..27122e86e 100644 --- a/src/core/hle/service/nfp/nfp_device.h +++ b/src/core/hle/service/nfp/nfp_device.h | |||
| @@ -92,6 +92,7 @@ private: | |||
| 92 | Kernel::KEvent* deactivate_event = nullptr; | 92 | Kernel::KEvent* deactivate_event = nullptr; |
| 93 | Kernel::KEvent* availability_change_event = nullptr; | 93 | Kernel::KEvent* availability_change_event = nullptr; |
| 94 | 94 | ||
| 95 | bool is_initalized{}; | ||
| 95 | bool is_data_moddified{}; | 96 | bool is_data_moddified{}; |
| 96 | bool is_app_area_open{}; | 97 | bool is_app_area_open{}; |
| 97 | TagProtocol allowed_protocols{}; | 98 | TagProtocol allowed_protocols{}; |
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 8e8b9a5e6..858449af8 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -1616,37 +1616,38 @@ void TextureCache<P>::ForEachImageInRegionGPU(size_t as_id, GPUVAddr gpu_addr, s | |||
| 1616 | return; | 1616 | return; |
| 1617 | } | 1617 | } |
| 1618 | auto& gpu_page_table = gpu_page_table_storage[*storage_id]; | 1618 | auto& gpu_page_table = gpu_page_table_storage[*storage_id]; |
| 1619 | ForEachGPUPage(gpu_addr, size, [this, gpu_page_table, &images, gpu_addr, size, func](u64 page) { | 1619 | ForEachGPUPage(gpu_addr, size, |
| 1620 | const auto it = gpu_page_table.find(page); | 1620 | [this, &gpu_page_table, &images, gpu_addr, size, func](u64 page) { |
| 1621 | if (it == gpu_page_table.end()) { | 1621 | const auto it = gpu_page_table.find(page); |
| 1622 | if constexpr (BOOL_BREAK) { | 1622 | if (it == gpu_page_table.end()) { |
| 1623 | return false; | 1623 | if constexpr (BOOL_BREAK) { |
| 1624 | } else { | 1624 | return false; |
| 1625 | return; | 1625 | } else { |
| 1626 | } | 1626 | return; |
| 1627 | } | 1627 | } |
| 1628 | for (const ImageId image_id : it->second) { | 1628 | } |
| 1629 | Image& image = slot_images[image_id]; | 1629 | for (const ImageId image_id : it->second) { |
| 1630 | if (True(image.flags & ImageFlagBits::Picked)) { | 1630 | Image& image = slot_images[image_id]; |
| 1631 | continue; | 1631 | if (True(image.flags & ImageFlagBits::Picked)) { |
| 1632 | } | 1632 | continue; |
| 1633 | if (!image.OverlapsGPU(gpu_addr, size)) { | 1633 | } |
| 1634 | continue; | 1634 | if (!image.OverlapsGPU(gpu_addr, size)) { |
| 1635 | } | 1635 | continue; |
| 1636 | image.flags |= ImageFlagBits::Picked; | 1636 | } |
| 1637 | images.push_back(image_id); | 1637 | image.flags |= ImageFlagBits::Picked; |
| 1638 | if constexpr (BOOL_BREAK) { | 1638 | images.push_back(image_id); |
| 1639 | if (func(image_id, image)) { | 1639 | if constexpr (BOOL_BREAK) { |
| 1640 | return true; | 1640 | if (func(image_id, image)) { |
| 1641 | } | 1641 | return true; |
| 1642 | } else { | 1642 | } |
| 1643 | func(image_id, image); | 1643 | } else { |
| 1644 | } | 1644 | func(image_id, image); |
| 1645 | } | 1645 | } |
| 1646 | if constexpr (BOOL_BREAK) { | 1646 | } |
| 1647 | return false; | 1647 | if constexpr (BOOL_BREAK) { |
| 1648 | } | 1648 | return false; |
| 1649 | }); | 1649 | } |
| 1650 | }); | ||
| 1650 | for (const ImageId image_id : images) { | 1651 | for (const ImageId image_id : images) { |
| 1651 | slot_images[image_id].flags &= ~ImageFlagBits::Picked; | 1652 | slot_images[image_id].flags &= ~ImageFlagBits::Picked; |
| 1652 | } | 1653 | } |
diff --git a/vcpkg.json b/vcpkg.json index fbadca0e6..9aadd367c 100644 --- a/vcpkg.json +++ b/vcpkg.json | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | { | 1 | { |
| 2 | "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", | 2 | "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", |
| 3 | "name": "yuzu", | 3 | "name": "yuzu", |
| 4 | "builtin-baseline": "9b22b40c6c61bf0da2d46346dd44a11e90972cc9", | 4 | "builtin-baseline": "a7b6122f6b6504d16d96117336a0562693579933", |
| 5 | "version": "1.0", | 5 | "version": "1.0", |
| 6 | "dependencies": [ | 6 | "dependencies": [ |
| 7 | "boost-algorithm", | 7 | "boost-algorithm", |