summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2018-12-27Merge pull request #1928 from lioncash/capsbunnei
kernel: Handle kernel capability descriptors
2018-12-21common/quaternion: Ensure that w is always initializedLioncash
Previously xyz was always being zero initialized due to its constructor, but w wasn't. Ensures that we always have a deterministic initial state.
2018-12-21common: Add basic bit manipulation utility function to CommonLioncash
2018-12-15Merge pull request #1732 from DarkLordZach/yield-typesbunnei
svc: Implement yield types 0 and -1
2018-12-07Backport review comment from citra-emu/citra#4418Tobias
Original reason: As Windows multi-byte character codec is unspecified while we always assume std::string uses UTF-8 in our code base, this can output gibberish when the string contains non-ASCII characters. ::OutputDebugStringW combined with Common::UTF8ToUTF16W is preferred here.
2018-11-23Merge pull request #1773 from lioncash/threadbunnei
common/thread: Minor cleanup
2018-11-22common/thread: Drop Hungarian notation on SetCurrentThreadName's parameterLioncash
This is inconsistent with our coding style.
2018-11-22scheduler: Add explanations for YieldWith and WithoutLoadBalancingZach Hilman
2018-11-21common/thread: Make Barrier's 'count' member non-constLioncash
While admirable as a means to ensure immutability, this has the unfortunate downside of making the class non-movable. std::move cannot actually perform a move operation if the provided operand has const data members (std::move acts as an operation to "slide" resources out of an object instance). Given Barrier contains move-only types such as std::mutex, this can lead to confusing error messages if an object ever contained a Barrier instance and said object was attempted to be moved.
2018-11-21common/thread: Initialize class member variables where applicableLioncash
Simplifies the constructor interfaces for Barrier and Event classes.
2018-11-21common/thread: Group non-member functions togetherLioncash
Keeps the non-member interface in one spot instead of split into two places, making it nicer to locate functions.
2018-11-21common/thread: Remove SleepCurrentThread()Lioncash
This is also unused and superceded by standard functionality. The standard library provides std::this_thread::sleep_for(), which provides a much more flexible interface, as different time units can be used with it.
2018-11-21common/thread: Remove unused CurrentThreadId()Lioncash
This is an old function that's no longer necessary. C++11 introduced proper threading support to the language and a thread ID can be retrieved via std::this_thread::get_id() if it's ever needed.
2018-11-21common: Remove bit_set.hLioncash
This is an analog of BitSet from Dolphin that was introduced to allow iterating over a set of bits. Given it's currently unused, and given that std::bitset exists, we can remove this. If it's ever needed in the future it can be brought back.
2018-11-21Merge pull request #1758 from lioncash/rectbunnei
common/math_util: Minor cleanup
2018-11-21common: Remove dependency on xbyakLioncash
Xbyak is currently entirely unused. Rather than carting it along, remove it and get rid of a dependency. If it's ever needed in the future, then it can be re-added (and likely be more up to date at that point in time).
2018-11-21common/math_util: Simplify std::make_signed usages to std::make_signed_tLioncash
Gets rid of the need to use typename to access the ::type alias.
2018-11-21common/math_util: Make Rectangle's constructors constexprLioncash
Allows objects that contain rectangle instances to be constexpr constructible as well.
2018-11-21common/math_util: Remove unnecessary static from PILioncash
const/constexpr variables have internal linkage by default.
2018-11-21common/math_util: Remove unused IntervalsIntersect() functionLioncash
This hasn't been used since the project started, so we may as well get rid of it to keep it from bit rotting.
2018-11-20common/assert: Add UNIMPLEMENTED_IF and UNIMPLEMENTED_IF_MSG for conditional ↵Lioncash
assertions Currently, there's no way to specify if an assertion should conditionally occur due to unimplemented behavior. This is useful when something is only partially implemented (e.g. due to ongoing RE work). In particular, this would be useful within the graphics code. The rationale behind this is it allows a dev to disable unimplemented feature assertions (which can occur in an unrelated work area), while still enabling regular assertions, which act as behavior guards for conditions or states which must not occur. Previously, the only way a dev could temporarily disable asserts, was to disable the regular assertion macros, which has the downside of also disabling, well, the regular assertions which hold more sanitizing value, as opposed to unimplemented feature assertions.
2018-11-20common/assert: Make the UNIMPLEMENTED macro properly assertLioncash
Currently, this was only performing a logging call, which doesn't actually invoke any assertion behavior. This is unlike UNIMPLEMENTED_MSG, which *does* assert. This makes the expected behavior uniform across both macros.
2018-11-18svc: Implement yield types 0 and -1Zach Hilman
2018-11-18am: Deglobalize software keyboard appletZach Hilman
2018-11-18string_util: Implement buffer to UTF-16 string helper functionZach Hilman
Needed as most all software keyboard functions use fixed-length UTF16 string buffers.
2018-11-16Common/Bitfield: store value as unsigned typeWeiyi Wang
Storing signed type causes the following behaviour: extractValue can do overflow/negative left shift. Now it only relies on two implementation-defined behaviours (which are almost always defined as we want): unsigned->signed conversion and signed right shift
2018-11-13string_util: Remove ArrayToString()Lioncash
An old function from Dolphin. This is also unused, and pretty inflexible when it comes to printing out different data types (for example, one might not want to print out an array of u8s but a different type instead. Given we use fmt, there's no need to keep this implementation of the function around.
2018-11-13string_util: Remove TryParse()Lioncash
This is an unused hold-over from Dolphin that was primarily used to parse values out of the .ini files. Given we already have libraries that do this for us, we don't need to keep this around.
2018-11-13string_util: Remove ThousandSeparate()Lioncash
This is currently unused and doesn't really provide much value to keep around either.
2018-11-05Merge pull request #1441 from CarlKenner/DebuggerLogbunnei
logging: Add DebuggerBackend for logging to Visual Studio
2018-10-28compatdb: Use a seperate endpoint for testcase submissionfearlessTobi
2018-10-23logging/backend: Add missing services to the log filtersLioncash
Just a few overlooked services.
2018-10-23common: Remove memory_util.cpp/.hLioncash
Everything from here is completely unused and also written with the notion of supporting 32-bit architecture variants in mind. Given the Switch itself is on a 64-bit architecture, we won't be supporting 32-bit architectures. If we need specific allocation functions in the future, it's likely more worthwhile to new functions for that purpose.
2018-10-23only redefine 64 bit file operation for MSVCWeiyi Wang
MinGW provides POSIX functions
2018-10-20service: Add skeleton for psm serviceZach Hilman
Seems to be the power controller. Listed in switchbrew under the category PTM services.
2018-10-18common: Add function for checking word alignment to alignment.hLioncash
This will be used in a following change to svcArbitrateLock() and svcArbitrateUnlock()
2018-10-18common: Move Is4KBAligned() to alignment.hLioncash
Aligning on 4KB pages isn't a Switch-specific thing, so this can be moved to common so it can be used with other things as well.
2018-10-10web_backend: Make Client use the PImpl idiomLioncash
Like with TelemetryJson, we can make the implementation details private and avoid the need to expose httplib to external libraries that need to use the Client class.
2018-10-08Merge pull request #1424 from DarkLordZach/ips-witchbunnei
ips_layer: Add support for IPSwitch executable patches
2018-10-06Merge pull request #1453 from FearlessTobi/port-4311bunnei
Port citra-emu/citra#4311: "Remove "#" in the version number"
2018-10-07logging: Add DebuggerBackend for logging to Visual StudioCarl Kenner
2018-10-06Remove "#" in the version numberfearlessTobi
So that people can stop using it in issue/pr comments and randomly link some other issue/pr unintentionally.
2018-10-06citra_qt/configuration: misc input tab improvementszhupengfei
* Added a context menu on the buttons including Clear & Restore Default * Allow clearing (unsetting) inputs. Added a Clear All button * Allow restoring a single input to default (instead of all)
2018-10-06Merge pull request #1332 from FearlessTobi/port-web-backendbunnei
Port web_service from Citra
2018-10-05Merge pull request #1442 from lioncash/formatbunnei
text_formatter: Avoid unnecessary string temporary creation in PrintMessage()
2018-10-04text_formatter: Avoid unnecessary string temporary creation in PrintMessage()Lioncash
operator+ for std::string creates an entirely new string, which is kind of unnecessary here if we just want to append a null terminator to the existing one. Reduces the total amount of potential allocations that need to be done in the logging path.
2018-10-04ips_layer: Deduplicate resource usageZach Hilman
2018-10-04hex_util: Add HexVectorToString and HexStringToVectorZach Hilman
Converts between bytes and strings when the size is not known at compile time.
2018-10-02string_util: unify UTF8<->UTF16 conversion to codecvtWeiyi Wang
2018-10-02string_util: remove TString conversion for windowsWeiyi Wang
First of all they are foundamentally broken. As our convention is that std::string is always UTF-8, these functions assume that the multi-byte character version of TString (std::string) from windows is also in UTF-8, which is almost always wrong. We are not going to build multi-byte character build, and even if we do, this dirty work should be handled by frontend framework early.