Commit graph

189 commits

Author SHA1 Message Date
Weiyi Wang
a6d9baa05a FS: pass down program ID for archive operation
To eliminate System::GetInstance usage. Archive type like SelfNCCH and SaveData changes the actual reference path for different client, so archive backend interface should accept client information from the service interface. Currently we only pass the program ID as the client information.
2019-02-02 20:44:13 -05:00
Weiyi Wang
0478bc3dee Kernel/Thread: move thread queue, current thread, and scheduling related function into the manager
As we touched it, remove IPC::GetCommandBuffer
2018-10-26 16:07:11 -04:00
Weiyi Wang
d9342622b0 kennel/process: move process list to kernel instance 2018-10-22 21:32:34 -04:00
Weiyi Wang
13c26b4371 Kernel: pass ref to session pair 2018-10-18 21:41:36 -04:00
Weiyi Wang
0962ab8da9
Merge pull request #4305 from wwylele/fs-global
FS/archive: wrap states into ArchiveManager class
2018-10-11 13:04:02 -04:00
Weiyi Wang
756a3d404a
Merge pull request #4283 from valentinvanelslande/seed-db
Implement SeedDB & Seed Crypto
2018-10-08 14:18:42 -04:00
Valentin Vanelslande
7b6c5cd988
fix reply header 2018-10-06 16:59:57 -05:00
Weiyi Wang
389d3d630e fs/archive: wrap states into archive manager 2018-10-06 01:23:03 -04:00
Weiyi Wang
7678327bf2 fs/archive: move file and directory classes to their own files 2018-10-06 01:23:03 -04:00
Weiyi Wang
b163502744
Core: pass down Core::System reference to all services (#4272)
* Core: pass down Core::System reference to all services

This has to be done at once due to unified interface used by HLE/LLE switcher

* apt: eliminate Core::System::GetInstance

* gpu_gsp: eliminate Core::System::GetInstance in service

* hid: eliminate Core::System::GetInstance

* nwm: eliminate Core::System::GetInstance

* err_f: eliminate Core::System::GetInstance
2018-10-05 10:59:43 -04:00
Sebastian Valle
3790ccc7b2
Merge pull request #4287 from Subv/am_subfile
Services/AM: Support using FS subfiles with the CIA-related service functions.
2018-10-03 10:13:46 -05:00
Subv
5165b63512 Services/AM: Support using FS subfiles with the CIA-related service functions.
FS subfiles are created with File::OpenSubFile, they have a start offset that must be added to all read/write operations.

The implementation in this commit is done using a new FileBackend that wraps the FS::File along with the start offset.
2018-10-03 09:57:05 -05:00
Valentin Vanelslande
b067b5aa5a Implement SeedDB & Seed Crypto 2018-10-02 10:12:40 -05:00
Weiyi Wang
b03332d09b fs: remove ArchiveFactory_ExtSaveData::Initialize
This is unnecessary as any open archive would create the full path for themselves
2018-09-28 17:08:39 -04:00
Weiyi Wang
f05740a5fd
Merge pull request #4224 from FearlessTobi/port-1310
Port #734 and #1310 from yuzu: Changes to Thread-related enums
2018-09-25 23:07:43 -04:00
Weiyi Wang
20e42592ff
Merge pull request #4249 from FearlessTobi/port-760
Port yuzu-emu/yuzu#760: "file_util: Use an enum class for GetUserPath()"
2018-09-22 23:42:59 -04:00
Lioncash
b3221c3180 file_util: Use an enum class for GetUserPath()
Instead of using an unsigned int as a parameter and expecting a user to
always pass in the correct values, we can just convert the enum into an
enum class and use that type as the parameter type instead, which makes
the interface more type safe.

We also get rid of the bookkeeping "NUM_" element in the enum by just
using an unordered map. This function is generally low-frequency in
terms of calls (and I'd hope so, considering otherwise would mean we're
slamming the disk with IO all the time) so I'd consider this acceptable
in this case.
2018-09-22 21:18:56 +02:00
Lioncash
46da908a00 service: Use nested namespace specifiers where applicable
There were a few places where nested namespace specifiers weren't being
used where they could be within the service code. This amends that to
make the namespacing a tiny bit more compact.
2018-09-22 16:14:10 +02:00
Lioncash
ca3d9d659e kernel/thread: Include thread-related enums within the kernel namespace
Previously, these were sitting outside of the Kernel namespace, which
doesn't really make sense, given they're related to the Thread class
which is within the Kernel namespace.
2018-09-15 17:16:20 +02:00
Weiyi Wang
7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
BreadFish64
74cd98ecad core: clean up warnings 2018-08-01 14:10:23 -05:00
zhupengfei
a9e922e68f service/fs: implement obsoleted Create/DeleteExtSaveData (#3948)
* service/fs: implement obsoleted Create/DeleteExtSaveData

* service/fs: remove the STUBBED warning
2018-07-17 17:59:42 +03:00
wwylele
0eab948728 reformat all files with clang-format 2018-06-29 16:56:12 +03:00
wwylele
7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
wwylele
5150de8613 FS: fix log with incorrect type 2018-06-27 17:15:01 +03:00
NarcolepticK
a42287587e service/fs: Migrate logging macros (#3866)
* service/fs: Migrate logging macros

* service/fs: Fix clang format
2018-06-22 13:33:30 +03:00
James Rowe
f61141e86a Update the entire application to use the new clang format style 2018-03-09 10:54:43 -07:00
James Rowe
f3234db5e2
Merge pull request #3440 from B3n30/file_read_delay
File_Sys: Add a size dependent delay for each file read
2018-03-04 21:32:50 -07:00
wwylele
61e5f320c9 ipc_helpers: remove some deprecated functions 2018-03-02 02:53:59 +02:00
B3n30
143878a474 Rebased usage of SleepClientThread 2018-02-24 14:25:02 +01:00
B3n30
58b16c5459 File_Sys: Add a size dependend delay for each file read 2018-02-24 14:15:57 +01:00
wwylele
e003e75dc5 FS: fix wrong response header of Initialize 2018-02-16 21:33:39 +02:00
wwylele
6c6e42375c FS: correct maximum session
the number is got from FS module code
2018-02-15 23:28:03 +02:00
wwylele
36169144b5 FS: fix documentation of service functions 2018-02-15 23:03:21 +02:00
wwylele
71fac7bd72 FS: convert to service framework 2018-02-15 23:02:09 +02:00
wwylele
19d7324075 fs/archive: convert Directory to ServiceFramework 2018-02-14 21:47:08 +02:00
wwylele
4935dcaf56 fs/archive: remove dead code
the std::hash bug is fixed in gcc 6.1, and we are now targeting 7.0 , so the workaround is no longer needed
2018-02-14 19:49:54 +02:00
Cuyler36
71c7dddac4 Service/FS_User: Stub Secure Value Functions
Stubbing these functions results in save loading fixes in games which require a secure value.

An example is shown here with Animal Crossing: New Leaf:
[Before](https://puu.sh/zidZC/f1523e81cb.png)

[After](https://puu.sh/zifeT/57026eae44.png)
2018-02-06 19:31:22 -05:00
Sebastian Valle
125f5d1e68
Merge pull request #3284 from Subv/session_data
HLE/Services: Allow specifying a SessionData template parameter to ServiceFramework.
2017-12-16 09:14:34 -05:00
Subv
b5bfaaae29 HLE/FS: Use the SessionData parameter of ServiceFramework in the File class. 2017-12-14 18:24:03 -05:00
Subv
daecd812b0 HLE/Services: Allow specifying a SessionData template parameter to ServiceFramework.
Some services can have multiple clients at the same time, and they identify the different clients using the server session as a key.
This parameter (if present) should be a structure that contains the per-session data for each service.
The data can be retrieved using ServiceFramework::GetSessionData(session)
2017-12-14 18:24:02 -05:00
Subv
2552efac01 HLE/FS: Use PopEnum in OpenFile. 2017-12-13 19:51:36 -05:00
Subv
d790ac465c HLE/FS: Use IPCHelper in CreateFile. 2017-12-13 19:51:21 -05:00
Subv
92e71aff57 HLE/FS: Use IPCHelper in DeleteDirectoryRecursively. 2017-12-12 17:48:15 -05:00
Subv
67382e46c0 HLE/FS: Use IPCHelper in DeleteDirectory. 2017-12-12 17:48:12 -05:00
Subv
b631f77d11 HLE/FS: Use IPCHelper in RenameFile. 2017-12-12 17:48:10 -05:00
Subv
a6c69bfca0 HLE/FS: Use IPCHelper in DeleteFile. 2017-12-12 17:48:07 -05:00
Subv
e9a70ce2fc HLE/FS: Use IPCHelper in OpenFileDirectly. 2017-12-12 17:48:03 -05:00
Subv
c9ddd5b0ae HLE/FS: Implemented FSFile::OpenSubFile.
The File class now holds a list of connected sessions along with data unique to each session.

A subfile is a window into an existing file. They have a few limitations compared to normal files:

* They can't be written to.
* They can't be flushed.
* Their size can not be changed.
* New subfiles can't be created from another subfile.
2017-12-12 13:34:02 -05:00
Merry
5c802d35ef
Merge pull request #3262 from lioncash/warn
common/core: Silence initialization order warnings
2017-12-11 19:52:53 +00:00