summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2020-04-17Merge pull request #3630 from benru/open-windows-network-filesbunnei
common/file_util: Allow access to files on network shares
2020-04-17Merge pull request #3672 from lioncash/nullFernando Sahmkow
file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
2020-04-17common: page_table: Update to use VirtualBuffer and simplify.bunnei
2020-04-17common: Add VirtualBuffer class, to abstract memory virtualization.bunnei
2020-04-17common: scope_exit: Implement mechanism for canceling a scope exit.bunnei
2020-04-17common: alignment: Add a helper function for generic alignment checking.bunnei
2020-04-17common: common_funcs: Add a macro for defining enum flag operators.bunnei
2020-04-15file_util: Early-exit in WriteArray and ReadArray if specified lengths are zeroLioncash
It's undefined behavior to pass a null pointer to std::fread and std::fwrite, even if the length passed in is zero, so we must perform the precondition checking ourselves. A common case where this can occur is when passing in the data of an empty std::vector and size, as an empty vector will typically have a null internal buffer. While we're at it, we can move the implementation out of line and add debug checks against passing in nullptr to std::fread and std::fwrite.
2020-04-10Merge pull request #3594 from ReinUsesLisp/vk-instancebunnei
yuzu: Drop SDL2 and Qt frontend Vulkan requirements
2020-04-09common/file_util: Allow access to files on network sharesBen Russell
On Windows, network shares use paths like \\server\share\file which were being broken by FileUtil::SanitizePath() removing double slashes. Changed the code in SanitizePath to permit a double-backslash if it occurs at the start of a filepath (on Windows only).
2020-04-07common/dynamic_library: Import and adapt helper from DolphinReinUsesLisp
2020-04-01common: Port some changes from dolphin (#5127)Vitor K
* IOFile: Make the move constructor and move assignment operator noexcept Certain parts of the standard library try to determine whether or not a transfer operation should either be a copy or a move. The prevalent notion of move constructors/assignment operators is that they should not throw, they simply move an already existing resource somewhere else. This is typically done with 'std::move_if_noexcept'. Like the name says, if a type's move constructor is noexcept, then the functions retrieves an r-value reference (for move semantics), or an l-value (for copy semantics) if it is not noexcept. As IOFile deletes the copy constructor and copy assignment operators, using IOFile with certain parts of the standard library can fail in unexcepted ways (especially when used with various container implementations). This prevents that. * fix various instances of -1 being assigned to unsigned types * do not assign in conditional statements * File/IOFile: Check _tfopen_s properly * common/file_util.cpp: address review comments Co-authored-by: Lioncash <mathew1800@gmail.com> Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com> Co-authored-by: Sepalani <sepalani@hotmail.fr>
2020-03-14Merge pull request #3508 from FernandoS27/page-tablebunnei
PageTable: move backing addresses to a children class as the CPU page table does not need them.
2020-03-14PageTable: move backing addresses to a children class as the CPU page table ↵Fernando Sahmkow
does not need them. This PR aims to reduce the memory usage in the CPU page table by moving GPU specific parameters into a child class. This saves 1Gb of Memory for most games.
2020-03-13shader/transform_feedback: Add host API friendly TFB builderReinUsesLisp
2020-03-09video_core: Rename "const buffer locker" to "registry"ReinUsesLisp
2020-03-09gl_shader_cache: Rework shader cache and remove post-specializationsReinUsesLisp
Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it.
2020-02-28common/math_util: Support float type rectanglesReinUsesLisp
2020-01-24Merge pull request #3326 from FearlessTobi/port-5039bunnei
Port citra-emu/citra#5039: "common/logging: don't use regex for path trimming"
2020-01-23common/logging: don't use regex for path trimmingBreadFish64
2020-01-23Address second part of review commentsFearlessTobi
2020-01-23Input: UDP Client to provide motion and touch controlsfearlessTobi
An implementation of the cemuhook motion/touch protocol, this adds the ability for users to connect several different devices to citra to send direct motion and touch data to citra. Co-Authored-By: jroweboy <jroweboy@gmail.com>
2020-01-17Remove unused CPU Vendor string and telemtry fieldJames Rowe
The information is duplicated in the brand string and the telemetry field is unused
2020-01-16Fix git version in scm_rev.cppJames Rowe
2019-12-16common: SPSCQueue: Notify after incrementing queue size.bunnei
2019-11-23fix clang-format and lambda captureWeiyi Wang
2019-11-23unfold UNREACHABLE implementation for dumb compilersWeiyi Wang
We relies on UNREACHABLE's noreturn attribute to eliminate parent's "no return value" warning. However, this was wrapped in a `if(!false)` block, which compilers may not unfold to recognize the noreturn nature.
2019-11-15common/logging: Silence no return value warningsReinUsesLisp
2019-11-14common_funcs: Remove semicolons from INSERT_PADDING_* macrosLioncash
Makes code that uses the macros consistent by requiring the lines to be terminated with a semicolon.
2019-11-13common/hash: Remove unused HashableStructLioncash
This is unused, so it can be removed. There's better ways of ensuring zeroed out padding bits, like using zero-initialization, anyhow.
2019-11-13common_funcs: silence sign-conversion warnings in MakeMagic()Lioncash
We can trivially resolve these by casting the characters to unsigned values and then shifting the bits.
2019-11-05ci: Populate build repository from Azure environmentZach Hilman
2019-11-03common_func: Use std::array for INSERT_PADDING_* macros.bunnei
- Zero initialization here is useful for determinism.
2019-11-03common/bit_field: Remove FORCE_INLINE calls Tobias
See bunneis comment here https://github.com/citra-emu/citra/pull/4629#discussion_r258533167. They were supposed to be removed by him, but he missed them.
2019-10-28Merge pull request #2971 from FernandoS27/new-scheduler-v2David
Kernel: Implement a New Thread Scheduler V2
2019-10-26Shader_IR: Address Feedback.Fernando Sahmkow
2019-10-25VideoCore: Unify const buffer accessing along engines and provide ↵Fernando Sahmkow
ConstBufferLocker class to shaders.
2019-10-15common/algorithm: Add description comment indicating intended algorithmsLioncash
Makes it explicit that the header is intended for iterator-based algorithms that can ideally operate on any type.
2019-10-15common: Rename binary_find.h to algorithm.hLioncash
Makes the header more general for other potential algorithms in the future. While we're at it, include a missing <functional> include to satisfy the use of std::less.
2019-10-15Kernel Scheduler: Make sure the global scheduler shutdowns correctly.Fernando Sahmkow
2019-10-06alignment: Resolve allocator construction issues on debugLioncash
This was related to the source allocator being passed into the constructor potentially having a different type than allocator being constructed. We simply need to provide a constructor to handle this case. This resolves issues related to the allocator causing debug builds on MSVC to fail.
2019-10-06alignment: Specify trait definitions within the allocatorLioncash
Allows containers and other data structures to consider optimizations based off of them. We satisfy all of these requirements anyways.
2019-10-05Merge pull request #2942 from ReinUsesLisp/clang-warningsbunnei
Silence miscellaneous warnings
2019-10-05Merge pull request #2943 from DarkLordZach/azure-titlebars-v2bunnei
ci: Add custom titlebars for mainline and patreon
2019-10-05common: Add additional SCM revision fieldsZach Hilman
2019-10-04common/file_util: Silence -WswitchReinUsesLisp
2019-10-04Shader_Ir: Refactor Decompilation process and allow multiple decompilation ↵Fernando Sahmkow
modes.
2019-10-04shader_ir: Corrections to outward movements and misc stuffsFernando Sahmkow
2019-09-22cmake: Add SCM detection for AzureZach Hilman
2019-09-21log: Add logging class for Cheat EngineZach Hilman
This is better than just using something like Common.Filesystem or Common.Memory