summaryrefslogtreecommitdiff
path: root/src/core (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1310 from lioncash/kernel-nsGravatar bunnei2018-09-134-9/+10
|\ | | | | kernel/thread: Include thread-related enums within the kernel namespace
| * kernel/thread: Include thread-related enums within the kernel namespaceGravatar Lioncash2018-09-134-9/+10
| | | | | | | | | | | | 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.
* | Merge pull request #1309 from lioncash/nestedGravatar bunnei2018-09-133-12/+6
|\ \ | | | | | | service: Use nested namespace specifiers where applicable
| * | service: Use nested namespace specifiers where applicableGravatar Lioncash2018-09-133-12/+6
| |/ | | | | | | | | | | 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.
* | Merge pull request #1307 from lioncash/plGravatar bunnei2018-09-131-2/+4
|\ \ | |/ |/| services/pl_u: Add missing Korean font to the fallback case for shared fonts
| * services/pl_u: Add missing Korean font to the fallback case for shared fontsGravatar Lioncash2018-09-121-2/+4
| | | | | | | | Previously this wasn't using the Korean font at all.
* | ipc: minor fixGravatar Valentin Vanelslande2018-09-131-1/+1
|/
* Merge pull request #1163 from FearlessTobi/add-audio-stretchingGravatar bunnei2018-09-122-0/+4
|\ | | | | audio_core: Add audio stretching support
| * Add audio stretching supportGravatar fearlessTobi2018-09-082-0/+4
| |
* | Merge pull request #1297 from lioncash/plGravatar bunnei2018-09-122-66/+88
|\ \ | | | | | | pl_u: Eliminate mutable file-scope state
| * | pl_u: Eliminate mutable file-scope stateGravatar Lioncash2018-09-112-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 #1303 from lioncash/errorGravatar bunnei2018-09-123-9/+11
|\ \ \ | | | | | | | | kernel/errors: Amend invalid thread priority and invalid processor ID error codes
| * | | svc: Return ERR_INVALID_PROCESSOR_ID in CreateThread() if an invalid ↵Gravatar Lioncash2018-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | processor ID is given This is what the kernel does for an out-of-range processor ID.
| * | | kernel/errors: Correct error codes for invalid thread priority and invalid ↵Gravatar Lioncash2018-09-123-7/+9
| | | | | | | | | | | | | | | | processor ID
* | | | svc: Do nothing if svcOutputDebugString() is given a length of zeroGravatar Lioncash2018-09-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | While unlikely, it does avoid constructing a std::string and unnecessarily calling into the memory code if a game or executable decides to be really silly about their logging.
* | | | svc: Correct parameter type for OutputDebugString()Gravatar Lioncash2018-09-122-3/+3
|/ / / | | | | | | | | | This should be a u64 to represent size.
* | | Merge pull request #1296 from lioncash/prepoGravatar bunnei2018-09-112-39/+40
|\ \ \ | | | | | | | | service/prepo: Move class into the cpp file
| * | | service/prepo: Move class into the cpp fileGravatar Lioncash2018-09-112-39/+40
| |/ / | | | | | | | | | | | | | | | This doesn't need to be exposed within the header and be kept in the translation unit, eliminating the need to include anything within the header.
* / / service/audio: Replace includes with forward declarations where applicableGravatar Lioncash2018-09-117-17/+34
|/ / | | | | | | | | A few headers were including other headers when a forward declaration can be used instead, allowing the include to be moved to the cpp file.
* | Merge pull request #1291 from lioncash/defaultGravatar bunnei2018-09-11148-45/+291
|\ \ | | | | | | hle/service: Default constructors and destructors in the cpp file where applicable
| * | hle/service: Default constructors and destructors in the cpp file where ↵Gravatar Lioncash2018-09-10148-45/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | applicable 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 filesGravatar Lioncash2018-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)Gravatar Tobias2018-09-102-2/+26
| | | | | | | | | | | | * Add open-source shared fonts * Address review comments
* | video_core: Move command buffer loop.Gravatar Markus Wick2018-09-102-31/+12
| | | | | | | | This moves the hot loop into video_core. This refactoring shall reduce the CPU overhead of calling ProcessCommandList.
* | Merge pull request #1276 from FearlessTobi/fix-stupid-stubGravatar bunnei2018-09-092-4/+6
|\ \ | | | | | | hid: Implement ReloadInputDevices
| * | hid: Implement ReloadInputDevicesGravatar fearlessTobi2018-09-092-4/+6
| |/
* / service: Remove unused g_kernel_named_ports variableGravatar Lioncash2018-09-091-2/+0
|/ | | | | With the named port functionality all migrated over to the kernel, there's no need to keep this around anymore.
* core: Migrate current_process pointer to the kernelGravatar Lioncash2018-09-064-5/+34
| | | | | | | | | | Given we now have the kernel as a class, it doesn't make sense to keep the current process pointer within the System class, as processes are related to the kernel. This also gets rid of a subtle case where memory wouldn't be freed on core shutdown, as the current_process pointer would never be reset, causing the pointed to contents to continue to live.
* Merge pull request #1250 from lioncash/file-sysGravatar bunnei2018-09-064-4/+16
|\ | | | | file_sys/{nca_patch, patch_manager}: Amend unnecessary/missing includes.
| * file_sys/nca_patch: Amend constructor initializer list orderGravatar Lioncash2018-09-061-2/+2
| | | | | | | | | | | | Orders the elements in the initializer list in the order they're specified in the class. This prevents compiler warnings about initialization order.
| * file_sys/nca_patch: Remove unnecessary includesGravatar Lioncash2018-09-062-2/+9
| | | | | | | | | | romfs.h doesn't need to be included in the header, the only real dependency here is common's swap.h that needs to be included.
| * file_sys/patch_manager: Add missing includesGravatar Lioncash2018-09-062-0/+5
| | | | | | | | These includes were previously being satisfied indirectly.
* | core/core: Remove unnecessary sm/controller includeGravatar Lioncash2018-09-065-2/+5
|/ | | | | | | | | | The only reason this include was necessary, was because the constructor wasn't defaulted in the cpp file and the compiler would inline it wherever it was used. However, given Controller is forward declared, all those inlined constructors would see an incomplete type, causing a compilation failure. So, we just place the constructor in the cpp file, where it can see the complete type definition, allowing us to remove this include.
* Merge pull request #1242 from lioncash/file-sysGravatar bunnei2018-09-052-8/+17
|\ | | | | file_sys/submission_package: Replace includes with forward declarations where applicable
| * file_sys/submission_package: Correct constructor initialization list orderGravatar Lioncash2018-09-051-2/+2
| | | | | | | | | | Orders the elements in the sequence to match the order in which they'll actually be initialized in.
| * file_sys/submission_package: Replace includes with forward declarations ↵Gravatar Lioncash2018-09-052-6/+15
| | | | | | | | where applicable
* | bktr: Fix bucket overlap errorGravatar Zach Hilman2018-09-047-9/+9
| |
* | drd: Parse title ID from program metadataGravatar Zach Hilman2018-09-042-4/+29
| |
* | patch_manager: Centralize Control-type NCA parsingGravatar Zach Hilman2018-09-044-55/+74
| |
* | nsp: Fix error masking issue with XCI filesGravatar Zach Hilman2018-09-043-6/+13
| | | | | | | | Now display correct error instead of catch-all MissingProgramNCA
* | game_list: Fix version display on non-NAND titlesGravatar Zach Hilman2018-09-043-8/+33
| |
* | bktr: Add logging on successful patchGravatar Zach Hilman2018-09-043-7/+24
| |
* | bktr: Implement IVFC offset shiftingGravatar Zach Hilman2018-09-048-8/+36
| | | | | | | | Fixes base game read errors
* | bktr: Fix missing includes and optimize styleGravatar Zach Hilman2018-09-0411-101/+107
| |
* | loader: Add BKTR-specific error messages and codesGravatar Zach Hilman2018-09-043-7/+28
| |
* | loader: Ignore patches on NRO and DRDGravatar Zach Hilman2018-09-044-0/+11
| |
* | patch_manager: Add usages of patches to ExeFSGravatar Zach Hilman2018-09-045-9/+41
| |
* | file_sys: Add class to manage game patchesGravatar Zach Hilman2018-09-042-0/+132
| | | | | | | | Right now only includes Updates, but should eventually contain all of the other patches we need.
* | file_sys: Add BKTR patching mechanismGravatar Zach Hilman2018-09-042-0/+352
| |
* | content_archive: Add BKTR header parsing to NCAGravatar Zach Hilman2018-09-042-19/+160
| |