Commit Graph

352 Commits

Author SHA1 Message Date
arades79 60a68839ee remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:35:39 -05:00
arades79 adcef452e0 add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:33:11 -05:00
Liam c11dff8639 EmuThread: refactor 2022-12-17 16:26:24 -05:00
Liam 08d81c9726 general: improve handling of system startup failure 2022-12-06 16:13:42 -05:00
bunnei 94ee753735 core: Use atomic instead of a lock to protect is_paused.
- This allows us to call IsPaused() elsewhere if we are holding the suspend lock.
2022-11-26 13:46:38 -08:00
Liam a0ed2571c7 kernel: reinitialize after dram layout change 2022-10-30 11:01:22 -04:00
Liam ee969900ae core: barrier service thread shutdown 2022-10-23 05:45:45 -04:00
bunnei e3cb70d8df core: Initialize: Add missing braces. 2022-10-18 19:13:35 -07:00
bunnei 438c1b5c18 core: core_timing: Re-initialize if single/multicore state changes. 2022-10-18 19:13:35 -07:00
bunnei a35c884097 core: Partially persist emulation state across game boots. 2022-10-18 19:13:35 -07:00
Fernando Sahmkow 43d8a8fb77 NVDRV: Further refactors and eliminate old code. 2022-10-06 21:00:52 +02:00
Fernando Sahmkow 383f95a063 NVDRV: Refactor Host1x 2022-10-06 21:00:52 +02:00
Fernando Sahmkow a6425c97e4 VideoCore: Refactor syncing. 2022-10-06 21:00:52 +02:00
Kelebek1 c6d4071162 Remove pause callbacks from coretiming 2022-09-13 13:20:35 +01:00
FearlessTobi 31c4475420 yuzu: Display current game version in multiplayer room
Makes it easier for users to recognize connection errors caused by different game versions.
2022-08-27 03:31:17 +02:00
Andrea Pappacoda 6a2efdda2f 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 b2eb103829
2022-07-27 12:53:49 +02:00
FearlessTobi 10e2c8ef6a network: Move global state into a seperate class
Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com>
2022-07-25 21:59:31 +02:00
FearlessTobi 5ad67e876b core: Fix -Wunused-variable 2022-07-25 21:59:30 +02:00
FearlessTobi 60008b680e yuzu: Add ui files for multiplayer rooms 2022-07-25 21:59:28 +02:00
Kelebek1 be1f5f1d9f Project Andio 2022-07-22 01:11:32 +01:00
Liam 59a6d88625 kernel: implement KProcess suspension 2022-06-14 10:04:11 -04:00
Liam c14f683322 core/debugger: fix a number of shutdown deadlocks 2022-06-10 09:17:12 -04:00
Liam 2ee161a0bf core/debugger: Implement new GDB stub debugger 2022-06-01 00:01:25 -04:00
Merry 71b0b6274e Remove unused PrepareReschedule function 2022-04-24 12:10:16 +01:00
ameerj 22e01068e1 core: Reduce unused includes 2022-03-19 02:23:32 -04:00
lat9nq 7df809b8b1 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.
2022-03-07 15:25:20 -05:00
bunnei 09adf10025 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.
2022-02-21 12:41:31 -08:00
ameerj 664fcdc64b gpu: Add shut down method to synchronize threads before destruction 2022-01-03 20:47:26 -05:00
bunnei cae0bef7ec core: hle: kernel: Reflect non-emulated threads as core 3. 2021-12-06 16:39:16 -08:00
german77 4f3c5f0101 core: Register HID 2021-11-24 20:30:23 -06:00
Morph 86d6531083 Merge pull request #7279 from Morph1984/system-get-program-id
general: Get the current process program id directly from the system
2021-11-04 20:34:20 -04:00
ameerj a09800057a core: Reorder perf_stats destruction order on Shutdown
Avoids the gpu_core using perf_stats after it's been freed.
2021-11-04 20:19:58 -04:00
Morph 41a0c088ba 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.
2021-11-04 16:59:39 -04:00
Morph 10508e7af2 general: Rename GetTitleID to GetProgramID 2021-11-04 16:57:16 -04:00
ameerj d27abf5546 core: Remove unused includes 2021-11-03 21:42:57 -04:00
Feng Chen 301d0ac5e0 Revert PR7009 2021-10-27 09:06:30 +08:00
ameerj 6cfd975469 settings: Remove std::chrono usage
Alleviates the dependency on chrono for all files that include settings.h
2021-10-17 00:37:49 -04:00
Fernando Sahmkow 3aaf788385 NvHost/Core: Address Feedback. 2021-10-16 00:23:27 +02:00
FernandoS27 50495de641 Suspend temporally 2021-10-16 00:23:23 +02:00
Morph 458ab5a916 core: Move ResultStatus outside of System
Allows it to be a forward declaration in other header files.
2021-10-15 17:34:49 -04:00
Morph 3de2a8ba2c core: Remove static system instance 2021-10-15 17:34:48 -04:00
Morph 37e30e80ed 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.
2021-10-01 23:39:54 -04:00
ameerj a07f80d672 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.
2021-09-23 20:34:02 -04:00
ameerj 2cb4bb689b gpu: Use std::jthread for async gpu thread 2021-09-15 20:49:07 -04:00
ameerj 177affe3ce 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.
2021-09-13 23:44:52 -04:00
bunnei 5e600cba3a Revert "kernel: Various improvements to scheduler" 2021-08-25 20:59:28 -07:00
ameerj 0debad63cc 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.
2021-08-24 01:32:38 -04:00
bunnei f3931fe2b5 Merge pull request #6869 from yzct12345/shiny-logs-in-the-fireplace
logging: Simplify and make thread-safe
2021-08-22 20:40:18 -07:00
yzct12345 aee8cc20ea 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.
2021-08-13 18:39:45 +00:00
bunnei 951143ba57 core: hle: kernel: Reflect non-emulated threads as core 3. 2021-08-07 12:18:47 -07:00