summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2021-10-14string_util: Make use of std::string_view and add bounds checkingMorph
Makes use of std::string_view in StringFromFixedZeroTerminatedBuffer and add bounds checking
2021-10-14string_util: Prevent out of bounds access in u16string_view bufferMorph
2021-10-11common/fs/path_util: Slightly refactor PathManagerImpl's constructorCreak
This moves all GenerateYuzuPath calls outside of the platofrm-specific #ifdefs, replacing them with assignments to paths.
2021-10-05Merge pull request #7115 from ameerj/log-compilebunnei
common/logging: Reduce dependent header include overhead
2021-10-01Merge pull request #7102 from Morph1984/remove-boxcatbunnei
Remove Boxcat BCAT backend
2021-10-01common/logging: Reduce scope of fmt includeameerj
2021-10-01common/logging: Move Log::Entry declaration to a separate headerameerj
This reduces the load of requiring to include std::chrono in all files which include log.h
2021-09-29Fixed invalid iterator usageAndrew Strelsky
2021-09-29settings: Remove BCAT settingsMorph
2021-09-24general: Update style to clang-format-12ameerj
2021-09-22common/uuid: Add validity checking functions to interfaceLioncash
Given we have a function to invalidate, we should also have ones to query the validity. Also makes the code more straightforward to read.
2021-09-18Merge pull request #7019 from ameerj/videocore-jthreadbunnei
videocore: Use std::jthread for worker threads
2021-09-18input_common/tas: Document the main classgerman77
2021-09-18input_common/tas: Add swap controllergerman77
2021-09-18input_common/tas: Fallback to simple updateMonsterDruide1
2021-09-18config: Move TAS options to it's own menugerman77
2021-09-18core: Hacky TAS syncing & load pausingMonsterDruide1
To keep the TAS inputs synced to the game speed even through lag spikes and loading zones, deeper access is required. First, the `TAS::UpdateThread` has to be executed exactly once per frame. This is done by connecting it to the service method the game calls to pass parameters to the GPU: `Service::VI::QueueBuffer`. Second, the loading time of new subareas and/or kingdoms (SMO) can vary. To counteract that, the `CPU_BOOST_MODE` can be detected: In the `APM`-interface, the call to enabling/disabling the boost mode can be caught and forwarded to the TASing system, which can pause the script execution if neccessary and enabled in the settings.
2021-09-18settings: File selector & other settingsMonsterDruide1
First of all, TASing requires a script to play back. The user can select the parent directory at `System -> Filesystem`, next to an option to pause TAS during loads: This requires a "hacky" setup deeper in the code and will be added in the last commit. Also, Hotkeys are being introduced: CTRL+F5 for playback start/stop, CTRL+F6 for re-reading the script and CTRL+F7 for recording a new script.
2021-09-18input_common/tas: Base playback & recording systemMonsterDruide1
The base playback system supports up to 8 controllers (specified by `PLAYER_NUMBER` in `tas_input.h`), which all change their inputs simulataneously when `TAS::UpdateThread` is called. The recording system uses the controller debugger to read the state of the first controller and forwards that data to the TASing system for recording. Currently, this process sadly is not frame-perfect and pixel-accurate. Co-authored-by: Naii-the-Baf <sfabian200@gmail.com> Co-authored-by: Narr-the-Reg <juangerman-13@hotmail.com>
2021-09-18Merge pull request #7020 from Moonlacer/remove_audio_stretchingbunnei
Remove audio stretching
2021-09-17Merge pull request #6950 from german77/multiplaybunnei
input_common: Add advanced setting for 8 player support
2021-09-15fix_accidental_deletionMoonlacer
2021-09-15remove-audio-stretching-settingMoonlacer
2021-09-15threadsafe_queue: Add std::stop_token overload to PopWaitameerj
Useful for jthreads which make use of the threadsafe queues.
2021-09-13common_funcs: Add enum flag bitwise shift operator overloadsMorph
This adds bitwise shift operator overloads (<<, >>, <<=, >>=) in the macro DECLARE_ENUM_FLAG_OPERATORS(type)
2021-09-11common_funcs: Replace <algorithm> with <iterator>Morph
2021-09-11common: Move error handling to error.cpp/hMorph
This allows us to avoid implicitly including <string> every time common_funcs.h is included.
2021-09-11Merge pull request #6846 from ameerj/nvdec-gpu-decodeFernando S
nvdec: Add GPU video decoding for all capable drivers and platforms
2021-09-10input_common: Enable steam controllers and 8 player supportgerman77
2021-09-01common/logging: Add missing includegerman77
2021-08-31Merge pull request #6897 from FernandoS27/pineapple-does-not-belong-in-pizzabunnei
Project <tentative title>: Rework Garbage Collection.
2021-08-29Garbage Collection: Adress Feedback.Fernando Sahmkow
2021-08-28Merge pull request #6927 from german77/ngctMorph
ngct: Stub NGCT:U service
2021-08-28Garbage Collection: enable as default, eliminate option.Fernando Sahmkow
2021-08-28VideoCore: Rework Garbage Collection.Fernando Sahmkow
2021-08-27ngct: Stub NGCT:U servicegerman77
2021-08-27Revert "logging: Display backtrace on crash"Morph
2021-08-26Merge pull request #6870 from yzct12345/trace-back-stack-back-stack-backbunnei
logging: Display backtrace on crash
2021-08-24logging: Fix log filter during initializationameerj
The log filter was being ignored on initialization due to the logging instance being initialized before the config instance, so the log filter was set to its default value. This fixes that oversight, along with using descriptive exceptions instead of abort() calls.
2021-08-22Merge pull request #6869 from yzct12345/shiny-logs-in-the-fireplacebunnei
logging: Simplify and make thread-safe
2021-08-21settings: Amend language_index maximum setting rangeMorph
The maximum is now 17 with the addition of Brazilian Portuguese
2021-08-19Merge pull request #6877 from MerryMage/dyn-ignore-assertsbunnei
dynarmic: Update and enable DYNARMIC_IGNORE_ASSERTS
2021-08-16configure_graphics: Add GPU nvdec decoding as an optionameerj
Some system configurations may see visual regressions or lower performance using GPU decoding compared to CPU decoding. This setting provides the option for users to specify their decoding preference. Co-Authored-By: yzct12345 <87620833+yzct12345@users.noreply.github.com>
2021-08-16Merge pull request #6863 from spholz/fix-lan-playFernando S
Fix LAN Play
2021-08-15xbyak: Update include pathMerry
2021-08-13threadsafe_queue: Fix deadlockyzct12345
This fixes a lost wakeup in SPSCQueue. If the reader is in just the right position, the writer's notification will be lost and this will be a problem if the writer then does something to wait on the reader. This was discovered to affect my upcoming stacktrace PR. I don't think any performance decrease will be noticeable because an uncontended mutex is smart enough to skip the syscall. This PR might also resolve some rare deadlocks but I don't know of any examples.
2021-08-13logging: Display backtrace on crashyzct12345
This implements backtraces so we don't have to tell users how to use gdb anymore. This prints a backtrace after abort or segfault is detected. It also fixes the log getting cut off with the last line containing only a bracket. This change lets us know what caused a crash not just what happened the few seconds before it. I only know how to add support for Linux with GCC. Also this doesn't work outside of C/C++ such as in dynarmic or certain parts of graphics drivers. The good thing is that it'll try and just crash again but the stack frames are still there so the core dump will work just like before.
2021-08-13logging: Simplify and make thread-safeyzct12345
This simplifies the logging system. This also fixes some lost messages on startup. The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation. With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
2021-08-12Merge branch 'yuzu-emu:master' into fix-lan-playspholz
2021-08-12configuration: add option to select network interfacespholz
This commit renames the "Services" tab to "Network" and adds a combobox that allows the user to select the network interface that yuzu should use. This new setting is now used to get the local IP address in Network::GetHostIPv4Address. This prevents yuzu from selecting the wrong network interface and thus using the wrong IP address. The return type of Network::GetHostIPv4Adress has also been changed.