summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ns/pl_u.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* hle: kernel: Refactor to allocate a ServiceThread per service handler.bunnei2021-06-051-2/+0
| | | | | | - Previously, we would allocate a thread per session, which adds new threads on CloneCurrentObject. - This results in race conditions with N sessions queuing requests to the same service interface. - Fixes Pokken Tournament DX crashes/softlocks, which were regressed by #6347.
* general: Replace RESULT_SUCCESS with ResultSuccessMorph2021-06-021-6/+6
| | | | Transition to PascalCase for result names.
* common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph2021-05-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* fixup! hle: kernel: Migrate KSharedMemory to KAutoObject.bunnei2021-05-061-2/+2
|
* hle: kernel: Migrate KSharedMemory to KAutoObject.bunnei2021-05-061-6/+2
|
* hle: kernel: Refactor IPC interfaces to not use std::shared_ptr.bunnei2021-05-061-1/+1
|
* pl_u: Update to 12.xgerman772021-04-091-0/+4
|
* hle: kernel: Rename SharedMemory to KSharedMemory.bunnei2021-02-191-2/+2
|
* pl_u: Fix read out of boundsAlessandro Astone2021-02-061-2/+7
|
* pl_u, applets/web: Decrypt shared fonts to TTF filesMorph2020-12-181-18/+12
|
* core: Remove unnecessary enum casts in log callsLioncash2020-12-081-6/+3
| | | | | Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts.
* service: Eliminate usages of the global system instanceLioncash2020-11-271-2/+2
| | | | | Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
* core: Fix clang build pt.3Lioncash2020-10-221-11/+1
| | | | Should finally resolve building with clang.
* Revert "core: Fix clang build"bunnei2020-10-211-1/+11
|
* core: Fix clang buildLioncash2020-10-181-11/+1
| | | | | | | Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
* service: Update function tablesVolcaEM2020-06-291-1/+1
|
* service: Update function tablesLioncash2020-04-201-0/+1
| | | | | | Keeps the service function tables up to date. Updated based off information on SwitchBrew.
* service: pl_u: Update for new shared memory layout.bunnei2020-04-171-7/+5
|
* Merge pull request #3094 from lioncash/tablesbunnei2019-11-251-1/+7
|\ | | | | service: Update function tables
| * service: Update function tablesLioncash2019-11-121-1/+7
| | | | | | | | | | | | Keeps the function tables up to date. Updated based off information from Switchbrew.
* | kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei2019-11-251-1/+1
| | | | | | | | | | | | * kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details.
* | service: Resolve sign conversion errorsLioncash2019-11-121-1/+1
|/ | | | | These are fairly trivial to resolve and most of the changes entail using RESULT_UNKNOWN over ResultCode(-1).
* pl_u: Fix mismatched rebase size error in font encryptionZach Hilman2019-10-131-10/+8
|
* pl_u: Remove excess static qualifierZach Hilman2019-10-131-1/+1
|
* pl_u: Use OSS system archives if real archives don't existZach Hilman2019-10-131-110/+47
|
* hle/service: Replace global system instance calls with instance-based onesLioncash2019-10-061-4/+4
| | | | | | | | | | 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.
* Merge pull request #2884 from ogniK5377/deglobal-sys-servicesFernando Sahmkow2019-09-221-3/+7
|\ | | | | Remove usage of System::CurrentInterface() from most services
| * RebaseDavid Marcec2019-09-221-1/+4
| |
| * RebaseDavid Marcec2019-09-221-3/+4
| |
* | Revert "Merge pull request #2709 from DarkLordZach/oss-ext-fonts-1"David Marcec2019-09-221-47/+117
|/ | | | | This reverts commit fa1c60c33ef88c6cd0b72da46842dc9098db712d, reversing changes made to e34899067b60a69bca02761bd1290c6824bb559a.
* Merge pull request #2709 from DarkLordZach/oss-ext-fonts-1David2019-09-221-117/+47
|\ | | | | system_archive: Move shared font data to system_archive and fix extended font data
| * pl_u: Remove excess static qualifierZach Hilman2019-09-221-1/+1
| |
| * pl_u: Use OSS system archives if real archives don't existZach Hilman2019-09-221-108/+40
| |
| * pl_u: Expose method to encrypt TTF to BFTTFZach Hilman2019-09-221-14/+12
| |
* | services: Pass FileSystemController as reference to services that need itZach Hilman2019-09-211-2/+3
|/
* VM_Manager: Align allocated memory to 256bytesFernando Sahmkow2019-07-191-6/+6
| | | | | | This commit ensures that all backing memory allocated for the Guest CPU is aligned to 256 bytes. This due to how gpu memory works and the heavy constraints it has in the alignment of physical memory.
* Changed logging to be "Log before execution", Added more error logging, all services should now log on some levelDavid Marcec2018-11-261-4/+6
|
* 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
* 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-121-60/+86
| | | | | 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-111-0/+2
|\ | | | | 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-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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-011-1/+26
| | | | | | | | | | | | | | | | | | | | * 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-201-4/+2
| | | | 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-251-0/+10
|
* 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-151-0/+111