Commit graph

115 commits

Author SHA1 Message Date
f786802b9b User Data Migration from Citron, Sudachi, and Yuzu (#91)
Includes citron, sudachi, yuzu

currently broken, because the eden dir is always made early?

Signed-off-by: swurl <swurl@swurl.xyz>

Reviewed-on: #91
Co-authored-by: swurl <swurl@swurl.xyz>
Co-committed-by: swurl <swurl@swurl.xyz>
2025-05-08 22:16:07 +00:00
FearlessTobi
3f6c5a0a08 fs/errors: Unify naming of result codes 2024-01-25 16:42:06 -05:00
FearlessTobi
4b7bb232f2 fs: Replace Mode enum by OpenMode enum 2024-01-25 16:42:05 -05:00
FearlessTobi
24f979a4b8 vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
FearlessTobi
3587a4dcee fs: Move fsp_srv subclasses to separate files
fs: Move additional files to the fsp directory
2024-01-25 16:40:42 -05:00
Liam
2397093e4f fsp-srv: use program registry for SetCurrentProcess 2024-01-11 11:28:52 -05:00
BreadFish64
d1ee9e48d9 Improve path splitting speed 2023-12-05 23:17:19 -05:00
FearlessTobi
87575638fe filesystem: Return correct error for RenameFile when dest_path already exists
Allows Grid Autosport to boot.

Fixes https://github.com/yuzu-emu/yuzu/issues/8287.
2023-08-24 17:07:39 +02:00
Liam
5e3139e7c6 vfs: expand support for NCA reading 2023-08-15 17:47:25 -04:00
Liam
79259430fd fs: return result on null outputs 2023-08-08 16:12:04 -04:00
Liam
580f7f2ff1 general: fix incorrect conversions 2023-08-08 11:09:37 -04:00
Liam
5f2c56cd15 core: remove ResultVal type 2023-08-08 11:09:37 -04:00
Liam
1c3a93e7c4 service: refactor server architecture
Converts services to have their own processes
2023-02-21 12:19:25 -05:00
Liam
c68577384a general: rename CurrentProcess to ApplicationProcess 2023-02-13 19:03:12 -05:00
german77
c7890ebccc core: Replace all instances of ResultCode with Result 2022-06-26 20:21:37 -05:00
Morph
2b87305d31 general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
Andrea Pappacoda
d9044f00e1 fix: typos 2022-04-02 16:34:07 +02:00
Morph
41a0c088ba general: Get the current process program id directly from the system
This allows us to avoid including KProcess' header file in files that only need to get the current process' program id.
2021-11-04 16:59:39 -04:00
Morph
10508e7af2 general: Rename GetTitleID to GetProgramID 2021-11-04 16:57:16 -04:00
ameerj
d27abf5546 core: Remove unused includes 2021-11-03 21:42:57 -04:00
Morph
fddd57db61 general: Remove MakeResult helpers
This is made obsolete by the presence of implicit constructors.
2021-11-02 17:23:19 -04:00
Morph
65c2d00bd9 vfs: Partially implement GetFileTimeStampRaw
Gets rid of homebrew warnings using this func
2021-09-14 08:48:01 -04:00
Morph
9191db654d FS: Mark recursive CreateDirectory as inaccurate and temporary 2021-09-12 14:06:01 -04:00
Chloe
82fca3ab45 Addressed issues
Co-authored-by: Mai M. <mathew1800@gmail.com>
2021-09-09 03:00:08 +10:00
Chloe Marcec
2cf086d244 FS: Recursively create directories for CreateDirectory
Originally we only created the parent directory, this caused issues for creating directories which also contained subdirectories, eg `/Folder1/Folder2`

This allows the ultimate mod manager homebrew to at least boot
2021-09-06 19:35:55 +10:00
Morph
b3396ec358 filesystem: Open a read-only directory for SDMC mods
This prevents mod files from being locked due to the read-only share flag in Windows.
2021-06-28 10:08:08 -04:00
lat9nq
bc4dc2135e core: Simplify SDMC mod loading
If someone else wants to support other mod formats in the SDMC
directory, that can be added later. For now, just allow RomFS modding
here and force people to do other types of mods the old way.

Addresses review comments.

Co-authored-by: LC <mathew1800@gmail.com>
2021-06-28 10:08:08 -04:00
lat9nq
329398cd41 core: Support LayeredFS mod from SDMC directory
Enables loading a mod directly from `[yuzu data
directory]/sdmc/atmosphere/contents/[title_id]`. For use with some
homebrew mod managers.
2021-06-28 10:08:07 -04:00
Chloe
8eb5da9a7c fspsrv: Implement DisableAutoSaveDataCreation (#6355)
- Used by Mii Edit
2021-06-02 17:46:29 -07:00
Morph
c4d6d9dfd3 general: Replace RESULT_UNKNOWN with ResultUnknown
Transition to PascalCase for result names.
2021-06-02 00:39:27 -04:00
Morph
7ebc38a6d1 general: Replace RESULT_SUCCESS with ResultSuccess
Transition to PascalCase for result names.
2021-06-02 00:39:27 -04:00
Morph
e8f1d7145e common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)
* common: fs: fs_types: Create filesystem types

Contains various filesystem types used by the Common::FS library

* common: fs: fs_util: Add std::string to std::u8string conversion utility

* common: fs: path_util: Add utlity functions for paths

Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library

* common: fs: file: Rewrite the IOFile implementation

* common: fs: Reimplement Common::FS library using std::filesystem

* common: fs: fs_paths: Add fs_paths to replace common_paths

* common: fs: path_util: Add the rest of the path functions

* common: Remove the previous Common::FS implementation

* general: Remove unused fs includes

* string_util: Remove unused function and include

* nvidia_flags: Migrate to the new Common::FS library

* settings: Migrate to the new Common::FS library

* logging: backend: Migrate to the new Common::FS library

* core: Migrate to the new Common::FS library

* perf_stats: Migrate to the new Common::FS library

* reporter: Migrate to the new Common::FS library

* telemetry_session: Migrate to the new Common::FS library

* key_manager: Migrate to the new Common::FS library

* bis_factory: Migrate to the new Common::FS library

* registered_cache: Migrate to the new Common::FS library

* xts_archive: Migrate to the new Common::FS library

* service: acc: Migrate to the new Common::FS library

* applets/profile: Migrate to the new Common::FS library

* applets/web: Migrate to the new Common::FS library

* service: filesystem: Migrate to the new Common::FS library

* loader: Migrate to the new Common::FS library

* gl_shader_disk_cache: Migrate to the new Common::FS library

* nsight_aftermath_tracker: Migrate to the new Common::FS library

* vulkan_library: Migrate to the new Common::FS library

* configure_debug: Migrate to the new Common::FS library

* game_list_worker: Migrate to the new Common::FS library

* config: Migrate to the new Common::FS library

* configure_filesystem: Migrate to the new Common::FS library

* configure_per_game_addons: Migrate to the new Common::FS library

* configure_profile_manager: Migrate to the new Common::FS library

* configure_ui: Migrate to the new Common::FS library

* input_profiles: Migrate to the new Common::FS library

* yuzu_cmd: config: Migrate to the new Common::FS library

* yuzu_cmd: Migrate to the new Common::FS library

* vfs_real: Migrate to the new Common::FS library

* vfs: Migrate to the new Common::FS library

* vfs_libzip: Migrate to the new Common::FS library

* service: bcat: Migrate to the new Common::FS library

* yuzu: main: Migrate to the new Common::FS library

* vfs_real: Delete the contents of an existing file in CreateFile

Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now.

* input_profiles: Don't iterate the input profile dir if it does not exist

Silences an error produced in the log if the directory does not exist.

* game_list_worker: Skip parsing file if the returned VfsFile is nullptr

Prevents crashes in GetLoader when the virtual file is nullptr

* common: fs: Validate paths for path length

* service: filesystem: Open the mod load directory as read only
2021-05-25 19:32:56 -04:00
bunnei
ad048de3d6 hle: kernel: Rename Process to KProcess. 2021-05-05 16:40:52 -07:00
Morph
eb59a33d4e service: filesystem: Return proper error codes for CreateFile
This improves the accuracy of CreateFile by returning the correct error codes on certain conditions (parent directory does not exist, path already exists).

This fixes saving and the loading of existing saves in New Pokemon Snap
2021-05-01 09:33:00 -04:00
bunnei
7a76bc30fa common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07:00
bunnei
b87cc8b17e Merge pull request #5119 from Morph1984/fs-opendatastoragewithprogramindex
fsp_srv: Implement OpenDataStorageWithProgramIndex
2020-12-15 11:07:03 -08:00
Morph
419996f5db fsp_srv: Implement OpenDataStorageWithProgramIndex
- Used by RollerCoaster Tycoon 3: Complete Edition
2020-12-08 08:19:05 -05:00
Lioncash
8f135703dc core: Remove unnecessary enum casts in log calls
Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.
2020-12-07 23:02:23 -05:00
Lioncash
acf893542a savedata_factory: Eliminate usage of the global system instance
Now there's only two meaningful instances left in core.
2020-11-27 09:45:08 -05:00
Lioncash
346271b80b service: Eliminate usages of the global system instance
Completely removes all usages of the global system instance within the
services code by passing in the using system instance to the services.
2020-11-26 20:03:11 -05:00
Lioncash
b4b63c878f patch_manager: Remove usages of the global system instance
With this, only 19 usages of the global system instance remain within
the core library.

We're almost there.
2020-11-18 09:36:48 -05:00
Morph
585838ca42 filesystem: Fix CreateDirectory and DeleteFile
Add a check if dir is nullptr (does not exist)

Fixes save game creation in Hades
2020-10-13 00:57:04 -04:00
Lioncash
e45b727db5 file_sys/bis_factory: Eliminate usage of the global system accessor 2020-09-16 18:16:04 -04:00
Lioncash
a87209e09d common/fileutil: Convert namespace to Common::FS
Migrates a remaining common file over to the Common namespace, making it
consistent with the rest of common files.

This also allows for high-traffic FS related code to alias the
filesystem function namespace as

namespace FS = Common::FS;

for more concise typing.
2020-08-16 06:52:40 -04:00
Morph
06adef078c fs: Rename SaveDataDescriptor to SaveDataAttribute 2020-07-30 15:29:39 -04:00
Morph
6bba209bba Add comment to clarify the nullptr check 2020-07-16 00:15:27 -04:00
Morph
7f908ceb00 filesystem: Create subdirectories prior to creating a file
If subdirectories exist in the given path parameter and don't exist in the real filesystem create them prior to creating the files within.
This fixes the softlocks upon save creation in The Legend of Zelda: Breath of the Wild
2020-07-16 00:15:27 -04:00
Lioncash
02e095313a CMakeLists: Specify -Wextra on linux builds
Allows reporting more cases where logic errors may exist, such as
implicit fallthrough cases, etc.

We currently ignore unused parameters, since we currently have many
cases where this is intentional (virtual interfaces).

While we're at it, we can also tidy up any existing code that causes
warnings. This also uncovered a few bugs as well.
2020-04-15 21:33:46 -04:00
Lioncash
20d6637c03 service: Resolve sign conversion errors
These are fairly trivial to resolve and most of the changes entail
using RESULT_UNKNOWN over ResultCode(-1).
2019-11-12 07:55:39 -05:00
Lioncash
e4e4af80e8 hle/service: Replace global system instance calls with instance-based ones
Migrates the HLE service code off the use of directly accessing the
global system instance where trivially able to do so.

This removes all usages of Core::CurrentProcess from the service code,
only 8 occurrences of this function exist elsewhere. There's still quite
a bit of "System::GetInstance()" being used, however this was able to
replace a few instances.
2019-10-06 13:42:23 -04:00