summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2021-06-02Merge pull request #6395 from lioncash/result-moveMorph
common_funcs: Move R_ macros to result.h
2021-06-02common: fs: fs_util: Move PathToUTF8String to fs_utilMorph
2021-06-02common: fs: fs_util: Add more string conversion functionsMorph
2021-05-31common_funcs: Move R_ macros to result.hLioncash
These macros all interact with the result code type, so they should ideally be within this file as well, so all the common_funcs machinery doesn't need to be pulled in just to use them.
2021-05-30Merge pull request #6385 from degasus/save_memory_accessbunnei
core/memory: Check our memory fallbacks for out-of-bound behavior.
2021-05-29core/memory: Check our memory fallbacks for out-of-bound behavior.Markus Wick
This makes it by far harder to crash yuzu. Also implement the 48bit masking of AARCH64 while touching this code.
2021-05-28common: Extract point into a common structLioncash
This is generic enough that it can be moved into the Common class for reuse.
2021-05-28common/fs/file: Explicitly delete copy constructorsLioncash
Relocates them to the same place the move equivalents are at for consistent viewing.
2021-05-28common/fs/file: Devirtualize destructorLioncash
IOFile is a final class, so there's no need for a virtual destructor.
2021-05-28common/fs/file: Default initialize IOFile membersLioncash
Prevents a potential uninitialized read vector in the move constructor.
2021-05-25common: fs: Rework the Common Filesystem interface to make use of ↵Morph
std::filesystem (#6270) * common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
2021-05-24Merge pull request #6357 from lioncash/compressionbunnei
common/compression: Make use of std::span
2021-05-24zstd_compression: Make use of std::spanLioncash
Allows for the incoming data stream to be non-allocating.
2021-05-24lz4_compression: Make use of std::spanLioncash
Allows making the incoming data stream non-allocating.
2021-05-20common: tree: Avoid a crash on nullptr dereference.bunnei
2021-05-20Merge pull request #6321 from lat9nq/per-game-cpubunnei
configuration: Add CPU tab to game properties and slight per-game settings rework
2021-05-19Merge pull request #6297 from lioncash/common-convbunnei
parent_of_member: Make sign conversion explicit in OffsetOfImpl()
2021-05-17general: Demote custom_rtc to regular settinglat9nq
2021-05-16configuration: Add CPU tab to game propertieslat9nq
Allows setting CPU accuracy to Accurate or Unsafe per-game, as well as the accuracy options for Unsafe. Debug is not allowed here as a per-game CPU accuracy.
2021-05-15general: Make CPU accuracy and related a Settings::Settinglat9nq
Required to make CPU accuracy and unsafe settings available to use as a per-game setting.
2021-05-11common: tree: Avoid a nullptr dereference.bunnei
2021-05-10parent_of_member: Make sign conversion explicit in OffsetOfImpl()Lioncash
Previously these conversions were implicit and causing quite a few warnings on clang.
2021-05-05fixup! common: bit_util: Add BIT macro.bunnei
2021-05-05common: parent_of_member: Fix build for OffsetOf().bunnei
2021-05-05fixup! common: intrusive_red_black_tree: Disable static_assert that will not ↵bunnei
evaluate as constant on MSVC.
2021-05-05common: Rename NON_COPYABLE/NON_MOVABLE with YUZU_ prefix.bunnei
2021-05-05common: common_funcs: Add Size helper function.bunnei
2021-05-05common: bit_util: Add BIT macro.bunnei
2021-05-05common: intrusive_red_black_tree: Disable static_assert that will not ↵bunnei
evaluate as constant on MSVC.
2021-05-05common: common_funcs: Add helper macros for non-copyable and non-moveable.bunnei
- Useful for scenarios where we do not want to inherit from NonCopyable.
2021-04-20log/backend: Use in-class initializer for FileBackendLioncash
We can also avoid redundant constructions of the same string repeatedly.
2021-04-20log/backend: Make use of erase_ifLioncash
Same behavior, but less verbose.
2021-04-14Merge pull request #6199 from lioncash/log-nsbunnei
common/log: Move Log namespace into the Common namespace
2021-04-14log/backend: Correct order of const in copy constructorLioncash
Follows our predominant coding style. Also explicitly specifies the move constructor/assignment operator as well.
2021-04-14common/log: Move Log namespace into the Common namespaceLioncash
Forgot to move this over when I moved the rest of the source files with lacking namespaces over.
2021-04-14common: Move settings to common from core.bunnei
- Removes a dependency on core and input_common from common.
2021-04-14core: settings: Add setting for debug assertions and disable by default.bunnei
- This is a developer-only setting and no longer needs to be enabled by default. - Also adds "use_auto_stub" setting to SDL frontend while we are here. - Supersedes #1340.
2021-04-12nvidia_flags: Add missing header guardLioncash
Prevents potential inclusion compilation errors.
2021-04-10Merge pull request #6099 from bunnei/derive-membunnei
Kernel Rework: Derive memory regions from board layout.
2021-04-09Merge pull request #6162 from degasus/no_spin_loopsbunnei
video_core: Avoid spin loops.
2021-04-09bgtc: Update to 12.x and implement OpenTaskServiceMorph
2021-04-07common/threadsafe_queue: Provide Wait() method.Markus Wick
It shall block until there is something to consume in the queue. And use it for the GPU emulation instead of the spin loop. This is only in booting the emulator, however in BOTW this is the case for about 1 second.
2021-04-04common: Move assert failure handling into a cpp file.Markus Wick
Advantage: Altering the handler does not need a full recompilation. Disadvantage: noreturn is droped, so the caller is a bit slower. We quite often run yuzu with a YOLO assertion handler. In fact, only very few games run at all with asserts. This patch allows developers to patch the handler without recompiling everything. The overhead of the missing "noreturn" attribute shoul be negletable.
2021-03-23common: common_sizes: Move sizes to the Common namespace.bunnei
2021-03-21common: common_sizes: Move Invalid to Size_* prefix and add missing values.bunnei
2021-03-21hle: kernel: board: k_system_control: Extend to include memory region sizes.bunnei
2021-03-21common: Move common sizes to their own header for code reuse.bunnei
2021-03-10fiber: Double default stack sizeMerryMage
Stack overflow occurs with some guest applications
2021-03-07common: Fiber: use a reference for YieldTo.bunnei
- Fixes another small leak.
2021-03-05common: fiber: Use weak_ptr when yielding.bunnei
- Avoids a memory leak, as taking a strong reference of the fiber here causes a circular reference. - Supersedes #6006 with a more narrow fix.