aboutsummaryrefslogtreecommitdiff
path: root/src/core/core.cpp
AgeCommit message (Collapse)Author
2022-06-14kernel: implement KProcess suspensionLiam
2022-06-10core/debugger: fix a number of shutdown deadlocksLiam
2022-06-01core/debugger: Implement new GDB stub debuggerLiam
2022-04-24Remove unused PrepareReschedule functionMerry
2022-03-19core: Reduce unused includesameerj
2022-03-07core: Don't shutdown a null GPUlat9nq
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-02-21core: hle: kernel: KProcess: Pass in KResourceLimit on process creation.bunnei
- This allows us to have a resource limit per process, rather than use the global system resource limit.
2022-01-03gpu: Add shut down method to synchronize threads before destructionameerj
2021-12-06core: hle: kernel: Reflect non-emulated threads as core 3.bunnei
2021-11-24core: Register HIDgerman77
2021-11-04Merge pull request #7279 from Morph1984/system-get-program-idMorph
general: Get the current process program id directly from the system
2021-11-04core: Reorder perf_stats destruction order on Shutdownameerj
Avoids the gpu_core using perf_stats after it's been freed.
2021-11-04general: Get the current process program id directly from the systemMorph
This allows us to avoid including KProcess' header file in files that only need to get the current process' program id.
2021-11-04general: Rename GetTitleID to GetProgramIDMorph
2021-11-03core: Remove unused includesameerj
2021-10-27Revert PR7009Feng Chen
2021-10-17settings: Remove std::chrono usageameerj
Alleviates the dependency on chrono for all files that include settings.h
2021-10-16NvHost/Core: Address Feedback.Fernando Sahmkow
2021-10-16Suspend temporallyFernandoS27
2021-10-15core: Move ResultStatus outside of SystemMorph
Allows it to be a forward declaration in other header files.
2021-10-15core: Remove static system instanceMorph
2021-10-01core: Add Exit and ExitCallbackMorph
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-09-23video_core: Fix jthread related hangs when stopping emulationameerj
jthread on some compilers is more picky when it comes to the order in which objects are destroyed.
2021-09-15gpu: Use std::jthread for async gpu threadameerj
2021-09-13core: Destroy main_process during shutdownameerj
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-08-25Revert "kernel: Various improvements to scheduler"bunnei
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-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-07core: hle: kernel: Reflect non-emulated threads as core 3.bunnei
2021-07-23general: Rename "Frame Limit" references to "Speed Limit"ameerj
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.
2021-07-20file_sys: Support load game collection (#6582)Feng Chen
Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
2021-07-14service: Append service name prefix to common filenamesMorph
2021-07-08general: Code formatting improvementslat9nq
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>
2021-06-28general: Make most settings a BasicSettinglat9nq
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.
2021-06-22core: Make is_powered_on atomicRodrigo Locatti
Fixes potential data races when shutting down.
2021-05-25common: fs: Rework the Common Filesystem interface to make use of ↵Morph
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
2021-05-20Merge pull request #6321 from lat9nq/per-game-cpubunnei
configuration: Add CPU tab to game properties and slight per-game settings rework
2021-05-17general: Demote custom_rtc to regular settinglat9nq
2021-05-15perf_stats: Rework FPS counter to be more accurateameerj
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.
2021-05-05hle: kernel: Rename Process to KProcess.bunnei
2021-05-05hle: kernel: Migrate KClientPort to KAutoObject.bunnei
2021-05-05hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps.bunnei
2021-05-05hle: kernel: Migrate KProcess to KAutoObject.bunnei
2021-05-05core: Defer CoreTiming initialization.bunnei
2021-05-05core: memory: Add a work-around to allocate and access kernel memory regions ↵bunnei
by vaddr.
2021-04-14common: Move settings to common from core.bunnei
- Removes a dependency on core and input_common from common.
2021-04-07video_core/gpu_thread: Implement a ShutDown method.Markus Wick
This was implicitly done by `is_powered_on = false`, however the explicit method allows us to block until the GPU is actually gone. This should fix a race condition while removing the other subsystems while the GPU is still active.
2021-03-01core: Shutdown: Move kernel cleanup to later in shutdown.bunnei
- Fixes a shutdown crash due to a race condition with GPU still accessing memory.
2021-02-20kernel: Fix resource release exception on exitameerj
After rewriting the resource limit, objects releasing reserved resources require a live kernel instance. This commit fixes exceptions that occur due to the kernel being destroyed before some objects released their resources, allowing for a graceful exit.