Commit Graph

145 Commits

Author SHA1 Message Date
a6e37b48e9 ipc_helpers: Make PushStaticBuffer take std::vector by value
Allows interfaces to move the vector into the calls, avoiding any
reallocations.

Many existing call sites already std::move into the parameter, expecting
a move to occur. Only a few remain where this wasn't already
being done, which we can convert over.
2020-04-18 19:17:11 -04:00
75c9784239 Services/APT: Implemented the GetCaptureInfo function. (#5194)
This one is similar to the ReceiveCaptureBufferInfo function except it doesn't clear the capture buffer, according to 3dbrew.

This function is used by the Home Menu
2020-04-18 20:48:09 +02:00
8967b403b9 Merge pull request #5196 from Subv/apt_sys_menu_arg
Services/APT: Implemented the Store/LoadSysMenuArg functions.
2020-04-18 13:24:10 +08:00
0d8c3ee1d3 Services/APT: Implemented the Store/LoadSysMenuArg functions.
They are called by the Home Menu during initialization.

These functions will not see much use until we actually implement application jumping and system rebooting. For now we just need them to prevent some unmapped reads in the Home Menu due to the static buffers not being properly set up.
2020-04-15 22:32:11 -05:00
6760ea18b6 Serialize ArchiveManager and other code review actions 2020-03-29 18:56:25 +01:00
7b846ffa98 clang-format fixes 2020-02-13 17:39:15 +08:00
3ed8d95866 Serialize FS service; some compiler fixes 2020-02-13 17:38:24 +08:00
5265c79056 APT service serialization 2020-02-13 17:38:21 +08:00
331a9fc12b Change over to std::shared_ptr 2019-08-14 21:30:49 -06:00
6c8faaf2c2 HLE: Remove BaseInterface and add ns.cpp back 2019-08-14 21:23:06 -06:00
f2167d76a8 Service: Add BaseInterface and NSInterface 2019-08-14 21:23:03 -06:00
b62ca12e88 HLE: Move NS:S into APT and remove NS 2019-08-14 21:21:33 -06:00
5f11c5f733 Kernel: replace boost::intrusive_ptr with std::shared_ptr 2019-03-24 14:32:11 -04:00
6ce58248b0 APT: use member system instead of global instance 2019-03-10 11:10:24 -04:00
1cb9bea504 kernel/shared_memory: Make data members private
Rather than allow unfettered access to the class internals, we hide all
members by default and create and API that other code can operate
against.
2018-11-23 16:20:18 +01:00
cfa9a322c7 Kernel/SharedMemory: set and reset source memory state 2018-11-16 00:24:08 -05:00
8c65433ab5 Kernel, APT: SharedFont/SharedMemoryOnSharedDevice should always use old linear heap VAddr 2018-11-08 00:19:19 -05:00
2067946f59 Kernel: reimplement memory management on physical FCRAM (#4392)
* Kernel: reimplement memory management on physical FCRAM

* Kernel/Process: Unmap does not care the source memory permission

What game usually does is after mapping the memory, they reprotect the source memory as no permission to avoid modification there

* Kernel/SharedMemory: zero initialize new-allocated memory

* Process/Thread: zero new TLS entry

* Kernel: fix a bug where code segments memory usage are accumulated twice

It is added to both misc and heap (done inside HeapAlloc), which results a doubled number reported by svcGetProcessInfo. While we are on it, we just merge the three number misc, heap and linear heap usage together, as there is no where they are distinguished.

Question: is TLS page also added to this number?

* Kernel/SharedMemory: add more object info on mapping error

* Process: lower log level; SharedMemory: store phys offset

* VMManager: add helper function to retrieve backing block list for a range
2018-11-06 15:00:47 -05:00
87426b29ff kernel: pass ref to shared memory 2018-10-18 21:41:36 -04:00
7449ba85a6 Kernel: pass ref in Mutex 2018-10-18 21:41:36 -04:00
1de63f9b16 Merge pull request #4328 from B3n30/remove_current_module
remove GetCurrentModule() functions in HLE Services
2018-10-18 21:39:24 -04:00
eb3af0f16a Add GetModule() helper functions, for HID, CAM, and CFG 2018-10-12 11:50:50 +02:00
1b1de23a98 Fixup: Remove unneeded GetUsername 2018-10-11 20:05:45 +02:00
9d53136f20 remove GetCurrentModule() functions in HLE Services 2018-10-11 19:23:14 +02:00
9adc407112 Merge pull request #4304 from B3n30/std_optional
Replace boost::optional with std::optional where possible
2018-10-11 12:40:00 -04:00
8ec2a9817c Services/APT: Better implementation of PrepareToDoApplicationJump and DoApplicationJump.
The real console can't launch an Application directly from within another Application so it has to go through the Home Menu. We do not have such limitation and can directly launch the requested title.
2018-10-06 17:08:24 -05:00
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
2306af3600 Handle cases when std::optional does not contain a value 2018-10-05 16:51:33 +02:00
d37a2270d6 Replace boost::optional with std::optional where possible 2018-10-05 13:51:09 +02:00
94b273ac20 APT: access FS via backend directly 2018-09-28 14:08:30 -04:00
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
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
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
ad6b140cb0 service/apt: Implement soft reset & CloseApplication 2018-09-08 11:05:23 +08:00
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
f28bc28d6b core, citra_qt: unify status of system archives and shared fonts
Shared fonts is no different from any other system archives, and there is not really any point to make a separate status for it. This also fixes the incorrect error message that was introduced when I made the UI text improvements.
2018-08-27 22:40:35 +08:00
Ben
04bd104c4a Merge pull request #3992 from Subv/applets_close
Services/HLE: Implement PrepareToCloseLibraryApplet and CloseLibraryApplet
2018-07-29 10:34:32 +02:00
b1f8c2fe67 Remove RomFS::GetFilePointer 2018-07-26 12:59:31 +02:00
cce882b688 Services/HLE: Implement PrepareToCloseLibraryApplet and CloseLibraryApplet.
This allows LLE library applets (like swkbd) to properly close and return to the application instead of hanging.

There is still a bug in our rasterizer cache that may cause crashes some time after an applet is closed, but that is tangential to this change and should be tackled separately.
2018-07-24 14:50:19 -05:00
208e789182 Fix error log 2018-07-11 09:00:05 +02:00
468c689cf4 Set max parameter_size to 0x1000 2018-07-07 18:52:27 +02:00
be1ae17c61 Fix parameter_size in GetStartupArgument 2018-07-07 18:38:38 +02:00
0eab948728 reformat all files with clang-format 2018-06-29 16:56:12 +03:00
7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
dfe9b4edf8 Merge pull request #3587 from valentinvanelslande/apt-fmt
Service/APT: Migrate logging macros
2018-04-12 22:47:44 +03:00
542b11ccdc Change line 203 2018-03-28 19:05:54 -06:00
ca6642aa2a [skip ci] 2018-03-28 08:45:39 -06:00
a53365d69e Fix clang 2018-03-27 18:17:04 -06:00
f1e26fad7f Fix build 2018-03-27 15:25:57 -06:00
4a37d91bc6 change line 528 2018-03-27 14:23:31 -06:00