summaryrefslogtreecommitdiff
path: root/src/common (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * | CMakeLists: use system zstd on LinuxGravatar lat9nq2020-09-281-1/+6
| | | | | | | | | | | | | | | From what I understand, this tells CMake to use the system, not conan, version of zstd. Required to build on the coming MinGW Docker container.
| * | CMakeLists: fix for finding zstd on linux-mingwGravatar lat9nq2020-09-281-1/+1
| | |
* | | common/wall_clock: Add virtual destructorsGravatar ReinUsesLisp2020-09-303-2/+4
|/ / | | | | | | | | | | | | | | From -fsanitize=address, this code wasn't calling the proper destructor. Adding virtual destructors for each inherited class and the base class fixes this bug. While we are at it, mark the functions as final.
* | Merge pull request #4611 from lioncash/xbyak2Gravatar bunnei2020-09-031-16/+16
|\ \ | | | | | | externals: Update Xbyak to 5.96
| * | externals: Update Xbyak to 5.96Gravatar Lioncash2020-08-301-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | I made a request on the Xbyak issue tracker to allow some constructors to be constexpr in order to avoid static constructors from needing to execute for some of our register constants. This request was implemented, so this updates Xbyak so that we can make use of it.
* | | Merge pull request #4578 from lioncash/xorGravatar bunnei2020-09-031-4/+10
|\ \ \ | | | | | | | | common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORS
| * | | common_funcs: Add missing XOR operators to DECLARE_ENUM_FLAG_OPERATORSGravatar Lioncash2020-08-241-4/+10
| | |/ | |/| | | | | | | | | | Ensures that the full set of bitwise operators are available for types that make use of this macro.
* | | input_common/motion_input: Make use of Common::PI constantGravatar Morph2020-09-021-1/+1
| | | | | | | | | | | | Also amend the copyright notice to yuzu's instead of Dolphin's, which was mistakenly copy-pasted from another file.
* | | Merge pull request #4570 from german77/motionInputGravatar bunnei2020-09-021-0/+30
|\ \ \ | | | | | | | | input_common: Add a basic class for motion devices
| * | | Implement a basic class for motion devicesGravatar german2020-08-271-0/+30
| | |/ | |/|
* | | Merge pull request #4588 from ReinUsesLisp/tsan-eventGravatar bunnei2020-08-311-4/+5
|\ \ \ | | | | | | | | common/thread: Fix data race in is_set
| * | | common/thread: Fix data race in is_setGravatar ReinUsesLisp2020-08-261-4/+5
| | | | | | | | | | | | | | | | | | | | As report by tsan, Event::Set can write is_set while WaitFor and friends are reading from it. To address this issue, make is_set an atomic.
* | | | Merge pull request #4461 from comex/thread-namesGravatar LC2020-08-311-0/+12
|\ \ \ \ | |_|/ / |/| | | Fix thread naming on Linux, which limits names to 15 bytes.
| * | | Fix thread naming on Linux, which limits names to 15 bytes.Gravatar comex2020-08-051-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and do nothing. - Also, add logging in case `pthread_set_name_np` returns an error anyway. This is Linux-specific, as the Apple and BSD versions of `pthread_set_name_np return `void`. - Change the name for CPU threads in multi-core mode from "yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it fits into the Linux limit. Some other thread names are also cut off, but I didn't bother addressing them as you can guess them from the truncated versions. For a CPU thread, truncation means you can't see which core it is!
* | | | Merge pull request #4530 from Morph1984/mjolnir-p1Gravatar bunnei2020-08-271-1/+1
|\ \ \ \ | | | | | | | | | | Project Mjölnir: Part 1 - Input Rewrite
| * | | | Project Mjölnir: Part 1Gravatar Morph2020-08-261-1/+1
| | |/ / | |/| | | | | | | | | | | | | | Co-authored-by: James Rowe <jroweboy@gmail.com> Co-authored-by: Its-Rei <kupfel@gmail.com>
* | | | Merge pull request #4577 from lioncash/assertsGravatar bunnei2020-08-271-3/+4
|\ \ \ \ | |/ / / |/| | | common/assert: Make use of C++ attribute syntax
| * | | common/assert: Make use of C++ attribute syntaxGravatar Lioncash2020-08-241-3/+4
| | |/ | |/| | | | | | | Normalizes the syntax used for attributes
* | | Merge pull request #4548 from lioncash/colorGravatar bunnei2020-08-251-2/+2
|\ \ \ | |/ / |/| | common/color: Migrate code over to the Common namespace
| * | common/color: Migrate code over to the Common namespaceGravatar Lioncash2020-08-181-2/+2
| | | | | | | | | | | | | | | No external code makes use of this header, so we can freely change the namespace.
* | | web_service: Move web_result.h into web_serviceGravatar Lioncash2020-08-222-26/+0
| | | | | | | | | | | | | | | | | | | | | This is the only place it's actively used. It's also more appropriate for web-related structures to be within the web service target. Especially given this one doesn't rely on anything in the common library.
* | | Merge pull request #4546 from lioncash/telemetryGravatar bunnei2020-08-202-4/+4
|\ \ \ | | | | | | | | common/telemetry: Migrate namespace into the Common namespace
| * | | common/telemetry: Migrate namespace into the Common namespaceGravatar Lioncash2020-08-182-4/+4
| |/ / | | | | | | | | | | | | Migrates the Telemetry namespace into the Common namespace to make the code consistent with the rest of our common code.
* | | Merge pull request #4547 from lioncash/header-conceptGravatar bunnei2020-08-191-2/+2
|\ \ \ | | | | | | | | common/concepts: Move <type_traits> include out of the Common namespace
| * | | common/concepts: Move <type_traits> include out of the Common namespaceGravatar Lioncash2020-08-181-2/+2
| |/ / | | | | | | | | | This is a compiler/linker error waiting to happen.
* | | Revert "common/time_zone: Simplify GetOsTimeZoneOffset()"Gravatar bunnei2020-08-191-5/+9
| | |
* | | Merge pull request #4539 from lioncash/discGravatar bunnei2020-08-182-3/+3
|\ \ \ | |/ / |/| | common: Silence two discarded result warnings
| * | common: Silence two discarded result warningsGravatar Lioncash2020-08-162-3/+3
| | | | | | | | | | | | | | | | | | | | | These are intentionally discarded internally, since the rest of the public API allows querying success. We want all non-internal uses of these functions to be explicitly checked, so we can signify that we intentionally want to discard the return values here.
* | | Merge pull request #4535 from lioncash/fileutilGravatar bunnei2020-08-173-41/+49
|\ \ \ | | | | | | | | common/fileutil: Convert namespace to Common::FS
| * | | common/fileutil: Convert namespace to Common::FSGravatar Lioncash2020-08-163-41/+49
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
* / / common/time_zone: Simplify GetOsTimeZoneOffset()Gravatar Lioncash2020-08-161-9/+5
|/ / | | | | | | | | | | | | We can simplify this function down into a single line with the use of fmt. A benefit with the fmt approach is that the fmt variant of localtime is thread-safe as well, making GetOsTimeZoneOffset() thread-safe as well.
* | common/compression: Roll back std::span changesGravatar Lioncash2020-08-154-37/+43
| | | | | | | | Seems like all compilers don't support std::span yet.
* | common: Make use of [[nodiscard]] where applicableGravatar Lioncash2020-08-1534-358/+343
| | | | | | | | | | | | Now that clang-format makes [[nodiscard]] attributes format sensibly, we can apply them to several functions within the common library to allow the compiler to complain about any misuses of the functions.
* | Merge pull request #4416 from lioncash/spanGravatar bunnei2020-08-154-28/+23
|\ \ | | | | | | lz4_compression/zstd_compression: Make use of std::span in interfaces
| * | lz4_compression: Make use of std::span in interfacesGravatar Lioncash2020-07-252-17/+14
| | | | | | | | | | | | Allows compressing the data and size parameters into one.
| * | zstd_compression: Make use of std::span in interfacesGravatar Lioncash2020-07-252-11/+9
| | | | | | | | | | | | Allows condensing the data and size parameters into a single argument.
* | | Merge pull request #4511 from lioncash/build2Gravatar LC2020-08-133-4/+3
|\ \ \ | | | | | | | | General: Tidy up clang-format warnings part 2
| * | | General: Tidy up clang-format warnings part 2Gravatar Lioncash2020-08-133-4/+3
| | | |
* | | | Merge pull request #4493 from jbeich/dragonflyGravatar bunnei2020-08-111-9/+0
|\ \ \ \ | |/ / / |/| | | common/virtual_buffer: drop unused includes
| * | | common/virtual_buffer: drop unused includesGravatar Jan Beich2020-08-051-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On DragonFly and NetBSD build fails with src/common/virtual_buffer.cpp src/common/virtual_buffer.cpp:16:10: fatal error: sys/sysinfo.h: No such file or directory #include <sys/sysinfo.h> ^~~~~~~~~~~~~~~
* | | | General: Tidy up clang-format warningsGravatar Lioncash2020-08-081-1/+1
| | | |
* | | | common/concepts: Rename IsBaseOf to DerivedFromGravatar Lioncash2020-08-071-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it more inline with its currently unavailable standardized analogue std::derived_from. While we're at it, we can also make the template match the requirements of the standardized variant as well.
* | | | Merge pull request #4483 from lioncash/constexpr-hexGravatar bunnei2020-08-062-40/+23
|\ \ \ \ | |_|_|/ |/| | | partition_data_manager: Make data arrays constexpr
| * | | partition_data_manager: Make data arrays constexprGravatar Lioncash2020-08-062-40/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the constructor for all of these would run at program startup, consuming time before the application can enter main(). This is also particularly dangerous, given the logging system wouldn't have been initialized properly yet, yet the program would use the logs to signify an error. To rectify this, we can replace the literals with constexpr functions that perform the conversion at compile-time, completely eliminating the runtime cost of initializing these arrays.
* | | | Merge pull request #4477 from lioncash/log-desigGravatar bunnei2020-08-052-21/+15
|\ \ \ \ | |_|/ / |/| | | logging/backend: Make use of designated initializers
| * | | logging/backend: Make use of designated initializersGravatar Lioncash2020-08-032-21/+15
| |/ / | | | | | | | | | Same behavior, less code.
* | | Merge pull request #4444 from lioncash/volatileGravatar bunnei2020-08-052-21/+26
|\ \ \ | |/ / |/| | common/atomic_ops: Don't cast away volatile from pointers
| * | common/atomic_ops: Don't cast away volatile from pointersGravatar Lioncash2020-07-282-21/+26
| | | | | | | | | | | | Preserves the volatility of the pointers being casted.
* | | ipc: Allow all trivially copyable objects to be passed directly into ↵Gravatar David2020-08-032-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WriteBuffer (#4465) * ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer With the support of C++20, we can use concepts to deduce if a type is an STL container or not. * More agressive concept for stl containers * Add -fconcepts * Move to common namespace * Add Common::IsBaseOf
* | | Merge pull request #4263 from lat9nq/fix-screencaps-2Gravatar David2020-08-033-0/+3
|\ \ \ | |/ / |/| | screenshots: Option to save screenshots immediately in a specified directory + Linux workaround