Commit Graph

63 Commits

Author SHA1 Message Date
Steveice10 cca8c08a9a
build: Fix non-PCH build on Linux and add non-PCH verification to CI. (#7351) 2024-01-13 19:58:09 -08:00
Vitor K c8c2beaeff
misc: fix issues pointed out by msvc (#7316)
* do not move constant variables

* applet_manager: avoid possible use after move

* use constant references where pointed out by msvc

* extra_hid: initialize response

* ValidateSaveState: passing slot separately is not necessary

* common: mark HashCombine as nodiscard

* cityhash: remove use of using namespace std

* 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`
based on 7d8f115

* shared_memory.cpp: fix log error format

* fix compiling with pch off
2024-01-07 12:37:42 -08:00
GPUCode 5a7f615da1
kernel: Update to use atmosphere macros and correct Result (#7242)
* kernel: Switch to atmosphere style macros

* code: Rename ResultCode to Result

* code: Result constants are lower case

* Address review comments

* core: Remove CASCADE_CODE

* R_TRY replaces completely

* core: Run clang format
2023-12-31 09:01:40 -08:00
Daniel López Guimaraes b6b98af105
cecd: Stub GetCecInfoEventHandleSys (#7278)
This allows usage of the LLE news sysmodule.
2023-12-22 19:52:27 -08:00
Steveice10 327a00b4d5
externals: Update fmt. (#7015) 2023-09-27 03:29:13 -07:00
Steveice10 a27971e723
service/cecd: Fix buffer writes in ReadData. (#6880) 2023-08-11 10:31:24 -07:00
Steveice10 e043caac27
hle: Eliminate need to specify command headers for IPC. (#6678) 2023-07-14 17:32:59 -07:00
GPUCode cf9bb90ae3
code: Use std::span where appropriate (#6658)
* code: Use std::span when possible

* code: Prefix memcpy and memcmp with std::
2023-07-07 01:52:40 +03:00
GPUCode 2126c240cd
core: backport some ResultCode updates (#6645)
Co-authored-by: Lioncash <mathew1800@gmail.com>
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
2023-07-03 02:23:53 +02:00
Steveice10 3c15398f9e
apt: Implement additional applet state management. (#6303)
* apt: Implement additional library applet state management.

* kernel: Clear process handle table on exit.

* apt: Implement system applet commands.

* apt: Pop MediaType from command buffers with correct size.

* apt: Improve accuracy of parameters and HLE applet lifecycle.

* apt: General cleanup.

* file_sys: Make system save data open error code more correct.

Not sure if this is the exact right error code, but it's at least
more correct than before as Game Notes will now create its system
save data instead of throwing a fatal error.

* apt: Fix launching New 3DS Internet Browser.

* frd: Correct fix to GetMyScreenName response.
2023-02-28 14:09:54 +02:00
FearlessTobi da908a9ed1 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.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-12-29 06:39:21 +01:00
Tobias f6b543886c
Port yuzu-emu/yuzu#4528: "common: Make use of [[nodiscard]] where applicable" (#5535)
Co-authored-by: LC <712067+lioncash@users.noreply.github.com>
2020-08-31 21:06:16 +02:00
Mat M e9819b61a6
service: Mark variables as [[maybe_unused]] where applicable (#5318)
Quite a few service functions are stubbed but still pop all their
arguments, which can lead to unused variable warnings.

We can mark the unused arguments with [[maybe_unused]] to silence these
warnings until a full implementation of these functions are made.
2020-05-04 12:22:33 +02:00
Mat M 8014c67faa
service: Resolve trivially avoidable copies (#5237)
* am/am: Avoid redundant copy in GetProgramInfoFromCia()

We can just use a reference to the title metadata. Avoids copying
several data entries and std::vector instances that don't need to be
copied.

* hle/service: Avoid redundant copying of std::string

GetUserPath() returns the path as a reference, so we can make use of
said reference to avoid making copies.
2020-04-19 09:24:37 +02:00
Hamish Milne f156fdd332 clang format fixes etc. 2020-03-31 18:27:33 +01:00
Hamish Milne 6760ea18b6 Serialize ArchiveManager and other code review actions 2020-03-29 18:56:25 +01:00
Hamish Milne 04aa351c40 Code review - general gardening 2020-03-29 16:14:36 +01:00
zhupengfei 57efc41973
service/cecd: Add missing SessionData serialization 2020-02-14 17:15:08 +08:00
Hamish Milne e4afa8e512 Make the tests pass 2020-02-13 17:42:04 +08:00
Hamish Milne 2d2c7218ef Serialize CECD, CFG services 2020-02-13 17:41:25 +08:00
Ben f4da2de99a
Set accepted EULA version to max value (#4728)
* Set accepted EULA version to max value

CFG: write the max value of 0x7F7F to the default cfg savegame and
auto update on init

CECD: Actually read the EULA version from CFG
2019-04-23 23:18:27 +02:00
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 8fb3d8ff38 kernel/process: move current process to kernel instance
Two functional change:
QueryProcessMemory uses the process passed from handle instead current_process
Thread::Stop() uses TLS from owner_process instead of current_process
2018-10-22 21:32:34 -04:00
Weiyi Wang eec11a94cb Kernel: pass Kernel ref in Event 2018-10-18 21:41:36 -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
Weiyi Wang bb252ecab3 cecd: access FS via backend directly 2018-09-28 17:03:24 -04:00
Weiyi Wang 08bfba5d8e
Merge pull request #4005 from NarcolepticK/stub-cecd
service/cecd: Implement some functions
2018-09-27 10:08:14 -04: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
NarcolepticK 105bcc95c0 service/cecd: Add hmac handling 2018-09-10 19:53:23 -04:00
NarcolepticK 192a0f3b92 service/cecd: Update handling of /outbox/boxinfo and /outbox/obindex 2018-09-10 04:21:24 -04:00
NarcolepticK 648cecf1aa service/cecd: Utilize CryptoPP::Base64Encoder for message id 2018-09-07 23:09:14 -04:00
NarcolepticK ff1beca74a service/cecd: Fixed enum item naming style 2018-09-07 19:36:33 -04:00
NarcolepticK 69b3217394 service/cecd: Addressed comments, code cleanup 2018-09-06 15:50:27 -04:00
NarcolepticK c89759f597 service/cecd: Corrected eventlog.dat creation 2018-09-06 15:50:27 -04:00
NarcolepticK c185c35bc2 service/cecd: Clang format fixup 2018-09-06 15:50:27 -04:00
NarcolepticK dd7234a6d0 service/cecd: Migrate Common::StringFromFormat(...) to fmt::format(...) 2018-09-06 15:50:27 -04:00
NarcolepticK 25e7209d5c service/cecd: Updated function names 2018-09-06 15:50:27 -04:00
NarcolepticK 7a8477d106 service/cecd: Implement mboxlist handling 2018-09-06 15:50:27 -04:00
NarcolepticK 0e8398b51c service/cecd: Update header checks and increased debug logging 2018-09-06 15:50:27 -04:00
NarcolepticK 71204e525f service/cecd: Corrected behaviour, started checking and updating file headers 2018-09-06 15:50:27 -04:00
NarcolepticK d88ad61da4 service/cecd: Output icon to MBoxData.001 and title to MBoxData.010 2018-09-06 15:50:27 -04:00
NarcolepticK 010fbd8614 service/cecd: Update default values for in/out box info header 2018-09-06 15:50:27 -04:00
NarcolepticK d99585aa53 service/cecd: Add MBox directory check to OpenAndRead and OpenAndWrite and added a CreateAndPopulateMBoxDirectory function 2018-09-06 15:50:27 -04:00
NarcolepticK 30bbea3f4e service/cecd: Add initial files to archive after it is formatted 2018-09-06 15:50:27 -04:00
NarcolepticK e27c1bd1f5 service/cecd: Addressed comment about PopEnum 2018-09-06 15:50:27 -04:00
NarcolepticK 413f1651b7 service/cecd: Implement basic file handling functions. 2018-09-06 15:50:26 -04:00
NarcolepticK 2ee395d7de service/cecd: Implement functions 2018-09-06 15:50:26 -04:00
NarcolepticK 5dacf92fd7 service/cecd: Stub some functions 2018-09-06 15:50:26 -04:00
NarcolepticK d6f86caf30 service/cecd: Addressed comment about using PushEnum instead of Push<u32> 2018-07-01 12:54:53 -04:00
NarcolepticK 37532f8a76 service/cecd: Fixed clang format 2018-06-30 23:52:45 -04:00