summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
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-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
2018-09-04common/logging/filter: Make constructor explicitLioncash
Implicit conversions aren't desirable here.
2018-08-27Merge pull request #1170 from lioncash/retbunnei
file_util: Correct return value in early exit of ReadFileToString()
2018-08-24file_util: Correct return value in early exit of ReadFileToString()Lioncash
While still essentially being zero, we should be returning a numeric value here, not a boolean typed value.
2018-08-23hex_util: Replace logic_errors with LOG_CRITICALZach Hilman
Makes it so malformed hex strings do not crash the entire program.
2018-08-21logging/text_formatter: Use empty braces for initializing ↵Lioncash
CONSOLE_SCREEN_BUFFER_INFO instance The previous form of initializing done here is a C-ism, an empty set of braces is sufficient for initializing (and doesn't potentially cause missing brace warnings, given the first member of the struct is a COORD struct).
2018-08-21bit_field: Convert ToBool() into explicit operator boolLioncash
Gets rid of a TODO that is long overdue.
2018-08-20Merge pull request #1064 from lioncash/telemetrybunnei
common/telemetry: Migrate core-independent info gathering to common
2018-08-15common: Namespace hex_util.h/.cppLioncash
It's in the common code, so it should be under the Common namespace like everything else.
2018-08-15Merge pull request #1005 from DarkLordZach/registered-fmtbunnei
file_sys: Add support for registration format
2018-08-14Merge pull request #1063 from lioncash/inlinebunnei
common/xbyak_abi: Mark defined functions in header as inline
2018-08-14Merge pull request #1054 from zhaowenlan1779/misc-fixupbunnei
common/misc: use windows.h
2018-08-14common/telemetry: Migrate core-independent info gathering to commonLioncash
Previously core itself was the library containing the code to gather common information (build info, CPU info, and OS info), however all of this isn't core-dependent and can be moved to the common code and use the common interfaces. We can then just call those functions from the core instead. This will allow replacing our CPU detection with Xbyak's which has better detection facilities than ours. It also keeps more architecture-dependent code in common instead of core.
2018-08-14common/xbyak_abi: Mark defined functions in header as inlineLioncash
Avoids potential One Definition Rule violations when these are used in the future.
2018-08-14common/xbyak: Use nested namespace specifiers where applicableLioncash
2018-08-14common: Remove unused old breakpoint source filesLioncash
These currently aren't used and contain commented out source code that corresponds to Dolphin's JIT. Given our CPU code is organized quite differently, we shouldn't be keeping this around (at the moment it just adds to compile times marginally).
2018-08-13logging/backend: Use const reference to refer to log filterLioncash
The filter is returned via const reference, so this was making a pointless copy of the entire filter every time a message was being pushed into the logger instance.
2018-08-14common/misc: use windows.hZhu PengFei
linux-mingw does not really like this.