- Directory is qt_themes, each theme must be in one folder
- It should contain a file "style.qss"
- It may contain an "icons" sub-directory, to override included icons
(with files like mytheme/icons/colorful/48x48/star.png for example)
- Directories ending by "_dark" are reserved for dark variant icons.
They are not listed as themes in the UI.
- If theme directory contains "dark" or "midnight", theme will be considered dark
Resolves a case on Windows where an unmounted bitlocker protected volume containing an assigned game directory would crash Yuzu at start.
May also resolve cases where a disconnected SMB volume causes similar crashes (needs testing)
This also covers std::span, which does not have a const iterator.
Also renames IsSTLContainer to IsContiguousContainer to explicitly convey its semantics.
Clang (rightfully) warns that we are checking for the existence of
pointer to something just allocated on the stack, which is always true.
Instead, check whether GetModuleFileNameW failed.
Co-authored-by: Mai M <mathew1800@gmail.com>
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
These functions allow to construct a string view from an input buffer, avoiding the copy done by the non string view counterparts. However, callers must be cognizant of the viewed buffer's lifetime to avoid a use-after-free.
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.
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.
It became apparent that logging can continuously spam errors that trigger file flushing.
Since committing the files to disk is an expensive operation, this causes unnecessarily high disk usage.
As such, we will revert Flush() to the previous behavior and add a Commit() member function in the event that this behavior is needed.
This check was preventing files with the Write or Append file access modes from being created, as per the documented behavior in FileAccessMode.
This amends the check to test for the existence of a filesystem object prior to checking whether it is a regular file.
Thanks to liushuyu for pointing out that removing the check altogether would not guard against attempting to open non-regular files such as directories, symlinks, FIFO (pipes), sockets, block devices, or character devices.
The documentation has also been updated for these functions to clarify that a file refers to a regular file.
Similarly, Flush() is typically called to attempt to flush a file into the disk. In the one case where this is used, we do not care whether the flush has succeeded or not, making [[nodiscard]] unnecessary.
There are a lot of scenarios where we don't particularly care whether or not the removal operation and just simply attempt a removal.
As such, removing the [[nodiscard]] attribute is best for these functions.
std::fflush does not guarantee that file buffers are flushed to the disk.
Use _commit on Windows and fsync on all other OSes to ensure that the file is flushed to the disk.
MSVC's implementation of recursive_directory_iterator throws an exception on an error despite a std::error_code being passed into its constructor. This is most likely a bug in MSVC's implementation since directory_iterator does not throw an exception on an error.
We can replace the usage of recursive_directory_iterator for now until MSVC fixes their implementation of it.