The result code classes are used quite extensively throughout both the
kernel and service HLE code. We can mark these member functions as
[[nodiscard]] to prevent a few logic bugs from slipping through.
- Previously, we would allocate a thread per session, which adds new threads on CloneCurrentObject.
- This results in race conditions with N sessions queuing requests to the same service interface.
- Fixes Pokken Tournament DX crashes/softlocks, which were regressed by #6347.
Correct light theme loading
The setLayout call in game list instantiation will call resizing signals with default values in light theme, which was then being erroneously saved. setLayout doesn't seem to call resizing for any other theme, so I'm not sure why that happens.
Delegates libusb external communication to externals/CMakeLists.txt
Ensures an interface library `usb` for every pathway
input_common just links to the `usb` library now
externals/libusb/CMakeLists.txt sets variables to override SDL2's libusb
finding
Other minor cleanup
Causes a heap-use-after free reported by AddressSanitizer. This makes
use of std::filesystem::path, but due to that we have to use their
string() function which may not work for all characters.
There's no need to check the first and last rows since they'll always be the Favorites and AddDir rows.
Also change the name of the clear_all variable for consistency.
Builds on german77's work to reset all settings back to their defaults.
This include UISettings and Settings values structs, but does not affect
save profiles, input profiles, and game directories.
This works from a button input in configure_general. When activated, it
calls a callback to close the whole configure dialog, then GMainWindow
deletes the old configuration, both on disk and in memory, and
reinitalizes a new one. It also resets a portion of the UI and calls the
telemetry window prompt.
This commit does not compile.
Initial work to add and connect a Reset to Defaults button to the
configure_general tab.
Co-authored-by: german77 <juangerman-13@hotmail.com>
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.
ldn: Add and stub lp2p:sys lp2p:app INetworkServiceMonitor INetworkService
Mario Kart Live: Home Circuit needs lp2p:sys lp2p:app INetworkServiceMonitor INetworkService to be able to progress.
Note: The game still fails to boot from unimplemented LDN and BSD services.
- Fixes a hang on shutdown when NVFlinger thread is waiting on a syncpoint that will never occur.
- Commonly observed when stopping emulation in Super Mario Odyssey.
We just create one memory subsystem. This is a constant all the time.
So there is no need to call the non-inlined parent.Memory() helper on every callback.
Over the course of the kernel refactoring a tiny bit of missing
overrides slipped through review, so we can add these.
While we're at it, we can remove redundant virtual keywords where
applicable as well.
- Use host allocations for kernel memory, as this is not properly emulated yet.
- Use guest allocations for TLS, as this needs to be backed by DeviceMemory.
Applications may leave this region of memory uninitialized when the text check result is not either Failure or Confirm.
Attempting to read uninitialized memory may cause an exception within the UTF16 to UTF8 string converter.
Fix this by only reading the text check message on Failure or Confirm.
If the local version of Qt is older than the minimum version required by
yuzu, download a pre-built binary package from yuzu-emu/ext-linux-bin
and build yuzu with it, instead.
This also requires linking yuzu to the correct libraries after building
it, and copying over the required binaries when building yuzu.
This sets the Qt requirement to 5.12, which is intentionally behind the
versions used by our toolchains since they are not all updated yet to
5.15.
This code was used to switch the CPU ID on thread switches.
However since "hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.", the CPU ID is not a constant.
This has been dead code since this rewrite, and dropped in dynarmic as well. So there is no need to keep it.
Currently with programs that have a 0 title id, yuzu loads the custom
configuration 0000000000000000.ini for per-game configs. This is not
ideal since many homebrews share this id. Instead for these programs, we
load a config that is simply the file name and `.ini` appended to it.
* 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
Most of the code already exists to do this, but the Apply button itself
was never added. This adds a button and boolean that tells yuzu to save
the configuration after applying settings, even if close/Cancel is
pressed on the dialog. Changes after applying will not be saved when
Cancel is pressed, though.
Some users have reported rare crashes when pressing the Enter key on the keyboard to confirm input in the normal software keyboard, particularly in Super Smash Bros. Ultimate while entering the name of a ruleset or controller layout.
It is suspected that the QLineEdit::returnPressed signal is causing a race condition as confirming input through other means does not produce the crash. Since Qt::QueuedConnection posts an event to the event queue of the callee's thread instead of executing it directly on the caller's thread, this eliminates any potential race conditions from occurring in this scenario.
Drops an unused variant of ApplyPerGameSetting, and turns the QComboBox
variants of SetPerGameSetting into a template.
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
Previously the text string for the inline software keyboard was being sent instead of the normal software keyboard, leading to empty text being sent all the time.
Duplicate labels were unintentionally introduced due to copy-paste. This silences the compilation warning produced by the presence of these duplicates.
Many users have been installing their base titles into NAND instead of adding them into the games list. This prevents users from installing any base titles and warns the user about the action.
Now that we have most of core free of shadowing, we can enable the
warning as an error to catch anything that may be remaining and also
eliminate this class of logic bug entirely.
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.
Originally, every time we add a per-game setting, we'd have to guard for
it when setting it on the global config, and use a specific function to
do it for the per-game config.
This moves the global check into the ApplyPerGameSetting function so
that we can use it for changing both the global and per-game states.
Less work for the programmer.
The FPS counter was based on metrics in the nvdisp swapbuffers call. This metric would be accurate if the gpu thread/renderer were synchronous with the nvdisp service, but that's no longer the case.
This commit moves the frame counting responsibility onto the concrete renderers after their frame draw calls. Resulting in more meaningful metrics.
The displayed FPS is now made up of the average framerate between the previous and most recent update, in order to avoid distracting FPS counter updates when framerate is oscillating between close values.
The status bar update frequency was also changed from 2 seconds to 500ms.
We can use the dedicated memory function for performing copies instead
of reading into a temporary buffer and then immediately writing it back
out to memory.
Eliminates a bit of heap memory churn.