Commit Graph

341 Commits (2931101e6f5aa755566ef40f6e6dc71909fd3e92)

Author SHA1 Message Date
Fernando Sahmkow 2931101e6f NVDRV: Refactor Host1x 3 years ago
Fernando Sahmkow 668e80a9f4 VideoCore: Refactor syncing. 3 years ago
Kelebek1 e93e898df5 Remove pause callbacks from coretiming 3 years ago
FearlessTobi 839e1faf49 yuzu: Display current game version in multiplayer room
Makes it easier for users to recognize connection errors caused by different game versions.
3 years ago
Andrea Pappacoda cdb240f3d4
chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to 01cf05bc75
3 years ago
FearlessTobi 7d82e57b91 network: Move global state into a seperate class
Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com>
3 years ago
FearlessTobi 7fbd2916a1 core: Fix -Wunused-variable 3 years ago
FearlessTobi 705f7db84d yuzu: Add ui files for multiplayer rooms 3 years ago
Kelebek1 458da8a948 Project Andio 3 years ago
Liam 888f499188 kernel: implement KProcess suspension 3 years ago
Liam 1f0fee33ed core/debugger: fix a number of shutdown deadlocks 3 years ago
Liam fb4b3c127f core/debugger: Implement new GDB stub debugger 3 years ago
Merry 91a6df0361 Remove unused PrepareReschedule function 3 years ago
ameerj ade596121b core: Reduce unused includes 3 years ago
lat9nq 381f1dd2c9 core: Don't shutdown a null GPU
When CreateGPU fails, yuzu would try and shutdown the GPU instance
regardless of whether any instance was actually created.

Check for nullptr before calling its methods to prevent a crash.
3 years ago
bunnei a74fddc98f core: hle: kernel: KProcess: Pass in KResourceLimit on process creation.
- This allows us to have a resource limit per process, rather than use the global system resource limit.
3 years ago
ameerj c17938f96b gpu: Add shut down method to synchronize threads before destruction 3 years ago
bunnei 669a2d2c67 core: hle: kernel: Reflect non-emulated threads as core 3. 3 years ago
german77 967cca10ff core: Register HID 3 years ago
Morph 3a71ff44f8
Merge pull request #7279 from Morph1984/system-get-program-id
general: Get the current process program id directly from the system
3 years ago
ameerj 0cf78a34ba core: Reorder perf_stats destruction order on Shutdown
Avoids the gpu_core using perf_stats after it's been freed.
3 years ago
Morph a6e6a5ac38 general: Get the current process program id directly from the system
This allows us to avoid including KProcess' header file in files that only need to get the current process' program id.
3 years ago
Morph 64275dfbf4 general: Rename GetTitleID to GetProgramID 3 years ago
ameerj 7c4b6aab2e core: Remove unused includes 3 years ago
Feng Chen 052017e189 Revert PR7009 3 years ago
ameerj ef811c6425 settings: Remove std::chrono usage
Alleviates the dependency on chrono for all files that include settings.h
4 years ago
Fernando Sahmkow 53cf91d151 NvHost/Core: Address Feedback. 4 years ago
FernandoS27 198c6ad0d7 Suspend temporally 4 years ago
Morph 17763a44d5 core: Move ResultStatus outside of System
Allows it to be a forward declaration in other header files.
4 years ago
Morph b6719094e6 core: Remove static system instance 4 years ago
Morph d8467ca6c0 core: Add Exit and ExitCallback
This allows ISelfController::Exit to stop the currently running application. This is typically used by homebrew to exit back to the homebrew menu after calling consoleExit with libnx.
4 years ago
ameerj ab63a193d7 video_core: Fix jthread related hangs when stopping emulation
jthread on some compilers is more picky when it comes to the order in which objects are destroyed.
4 years ago
ameerj 877cd60b00 gpu: Use std::jthread for async gpu thread 4 years ago
ameerj 67f7a6c398 core: Destroy main_process during shutdown
The main_process was never being cleaned up, causing a noticeable memory leak after subsequent launches. This change cleans up the memory during Core Shutdown, mitigating the leak.
4 years ago
bunnei 0c8594b225
Revert "kernel: Various improvements to scheduler" 4 years ago
ameerj 84b4ac5729 logging: Fix log filter during initialization
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.
4 years ago
bunnei f65f8b9097
Merge pull request #6869 from yzct12345/shiny-logs-in-the-fireplace
logging: Simplify and make thread-safe
4 years ago
yzct12345 001675dced
logging: Simplify and make thread-safe
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.
4 years ago
bunnei 68eee94875 core: hle: kernel: Reflect non-emulated threads as core 3. 4 years ago
ameerj 9dfbc9bdce general: Rename "Frame Limit" references to "Speed Limit"
This setting is best referred to as a speed limit, as it involves the limits of all timing based aspects of the emulator, not only framerate.
This allows us to differentiate it from the fps unlocker setting.
4 years ago
Feng Chen 07073734ed
file_sys: Support load game collection (#6582)
Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
4 years ago
Morph c6d7da88c7 service: Append service name prefix to common filenames 4 years ago
lat9nq a949ee0410 general: Code formatting improvements
Slight improvements to readability.

Dropped suggestions for string_view (settings.h:101), pass by value
(settings.h:82), reverting double to a float (config.cpp:316), and other
smaller ones, some out of scope.

Addresses review feedback.

Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
4 years ago
lat9nq b91b76df4f general: Make most settings a BasicSetting
Creates a new BasicSettings class in common/settings, and forces setting
a default and label for each setting that uses it in common/settings.
Moves defaults and labels from both frontends into common settings.
Creates a helper function in each frontend to facillitate reading the
settings now with the new default and label properties.

Settings::Setting is also now a subclass of Settings::BasicSetting. Also
adds documentation for both Setting and BasicSetting.
4 years ago
Rodrigo Locatti c9c8537643 core: Make is_powered_on atomic
Fixes potential data races when shutting down.
4 years ago
Morph 065867e2c2
common: fs: Rework the Common Filesystem interface to make use of 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
4 years ago
bunnei 7626ca3343
Merge pull request #6321 from lat9nq/per-game-cpu
configuration: Add CPU tab to game properties and slight per-game settings rework
4 years ago
lat9nq 339dc4f806 general: Demote custom_rtc to regular setting 4 years ago
ameerj 5bef54618a perf_stats: Rework FPS counter to be more accurate
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.
4 years ago
bunnei 2a7eff57a8 hle: kernel: Rename Process to KProcess. 4 years ago