aboutsummaryrefslogtreecommitdiff
path: root/src/core/core.cpp
Commit message (Collapse)AuthorAgeFilesLines
* logging: Fix log filter during initializationameerj2021-08-241-1/+9
| | | | | | 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.
* Merge pull request #6869 from yzct12345/shiny-logs-in-the-fireplacebunnei2021-08-221-2/+7
|\ | | | | logging: Simplify and make thread-safe
| * logging: Simplify and make thread-safeyzct123452021-08-131-2/+7
| | | | | | | | | | | | | | | | | | 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.
* | core: hle: kernel: Reflect non-emulated threads as core 3.bunnei2021-08-071-6/+0
|/
* general: Rename "Frame Limit" references to "Speed Limit"ameerj2021-07-231-5/+5
| | | | | 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.
* file_sys: Support load game collection (#6582)Feng Chen2021-07-201-7/+6
| | | Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
* service: Append service name prefix to common filenamesMorph2021-07-141-2/+2
|
* general: Code formatting improvementslat9nq2021-07-081-2/+2
| | | | | | | | | | | | 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>
* general: Make most settings a BasicSettinglat9nq2021-06-281-3/+3
| | | | | | | | | | | 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.
* core: Make is_powered_on atomicRodrigo Locatti2021-06-221-2/+3
| | | | Fixes potential data races when shutting down.
* common: fs: Rework the Common Filesystem interface to make use of ↵Morph2021-05-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge pull request #6321 from lat9nq/per-game-cpubunnei2021-05-201-1/+1
|\ | | | | configuration: Add CPU tab to game properties and slight per-game settings rework
| * general: Demote custom_rtc to regular settinglat9nq2021-05-171-1/+1
| |
* | perf_stats: Rework FPS counter to be more accurateameerj2021-05-151-1/+2
|/ | | | | | | | | 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.
* hle: kernel: Rename Process to KProcess.bunnei2021-05-051-7/+7
|
* hle: kernel: Migrate KClientPort to KAutoObject.bunnei2021-05-051-1/+1
|
* hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps.bunnei2021-05-051-1/+1
|
* hle: kernel: Migrate KProcess to KAutoObject.bunnei2021-05-051-3/+6
|
* core: Defer CoreTiming initialization.bunnei2021-05-051-1/+1
|
* core: memory: Add a work-around to allocate and access kernel memory regions ↵bunnei2021-05-051-0/+1
| | | | by vaddr.
* common: Move settings to common from core.bunnei2021-04-141-1/+10
| | | | - Removes a dependency on core and input_common from common.
* video_core/gpu_thread: Implement a ShutDown method.Markus Wick2021-04-071-1/+1
| | | | | | 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.
* core: Shutdown: Move kernel cleanup to later in shutdown.bunnei2021-03-011-12/+1
| | | | - Fixes a shutdown crash due to a race condition with GPU still accessing memory.
* kernel: Fix resource release exception on exitameerj2021-02-201-0/+3
| | | | | 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.
* core: hle: kernel: Rename Thread to KThread.bunnei2021-01-281-1/+1
|
* lm: Recode LM serviceChloe Marcec2021-01-201-12/+0
| | | | Rework the service to spit out to logs instead of a seperate file as well as fix any crashes caused by lm.
* core: Do not reset device_memory on shutdown.bunnei2020-12-281-1/+0
| | | | - This will be reset on initialization.
* core: settings: Untangle multicore from asynchronous GPU.bunnei2020-12-281-1/+1
| | | | - Now that GPU is always threaded, we can support multicore with synchronous GPU.
* Merge pull request #5131 from bunnei/scheduler-rewritebunnei2020-12-201-21/+5
|\ | | | | Rewrite Kernel scheduler based on Atmosphere
| * hle: kernel: Rewrite scheduler implementation based on Mesopshere.bunnei2020-12-061-21/+5
| |
* | core: Remove unnecessary enum casts in log callsLioncash2020-12-071-3/+2
|/ | | | | Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts.
* core: arm: Implement InvalidateCacheRange for CPU cache invalidation.bunnei2020-11-291-0/+4
|
* hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.bunnei2020-11-291-8/+5
|
* Merge pull request #5011 from lioncash/file-str2bunnei2020-11-271-12/+22
|\ | | | | core: Reduce string copies in GetGameFileFromPath()
| * core: Reduce string copies in GetGameFileFromPath()Lioncash2020-11-261-12/+22
| | | | | | | | | | Eliminates some minor string churn where applicable. Also eliminates an unnecessary vector copy.
* | core: Eliminate remaining usages of the global system instanceLioncash2020-11-271-6/+1
|/ | | | | | Removes all remaining usages of the global system instance. After this, migration can begin to migrate to being constructed and managed entirely by the various frontends.
* core: loader: Implement support for loading indexed programs.bunnei2020-11-241-6/+23
|
* hle: services: Fix a crash with improper NVFlinger lifetime management. (#4977)bunnei2020-11-241-3/+6
| | | | | | * hle: services: Fix a crash with improper NVFlinger lifetime management. - This crash would happen when attempting to shutdown yuzu early on in boot.
* Merge pull request #4942 from lioncash/systemRodrigo Locatti2020-11-241-9/+9
|\ | | | | core: Make use of [[nodiscard]] with the System class
| * core: Remove unused private Init function for the System classLioncash2020-11-181-8/+4
| | | | | | | | This isn't used, so it can be removed.
| * core: Make use of [[nodiscard]] with the System classLioncash2020-11-181-1/+5
| | | | | | | | | | Given this is a central class, we should flag cases where the return value of some functions not being used is likely a bug.
* | patch_manager: Remove usages of the global system instanceLioncash2020-11-181-3/+3
|/ | | | | | | With this, only 19 usages of the global system instance remain within the core library. We're almost there.
* core: Initialize GPU before services.bunnei2020-11-011-4/+6
|
* service: time: Update current time with changes to RTC setting.bunnei2020-10-121-1/+14
| | | | - This can be used to advance time, e.g. for Pokemon Sword/Shield pokejobs.
* service/sm: Eliminate dependency on the global system instanceLioncash2020-09-171-1/+1
|
* file_sys/bis_factory: Eliminate usage of the global system accessorLioncash2020-09-161-2/+2
|
* core/loader: Remove dependencies on the global system instanceLioncash2020-09-161-1/+1
| | | | | | | | | Now all that remains is: 18 instances in file_sys code 14 instances in GDB stub code (this can be tossed wholesale) 4 instances in HLE code 2 instances in settings code.
* video_core: Remove all Core::System references in rendererReinUsesLisp2020-09-061-1/+0
| | | | | | | | | Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend.
* common/telemetry: Migrate namespace into the Common namespaceLioncash2020-08-181-6/+6
| | | | | Migrates the Telemetry namespace into the Common namespace to make the code consistent with the rest of our common code.
* common/fileutil: Convert namespace to Common::FSLioncash2020-08-161-1/+1
| | | | | | | | | | | | Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.