summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
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-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.
2018-10-02string_util: remove ShiftJIS/CP1252 conversion functionWeiyi Wang
We always use unicode internally. Any dirty work of conversion with other codec should be handled by frontend framework (Qt). Further more, ShiftJIS/CP1252 are not special (they are not code set used by 3ds, or any guest/host dependencies we have), so there is no reason to specifically include them
2018-10-02Review comments - part 5fearlessTobi
2018-10-02Address a bunch of review commentsfearlessTobi
2018-10-02Port web_service from CitrafearlessTobi
2018-09-25Merge pull request #1365 from DarkLordZach/lfsbunnei
file_sys: Add support for LayeredFS mods
2018-09-23Stubbed IRS (#1349)David
* Stubbed IRS Currently we have no ideal way of implementing IRS. For the time being we should have the functions stubbed until we come up with a way to emulate IRS properly. * Added IRS to logging backend * Forward declared shared memory for irs
2018-09-22common/thread: remove YieldCPU()Weiyi Wang
simply use the standard library yield()
2018-09-21common_paths: Add Load and Dump dirsZach Hilman
2018-09-18ring_buffer: Use std::atomic_size_t in a static assertLioncash
Avoids the need to repeat "std::" twice
2018-09-18ring_buffer: Use std::hardware_destructive_interference_size to determine ↵Lioncash
alignment size for avoiding false sharing MSVC 19.11 (A.K.A. VS 15.3)'s C++ standard library implements P0154R1 (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0154r1.html) which defines two new constants within the <new> header, std::hardware_destructive_interference_size and std::hardware_constructive_interference_size. std::hardware_destructive_interference_size defines the minimum recommended offset between two concurrently-accessed objects to avoid performance degradation due to contention introduced by the implementation (with the lower-bound being at least alignof(max_align_t)). In other words, the minimum offset between objects necessary to avoid false-sharing. std::hardware_constructive_interference_size on the other hand defines the maximum recommended size of contiguous memory occupied by two objects accessed wth temporal locality by concurrent threads (also defined to be at least alignof(max_align_t)). In other words the maximum size to promote true-sharing. So we can simply use this facility to determine the ideal alignment size. Unfortunately, only MSVC supports this right now, so we need to enclose it within an ifdef for the time being.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi
2018-09-08common: Implement a ring bufferMerryMage
2018-09-07Better Title Bar DisplayCaptV0rt3x
2018-09-04common/logging: Amend documentation commentsLioncash
Multi-line doc comments still need the '<' after the ///, otherwise it's treated as a regular comment and makes the original doc comment broken in viewers, IDEs, etc. While we're at it, also fix some typos in the comments.
2018-09-04common/logging/filter: Replace C-style case with C++ static_castLioncash