diff options
| author | Maufeat <sahyno1996@gmail.com> | 2026-08-29 01:04:02 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-08-29 01:04:02 +0200 |
| commit | 54cd5fb8ebf11b71c676b72a32811873caef20de (patch) | |
| tree | 20fef6adb49da98d3d87ae152853229bf762a3bb /src/core/file_sys/fssystem | |
| parent | 119291dc77fbe8e4a23eaafa8420c1c8577d1b59 (diff) | |
[core, hle, video_core, memory] Improve multi-process, display layers, dynamic shader cache and rework overlay (#4238)
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.
-------------------
- Dynamic shader cache reloading capability for qlaunch
- Multi-process improvements (thanks to @frank1734), instead of just using the main application we now respect caller process (also did it for HID devices while I was at it)
- Layer stack masks & shared buffer screenshot for video core, added different masks (screenshot, recording, etc.) this was discovered as an issue due to how in qlaunch the transition was not right between applications. May not be perfect but also fixes screenshots while using qlaunch
- Reworked overlay display management (input and visibility) - instead of random numbers as I've previously did, I decided to add an AppletZIndex enum for better readability. Also split capability of input by touch and gamepad.
- etc.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4238
Reviewed-by: Samuel <lizzie@eden-emu.dev>
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Diffstat (limited to 'src/core/file_sys/fssystem')
| -rw-r--r-- | src/core/file_sys/fssystem/fssystem_indirect_storage.cpp | 13 | ||||
| -rw-r--r-- | src/core/file_sys/fssystem/fssystem_indirect_storage.h | 12 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/core/file_sys/fssystem/fssystem_indirect_storage.cpp b/src/core/file_sys/fssystem/fssystem_indirect_storage.cpp index 41f5b75b6e..e66ce49d9a 100644 --- a/src/core/file_sys/fssystem/fssystem_indirect_storage.cpp +++ b/src/core/file_sys/fssystem/fssystem_indirect_storage.cpp @@ -4,6 +4,7 @@ // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "common/logging.h" #include "core/file_sys/errors.h" #include "core/file_sys/fssystem/fssystem_indirect_storage.h" @@ -99,6 +100,18 @@ Result IndirectStorage::GetEntryList(Entry* out_entries, s32* out_entry_count, s R_SUCCEED(); } +void IndirectStorage::ReportMissingOriginal(s64 offset, s64 size) { + if (m_reported_missing_original) { + return; + } + m_reported_missing_original = true; + + LOG_ERROR(Common_Filesystem, + "Patch storage requests {:#x} bytes at {:#x} from a base storage that is not " + "present; this data will read as garbage", + size, offset); +} + size_t IndirectStorage::Read(u8* buffer, size_t size, size_t offset) const { // Validate pre-conditions. ASSERT(this->IsInitialized()); diff --git a/src/core/file_sys/fssystem/fssystem_indirect_storage.h b/src/core/file_sys/fssystem/fssystem_indirect_storage.h index cc7b5cd718..81f94e2e19 100644 --- a/src/core/file_sys/fssystem/fssystem_indirect_storage.h +++ b/src/core/file_sys/fssystem/fssystem_indirect_storage.h @@ -85,6 +85,9 @@ public: void SetStorage(s32 idx, VirtualFile storage) { ASSERT(0 <= idx && idx < StorageCount); m_data_storage[idx] = storage; + if (idx == 0) { + m_original_missing = storage == nullptr || storage->GetSize() == 0; + } } template <typename T> @@ -130,6 +133,9 @@ protected: template <bool ContinuousCheck, bool RangeCheck, typename F> Result OperatePerEntry(s64 offset, s64 size, F func); + // Launching another game makes the original storage inaccessable. + // This is a helper for multi-nca games. + void ReportMissingOriginal(s64 offset, s64 size); private: struct ContinuousReadingEntry { @@ -154,6 +160,8 @@ private: private: mutable BucketTree m_table; std::array<VirtualFile, StorageCount> m_data_storage; + bool m_original_missing{false}; + bool m_reported_missing_original{false}; }; template <bool ContinuousCheck, bool RangeCheck, typename F> @@ -272,6 +280,10 @@ Result IndirectStorage::OperatePerEntry(s64 offset, s64 size, F func) { if (needs_operate) { const auto cur_entry_phys_offset = cur_entry.GetPhysicalOffset(); + if (cur_entry.storage_index == 0 && m_original_missing) { + this->ReportMissingOriginal(cur_offset, cur_size); + } + if constexpr (RangeCheck) { // Get the current data storage's size. s64 cur_data_storage_size = m_data_storage[cur_entry.storage_index]->GetSize(); |
