summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ns (follow)
Commit message (Collapse)AuthorAgeFilesLines
* service/ns: Add missing override specifiersLioncash2019-06-051-9/+9
|
* Fix bitmask logic inversionMichael Scire2019-05-231-2/+1
|
* fix introduced clang-format errorsMichael Scire2019-05-231-3/+2
|
* Address review commentsMichael Scire2019-05-235-45/+118
|
* clang-format fixesMichael Scire2019-05-234-31/+32
|
* Implement IApplicationFunctions::GetDesiredLanguageMichael Scire2019-05-235-401/+964
|
* service/ns: Update function tablesLioncash2019-01-301-14/+20
| | | | Updates function tables based off information provided by SwitchBrew
* Changed logging to be "Log before execution", Added more error logging, all services should now log on some levelDavid Marcec2018-11-262-8/+10
|
* pl_u: Resize buffers in shared font data getter to what game requestsZach Hilman2018-11-151-0/+8
| | | | Fixes unmapped spam in SMP and buffer size errors in some other games
* ns: Implement command 400: GetApplicationControlDataZach Hilman2018-10-291-1/+63
| | | Returns the raw NACP bytes and the raw icon bytes into a title-provided buffer. Pulls from Registration Cache for control data, returning all zeros should it not exist.
* ns: Update service function tableLioncash2018-10-191-6/+49
| | | | Updated based off information provided by Switchbrew.
* file_sys/registered_cache: Use unique_ptr and regular pointers instead of shared_ptrs where applicableLioncash2018-10-161-1/+1
| | | | | | | | | | | | | | | The data retrieved in these cases are ultimately chiefly owned by either the RegisteredCache instance itself, or the filesystem factories. Both these should live throughout the use of their contained data. If they don't, it should be considered an interface/design issue, and using shared_ptr instances here would mask that, as the data would always be prolonged after the main owner's lifetime ended. This makes the lifetime of the data explicit and makes it harder to accidentally create cyclic references. It also makes the interface slightly more flexible than the previous API, as a shared_ptr can be created from a unique_ptr, but not the other way around, so this allows for that use-case if it ever becomes necessary in some form.
* kernel/process: Make data member variables privateLioncash2018-09-301-3/+3
| | | | | | | Makes the public interface consistent in terms of how accesses are done on a process object. It also makes it slightly nicer to reason about the logic of the process class, as we don't want to expose everything to external code.
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-6/+6
|
* services/pl_u: Add missing Korean font to the fallback case for shared fontsLioncash2018-09-131-2/+4
| | | | Previously this wasn't using the Korean font at all.
* pl_u: Eliminate mutable file-scope stateLioncash2018-09-122-66/+88
| | | | | Converts the PL_U internals to use the PImpl idiom and makes the state part of the Impl struct, eliminating mutable global/file state.
* Merge pull request #1291 from lioncash/defaultbunnei2018-09-112-1/+3
|\ | | | | hle/service: Default constructors and destructors in the cpp file where applicable
| * hle/service: Default constructors and destructors in the cpp file where applicableLioncash2018-09-112-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a destructor isn't defaulted into a cpp file, it can cause the use of forward declarations to seemingly fail to compile for non-obvious reasons. It also allows inlining of the construction/destruction logic all over the place where a constructor or destructor is invoked, which can lead to code bloat. This isn't so much a worry here, given the services won't be created and destroyed frequently. The cause of the above mentioned non-obvious errors can be demonstrated as follows: ------- Demonstrative example, if you know how the described error happens, skip forwards ------- Assume we have the following in the header, which we'll call "thing.h": \#include <memory> // Forward declaration. For example purposes, assume the definition // of Object is in some header named "object.h" class Object; class Thing { public: // assume no constructors or destructors are specified here, // or the constructors/destructors are defined as: // // Thing() = default; // ~Thing() = default; // // ... Some interface member functions would be defined here private: std::shared_ptr<Object> obj; }; If this header is included in a cpp file, (which we'll call "main.cpp"), this will result in a compilation error, because even though no destructor is specified, the destructor will still need to be generated by the compiler because std::shared_ptr's destructor is *not* trivial (in other words, it does something other than nothing), as std::shared_ptr's destructor needs to do two things: 1. Decrement the shared reference count of the object being pointed to, and if the reference count decrements to zero, 2. Free the Object instance's memory (aka deallocate the memory it's pointing to). And so the compiler generates the code for the destructor doing this inside main.cpp. Now, keep in mind, the Object forward declaration is not a complete type. All it does is tell the compiler "a type named Object exists" and allows us to use the name in certain situations to avoid a header dependency. So the compiler needs to generate destruction code for Object, but the compiler doesn't know *how* to destruct it. A forward declaration doesn't tell the compiler anything about Object's constructor or destructor. So, the compiler will issue an error in this case because it's undefined behavior to try and deallocate (or construct) an incomplete type and std::shared_ptr and std::unique_ptr make sure this isn't the case internally. Now, if we had defaulted the destructor in "thing.cpp", where we also include "object.h", this would never be an issue, as the destructor would only have its code generated in one place, and it would be in a place where the full class definition of Object would be visible to the compiler. ---------------------- End example ---------------------------- Given these service classes are more than certainly going to change in the future, this defaults the constructors and destructors into the relevant cpp files to make the construction and destruction of all of the services consistent and unlikely to run into cases where forward declarations are indirectly causing compilation errors. It also has the plus of avoiding the need to rebuild several services if destruction logic changes, since it would only be necessary to recompile the single cpp file.
* | externals: Place font data within cpp filesLioncash2018-09-111-6/+6
|/ | | | | | | | | | | | | | | This places the font data within cpp files, which mitigates the possibility of the font data being duplicated within the binary if it's referred to in more than one translation unit in the future. It also stores the data within a std::array, which is more flexible when it comes to operating with the standard library. Furthermore, it makes the data arrays const. This is what we want, as it allows the compiler to store the data within the read-only segment. As it is, having several large sections of mutable data like this just leaves spots in memory that we can accidentally write to (via accidental overruns, what have you) and actually have it work. This ensures the font data remains the same no matter what.
* Use open-source shared fonts if no dumped file is available (#1269)Tobias2018-09-111-1/+25
| | | | | | * Add open-source shared fonts * Address review comments
* file_sys: Replace includes with forward declarations where applicableLioncash2018-09-041-1/+3
| | | | | Cuts down on include dependencies, resulting in less files that need to be rebuilt when certain things are changed.
* kernel: Eliminate kernel global stateLioncash2018-08-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header.
* Addressed plu TTF changesDavid Marcec2018-08-231-6/+7
|
* Added SharedFonts loading via TTFDavid Marcec2018-08-231-5/+50
| | | | | | | | | | | By having the following TTF files in your yuzu sysdata directory. You can load sharedfonts via TTF files. FontStandard.ttf FontChineseSimplified.ttf FontExtendedChineseSimplified.ttf FontChineseTraditional.ttf FontKorean.ttf FontNintendoExtended.ttf FontNintendoExtended2.ttf
* Added missing include for pl:uDavid Marcec2018-08-221-0/+1
| | | | Should fix any compile errors
* PL:U Added BFTTF loading(Loading from System NAND dumps) (#1088)David2018-08-221-25/+140
| | | | | | | | | | | | * Added bfttf loading We can now load system bfttf fonts from system archives AND shared memory dumps. This allows people who have installed their system nand dumps to yuzu to automatically get shared font support. We also now don't hard code the offsets or the sizes of the shared fonts and it's all calculated for us now. * Addressed plu fixups * Style changes for plu * Fixed logic error for plu and added more error checks.
* service/ns: Add missing ns servicesLioncash2018-08-021-0/+447
| | | | | | Implements the basic skeleton of ns:am2, ns:ec, ns:rid, ns:rt, ns:su, ns:vm, and ns:web based off the information provided by Switch Brew and SwIPC.
* file_util: Use an enum class for GetUserPath()Lioncash2018-07-211-1/+1
| | | | | | | | | | | | | 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.
* pl_u: Simplify WriteBuffer() calls in GetSharedFontInOrderOfPriority()Lioncash2018-07-201-3/+3
| | | | With the new overload, we can simply pass the container directly.
* Merge pull request #725 from lioncash/bytesbunnei2018-07-201-3/+3
|\ | | | | pl_u: Specify correct size for buffers in GetSharedFontInOrderOfPriority()
| * pl_u: Specify correct size for buffers in GetSharedFontInOrderOfPriority()Lioncash2018-07-191-3/+3
| | | | | | | | | | This WriteBuffer overload expects its size argument to be in bytes, not elements.
* | pl_u: Remove printf specifier in log call in a log call in GetSharedFontInOrderOfPriority()Lioncash2018-07-191-1/+1
|/ | | | This can just use the fmt specifiers and be type-agnostic.
* Rename logging macro back to LOG_*James Rowe2018-07-031-7/+7
|
* GetSharedFontInOrderOfPriority (#381)David2018-05-012-1/+27
| | | | | | | | | | | | | | | | | | | | * GetSharedFontInOrderOfPriority * Update pl_u.cpp * Ability to use ReadBuffer and WriteBuffer with different buffer indexes, fixed up GetSharedFontInOrderOfPriority * switched to NGLOG * Update pl_u.cpp * Update pl_u.cpp * language_code is actually language code and not index * u32->u64 * final cleanups
* ns: Move logging macros over to new fmt-compatible onesLioncash2018-04-241-6/+6
|
* service: Use nested namespace specifiers where applicableLioncash2018-04-204-16/+8
| | | | Tidies up namespace declarations
* pl_u: Use empty shared font if none is available.bunnei2018-04-151-17/+14
| | | | - Makes games work in lieu of shared_font.bin.
* Updated pl:u with more service names.Hexagon122018-04-101-1/+3
|
* pl_u: Add RequestLoad.bunnei2018-03-252-0/+11
|
* core: Move process creation out of global state.bunnei2018-03-141-4/+5
|
* pl_u: Implement basic shared font loading from RAM dump.bunnei2018-02-154-0/+176
|
* Remove lots more 3DS-specific code.bunnei2017-10-134-87/+0
|
* Services/NS: Port ns:s to the new service framework.Subv2017-09-164-0/+87