From 43ce33b6cced1d049f1cef3a9b1fddcfad8aef7c Mon Sep 17 00:00:00 2001 From: M&M Date: Wed, 29 Jul 2020 10:25:37 -0700 Subject: logging/settings: Increase maximum log size to 100 MB and add extended logging option The extended logging option is automatically disabled on boot but can be enabled afterwards, allowing the log file to go up to 1 GB during that session. This commit also fixes a few errors that are present in the general debug menu. --- src/core/settings.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index 3681b5e9d..5a2f852fd 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -498,6 +498,7 @@ struct Values { bool reporting_services; bool quest_flag; bool disable_macro_jit; + bool extended_logging; // Misceallaneous std::string log_filter; -- cgit v1.2.3 From eb67a45ca82bc01ac843c853fd3c17f2a90e0250 Mon Sep 17 00:00:00 2001 From: ameerj Date: Mon, 26 Oct 2020 23:07:36 -0400 Subject: video_core: NVDEC Implementation This commit aims to implement the NVDEC (Nvidia Decoder) functionality, with video frame decoding being handled by the FFmpeg library. The process begins with Ioctl commands being sent to the NVDEC and VIC (Video Image Composer) emulated devices. These allocate the necessary GPU buffers for the frame data, along with providing information on the incoming video data. A Submit command then signals the GPU to process and decode the frame data. To decode the frame, the respective codec's header must be manually composed from the information provided by NVDEC, then sent with the raw frame data to the ffmpeg library. Currently, H264 and VP9 are supported, with VP9 having some minor artifacting issues related mainly to the reference frame composition in its uncompressed header. Async GPU is not properly implemented at the moment. Co-Authored-By: David <25727384+ogniK5377@users.noreply.github.com> --- src/core/settings.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index 9834f44bb..604805615 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -111,6 +111,7 @@ struct Values { Setting use_disk_shader_cache; Setting gpu_accuracy; Setting use_asynchronous_gpu_emulation; + Setting use_nvdec_emulation; Setting use_vsync; Setting use_assembly_shaders; Setting use_asynchronous_shaders; -- cgit v1.2.3 From 7aae6d6d2bd9784cba5df5b98cd29198456dcbeb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 4 Nov 2020 04:16:34 -0500 Subject: core/settings: Move configuring_global behind an API Rather than have directly modified global state here, we can make it an implementation detail and have an interface that changes are queried through. --- src/core/settings.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index 604805615..dcb1dbb31 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -33,8 +33,6 @@ enum class CPUAccuracy { DebugMode = 2, }; -extern bool configuring_global; - template class Setting final { public: @@ -198,13 +196,18 @@ struct Values { // Add-Ons std::map> disabled_addons; -} extern values; +}; -float Volume(); +extern Values values; + +bool IsConfiguringGlobal(); +void SetConfiguringGlobal(bool is_global); bool IsGPULevelExtreme(); bool IsGPULevelHigh(); +float Volume(); + std::string GetTimeZoneString(); void Apply(); -- cgit v1.2.3 From c0ab5b79dc857981f45e9003d815435e3b6907a9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 5 Nov 2020 22:07:07 -0500 Subject: settings: Simplify initializer of resolution factor This can use a braced initializer to accomplish the same thing with less code. --- src/core/settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index dcb1dbb31..28616a574 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -101,7 +101,7 @@ struct Values { bool renderer_debug; Setting vulkan_device; - Setting resolution_factor = Setting(static_cast(1)); + Setting resolution_factor{1}; Setting aspect_ratio; Setting max_anisotropy; Setting use_frame_limit; -- cgit v1.2.3 From 8f2959f6804e0d1048ecaa6f4046622e069fe7db Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Mon, 28 Sep 2020 10:00:15 -0400 Subject: settings: Preparation for per-game input settings --- src/core/settings.h | 57 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 11 deletions(-) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index 28616a574..edd2a00ca 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -65,6 +65,38 @@ private: Type local{}; }; +/** + * The InputSetting class allows for getting a reference to either the global or local members. + * This is required as we cannot easily modify the values of user-defined types within containers + * using the SetValue() member function found in the Setting class. The primary purpose of this + * class is to store an array of 10 PlayerInput structs for both the global and local (per-game) + * setting and allows for easily accessing and modifying both settings. + */ +template +class InputSetting final { +public: + InputSetting() = default; + explicit InputSetting(Type val) : global{val} {} + ~InputSetting() = default; + void SetGlobal(bool to_global) { + use_global = to_global; + } + bool UsingGlobal() const { + return use_global; + } + Type& GetValue(bool need_global = false) { + if (use_global || need_global) { + return global; + } + return local; + } + +private: + bool use_global = true; + Type global{}; + Type local{}; +}; + struct TouchFromButtonMap { std::string name; std::vector buttons; @@ -133,9 +165,17 @@ struct Values { Setting sound_index; // Controls - std::array players; + InputSetting> players; + + Setting use_docked_mode; - bool use_docked_mode; + Setting vibration_enabled; + + Setting motion_enabled; + std::string motion_device; + std::string udp_input_address; + u16 udp_input_port; + u8 udp_pad_index; bool mouse_enabled; std::string mouse_device; @@ -149,20 +189,15 @@ struct Values { ButtonsRaw debug_pad_buttons; AnalogsRaw debug_pad_analogs; - bool vibration_enabled; - - bool motion_enabled; - std::string motion_device; - std::string touch_device; TouchscreenInput touchscreen; - std::atomic_bool is_device_reload_pending{true}; + bool use_touch_from_button; + std::string touch_device; int touch_from_button_map_index; - std::string udp_input_address; - u16 udp_input_port; - u8 udp_pad_index; std::vector touch_from_button_maps; + std::atomic_bool is_device_reload_pending{true}; + // Data Storage bool use_virtual_sd; bool gamecard_inserted; -- cgit v1.2.3 From 652d6766d55acec6416dccb900a45c6660a86607 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Thu, 8 Oct 2020 23:43:07 -0400 Subject: configure_input: Hook up the vibration percentage spinbox This allows setting the vibration strength percentage anywhere from 1% to 100%. Also hooks up the remaining motion button and checkbox in the Controller Applet. --- src/core/settings.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index edd2a00ca..496f47747 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -170,6 +170,7 @@ struct Values { Setting use_docked_mode; Setting vibration_enabled; + Setting vibration_strength; Setting motion_enabled; std::string motion_device; -- cgit v1.2.3 From d6a41cfc21a75349ca79e73da5ca1dcecd1af901 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Fri, 16 Oct 2020 11:55:45 -0400 Subject: settings: Remove global vibration strength modifier This will be replaced in favor of per-player vibration strength modifiers. --- src/core/settings.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index 496f47747..edd2a00ca 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -170,7 +170,6 @@ struct Values { Setting use_docked_mode; Setting vibration_enabled; - Setting vibration_strength; Setting motion_enabled; std::string motion_device; -- cgit v1.2.3 From 38110dd485e329fa39e2e4c02b91a89dfebcbc88 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sat, 17 Oct 2020 09:38:12 -0400 Subject: configure_input: Add per-player vibration Allows for enabling and modifying vibration and vibration strength per player. Also adds a toggle for enabling/disabling accurate vibrations. Co-authored-by: Its-Rei --- src/core/settings.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index edd2a00ca..476c3fdf3 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -170,6 +170,7 @@ struct Values { Setting use_docked_mode; Setting vibration_enabled; + Setting enable_accurate_vibrations; Setting motion_enabled; std::string motion_device; -- cgit v1.2.3 From 2c2b586d86d71bd6c134c32d27b155615230222e Mon Sep 17 00:00:00 2001 From: german Date: Tue, 17 Nov 2020 22:16:29 -0600 Subject: Add multiple udp server support --- src/core/settings.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index 1143aba5d..1fbe940b0 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -174,9 +174,7 @@ struct Values { Setting motion_enabled; std::string motion_device; - std::string udp_input_address; - u16 udp_input_port; - u8 udp_pad_index; + std::string udp_input_servers; bool mouse_enabled; std::string mouse_device; -- cgit v1.2.3 From 5bc4eabe36b7ef4dcd5ad8db1e944705655be432 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 27 Nov 2020 10:50:48 -0500 Subject: core: Eliminate remaining usages of the global system instance 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. --- src/core/settings.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index 1143aba5d..3df611d5b 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -14,6 +14,10 @@ #include "common/common_types.h" #include "input_common/settings.h" +namespace Core { +class System; +} + namespace Settings { enum class RendererBackend { @@ -247,11 +251,11 @@ float Volume(); std::string GetTimeZoneString(); -void Apply(); +void Apply(Core::System& system); void LogSettings(); // Restore the global state of all applicable settings in the Values struct -void RestoreGlobalState(); +void RestoreGlobalState(bool is_powered_on); // Fixes settings that are known to cause issues with the emulator void Sanitize(); -- cgit v1.2.3 From b57ba7bfb6792e054033e828120b79b78587d58d Mon Sep 17 00:00:00 2001 From: german Date: Thu, 26 Nov 2020 20:56:06 -0600 Subject: Disable analog joystick from buttons by default --- src/core/settings.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index 1143aba5d..55310fe3d 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -178,6 +178,8 @@ struct Values { u16 udp_input_port; u8 udp_pad_index; + bool emulate_analog_keyboard; + bool mouse_enabled; std::string mouse_device; MouseButtonsRaw mouse_buttons; -- cgit v1.2.3 From 916438a9de378f97129df7f5a979bb1a406cda9f Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 12 Dec 2020 00:50:22 -0800 Subject: core: settings: Untangle multicore from asynchronous GPU. - Now that GPU is always threaded, we can support multicore with synchronous GPU. --- src/core/settings.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index d5f8d2b7e..0cd3c0c84 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -257,7 +257,4 @@ void LogSettings(); // Restore the global state of all applicable settings in the Values struct void RestoreGlobalState(bool is_powered_on); -// Fixes settings that are known to cause issues with the emulator -void Sanitize(); - } // namespace Settings -- cgit v1.2.3 From 0d47c1d5275387d2feb5188b47a7a5daaf673984 Mon Sep 17 00:00:00 2001 From: Timotej Leginus <35149140+timleg002@users.noreply.github.com> Date: Fri, 1 Jan 2021 21:29:53 +0100 Subject: typo fix typo fix --- src/core/settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index 0cd3c0c84..1cb7ff7f5 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -221,7 +221,7 @@ struct Values { bool disable_macro_jit; bool extended_logging; - // Misceallaneous + // Miscellaneous std::string log_filter; bool use_dev_keys; -- cgit v1.2.3 From 57c9da1b397b7d19b604f318502a881db87f0ba4 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Sat, 2 Jan 2021 17:36:02 +0000 Subject: dynarmic: Add Unsafe_InaccurateNaN optimization --- src/core/settings.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/settings.h') diff --git a/src/core/settings.h b/src/core/settings.h index 0cd3c0c84..66edc4e48 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -131,6 +131,7 @@ struct Values { bool cpuopt_unsafe_unfuse_fma; bool cpuopt_unsafe_reduce_fp_error; + bool cpuopt_unsafe_inaccurate_nan; // Renderer Setting renderer_backend; -- cgit v1.2.3