mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Add per game configuration options (#6187)
* common: Move settings to common from core. - Removes a dependency on core and input_common from common. * code: Wrap settings values * Port from yuzu to allow per game settings * citra_qt: Initial per-game settings dialog * citra_qt: Use new API for read/save of config values * citra_qt: Per game audio settings * citra_qt: Per game graphics settings * citra_qt: Per game system settings * citra_qt: Per game general settings * citra_qt: Document and run clang format * citra_qt: Make icon smaller and centered * citra_qt: Remove version number * Not sure how to extract that, can always add it back later * citra_qt: Wrap UISettings * citra_qt: Fix unthottled fps setting * citra_qt: Remove margin in emulation tab * citra_qt: Implement some suggestions * Bring back speed switch hotkey * Allow configuration when game is running * Rename/adjust UI stuff * citra_qt: Fix build with separate windows * citra_qt: Address feedback * citra_qt: Log per-game settings before launching games * citra_qt: Add shader cache options * Also fix android build * citra_qt: Add DLC menu option * citra_qt: Run clang-format * citra_qt: Adjust for time offset * citra_qt: Implement suggestions * Run clang-format Co-authored-by: bunnei <bunneidev@gmail.com>
This commit is contained in:
		
							parent
							
								
									f261daf2fa
								
							
						
					
					
						commit
						48ee112ceb
					
				
					 92 changed files with 3171 additions and 1546 deletions
				
			
		|  | @ -454,8 +454,6 @@ add_library(core STATIC | |||
|     rpc/udp_server.h | ||||
|     savestate.cpp | ||||
|     savestate.h | ||||
|     settings.cpp | ||||
|     settings.h | ||||
|     telemetry_session.cpp | ||||
|     telemetry_session.h | ||||
|     tracer/citrace.h | ||||
|  |  | |||
|  | @ -4,9 +4,9 @@ | |||
| #if defined(ARCHITECTURE_x86_64) || defined(ARCHITECTURE_arm64) | ||||
| #include "core/arm/dynarmic/arm_exclusive_monitor.h" | ||||
| #endif | ||||
| #include "common/settings.h" | ||||
| #include "core/arm/exclusive_monitor.h" | ||||
| #include "core/memory.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| namespace Core { | ||||
| 
 | ||||
|  |  | |||
|  | @ -6,6 +6,8 @@ | |||
| 
 | ||||
| #include <atomic> | ||||
| #include <memory> | ||||
| #include <vector> | ||||
| #include "common/common_types.h" | ||||
| #include "core/cheats/cheat_base.h" | ||||
| 
 | ||||
| namespace Cheats { | ||||
|  |  | |||
|  | @ -25,6 +25,7 @@ | |||
| #ifdef ENABLE_FFMPEG_VIDEO_DUMPER | ||||
| #include "core/dumping/ffmpeg_backend.h" | ||||
| #endif | ||||
| #include "common/settings.h" | ||||
| #include "core/custom_tex_cache.h" | ||||
| #include "core/gdbstub/gdbstub.h" | ||||
| #include "core/global.h" | ||||
|  | @ -45,7 +46,6 @@ | |||
| #include "core/loader/loader.h" | ||||
| #include "core/movie.h" | ||||
| #include "core/rpc/rpc_server.h" | ||||
| #include "core/settings.h" | ||||
| #include "network/network.h" | ||||
| #include "video_core/renderer_base.h" | ||||
| #include "video_core/video_core.h" | ||||
|  | @ -365,7 +365,7 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, | |||
| 
 | ||||
|     memory = std::make_unique<Memory::MemorySystem>(); | ||||
| 
 | ||||
|     timing = std::make_unique<Timing>(num_cores, Settings::values.cpu_clock_percentage); | ||||
|     timing = std::make_unique<Timing>(num_cores, Settings::values.cpu_clock_percentage.GetValue()); | ||||
| 
 | ||||
|     kernel = std::make_unique<Kernel::KernelSystem>( | ||||
|         *memory, *timing, [this] { PrepareReschedule(); }, system_mode, num_cores, n3ds_mode); | ||||
|  | @ -395,17 +395,19 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, | |||
|     kernel->SetCPUs(cpu_cores); | ||||
|     kernel->SetRunningCPU(cpu_cores[0].get()); | ||||
| 
 | ||||
|     if (Settings::values.enable_dsp_lle) { | ||||
|         dsp_core = std::make_unique<AudioCore::DspLle>(*memory, | ||||
|                                                        Settings::values.enable_dsp_lle_multithread); | ||||
|     } else { | ||||
|     const auto audio_emulation = Settings::values.audio_emulation.GetValue(); | ||||
|     if (audio_emulation == Settings::AudioEmulation::HLE) { | ||||
|         dsp_core = std::make_unique<AudioCore::DspHle>(*memory); | ||||
|     } else { | ||||
|         const bool multithread = audio_emulation == Settings::AudioEmulation::LLEMultithreaded; | ||||
|         dsp_core = std::make_unique<AudioCore::DspLle>(*memory, multithread); | ||||
|     } | ||||
| 
 | ||||
|     memory->SetDSP(*dsp_core); | ||||
| 
 | ||||
|     dsp_core->SetSink(Settings::values.sink_id, Settings::values.audio_device_id); | ||||
|     dsp_core->EnableStretching(Settings::values.enable_audio_stretching); | ||||
|     dsp_core->SetSink(Settings::values.sink_id.GetValue(), | ||||
|                       Settings::values.audio_device_id.GetValue()); | ||||
|     dsp_core->EnableStretching(Settings::values.enable_audio_stretching.GetValue()); | ||||
| 
 | ||||
|     telemetry_session = std::make_unique<Core::TelemetrySession>(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -7,10 +7,10 @@ | |||
| #include "common/file_util.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/param_package.h" | ||||
| #include "common/settings.h" | ||||
| #include "common/string_util.h" | ||||
| #include "core/dumping/ffmpeg_backend.h" | ||||
| #include "core/hw/gpu.h" | ||||
| #include "core/settings.h" | ||||
| #include "video_core/renderer_base.h" | ||||
| #include "video_core/video_core.h" | ||||
| 
 | ||||
|  |  | |||
|  | @ -7,11 +7,11 @@ | |||
| #include "common/archives.h" | ||||
| #include "common/file_util.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/file_sys/archive_sdmc.h" | ||||
| #include "core/file_sys/disk_archive.h" | ||||
| #include "core/file_sys/errors.h" | ||||
| #include "core/file_sys/path_parser.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| ////////////////////////////////////////////////////////////////////////////////////////////////////
 | ||||
| // FileSys namespace
 | ||||
|  |  | |||
|  | @ -5,11 +5,11 @@ | |||
| #include <memory> | ||||
| #include "common/archives.h" | ||||
| #include "common/file_util.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/file_sys/archive_sdmcwriteonly.h" | ||||
| #include "core/file_sys/directory_backend.h" | ||||
| #include "core/file_sys/errors.h" | ||||
| #include "core/file_sys/file_backend.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| ////////////////////////////////////////////////////////////////////////////////////////////////////
 | ||||
| // FileSys namespace
 | ||||
|  |  | |||
|  | @ -4,9 +4,10 @@ | |||
| 
 | ||||
| #include <cmath> | ||||
| #include <mutex> | ||||
| #include "common/settings.h" | ||||
| #include "core/3ds.h" | ||||
| #include "core/frontend/emu_window.h" | ||||
| #include "core/frontend/input.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| namespace Frontend { | ||||
| /// We need a global touch state that is shared across the different window instances
 | ||||
|  | @ -63,14 +64,14 @@ EmuWindow::~EmuWindow() = default; | |||
|  */ | ||||
| static bool IsWithinTouchscreen(const Layout::FramebufferLayout& layout, unsigned framebuffer_x, | ||||
|                                 unsigned framebuffer_y) { | ||||
|     if (Settings::values.render_3d == Settings::StereoRenderOption::SideBySide) { | ||||
|     if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::SideBySide) { | ||||
|         return (framebuffer_y >= layout.bottom_screen.top && | ||||
|                 framebuffer_y < layout.bottom_screen.bottom && | ||||
|                 ((framebuffer_x >= layout.bottom_screen.left / 2 && | ||||
|                   framebuffer_x < layout.bottom_screen.right / 2) || | ||||
|                  (framebuffer_x >= (layout.bottom_screen.left / 2) + (layout.width / 2) && | ||||
|                   framebuffer_x < (layout.bottom_screen.right / 2) + (layout.width / 2)))); | ||||
|     } else if (Settings::values.render_3d == Settings::StereoRenderOption::CardboardVR) { | ||||
|     } else if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::CardboardVR) { | ||||
|         return (framebuffer_y >= layout.bottom_screen.top && | ||||
|                 framebuffer_y < layout.bottom_screen.bottom && | ||||
|                 ((framebuffer_x >= layout.bottom_screen.left && | ||||
|  | @ -88,13 +89,13 @@ static bool IsWithinTouchscreen(const Layout::FramebufferLayout& layout, unsigne | |||
| 
 | ||||
| std::tuple<unsigned, unsigned> EmuWindow::ClipToTouchScreen(unsigned new_x, unsigned new_y) const { | ||||
|     if (new_x >= framebuffer_layout.width / 2) { | ||||
|         if (Settings::values.render_3d == Settings::StereoRenderOption::SideBySide) | ||||
|         if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::SideBySide) | ||||
|             new_x -= framebuffer_layout.width / 2; | ||||
|         else if (Settings::values.render_3d == Settings::StereoRenderOption::CardboardVR) | ||||
|         else if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::CardboardVR) | ||||
|             new_x -= | ||||
|                 (framebuffer_layout.width / 2) - (framebuffer_layout.cardboard.user_x_shift * 2); | ||||
|     } | ||||
|     if (Settings::values.render_3d == Settings::StereoRenderOption::SideBySide) { | ||||
|     if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::SideBySide) { | ||||
|         new_x = std::max(new_x, framebuffer_layout.bottom_screen.left / 2); | ||||
|         new_x = std::min(new_x, framebuffer_layout.bottom_screen.right / 2 - 1); | ||||
|     } else { | ||||
|  | @ -122,14 +123,14 @@ bool EmuWindow::TouchPressed(unsigned framebuffer_x, unsigned framebuffer_y) { | |||
|         return false; | ||||
| 
 | ||||
|     if (framebuffer_x >= framebuffer_layout.width / 2) { | ||||
|         if (Settings::values.render_3d == Settings::StereoRenderOption::SideBySide) | ||||
|         if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::SideBySide) | ||||
|             framebuffer_x -= framebuffer_layout.width / 2; | ||||
|         else if (Settings::values.render_3d == Settings::StereoRenderOption::CardboardVR) | ||||
|         else if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::CardboardVR) | ||||
|             framebuffer_x -= | ||||
|                 (framebuffer_layout.width / 2) - (framebuffer_layout.cardboard.user_x_shift * 2); | ||||
|     } | ||||
|     std::lock_guard guard(touch_state->mutex); | ||||
|     if (Settings::values.render_3d == Settings::StereoRenderOption::SideBySide) { | ||||
|     if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::SideBySide) { | ||||
|         touch_state->touch_x = | ||||
|             static_cast<float>(framebuffer_x - framebuffer_layout.bottom_screen.left / 2) / | ||||
|             (framebuffer_layout.bottom_screen.right / 2 - | ||||
|  | @ -173,55 +174,59 @@ void EmuWindow::UpdateCurrentFramebufferLayout(unsigned width, unsigned height, | |||
|                                                bool is_portrait_mode) { | ||||
|     Layout::FramebufferLayout layout; | ||||
|     const auto layout_option = Settings::values.layout_option; | ||||
|     const auto min_size = | ||||
|         Layout::GetMinimumSizeFromLayout(layout_option, Settings::values.upright_screen); | ||||
|     const auto min_size = Layout::GetMinimumSizeFromLayout( | ||||
|         layout_option.GetValue(), Settings::values.upright_screen.GetValue()); | ||||
| 
 | ||||
|     if (Settings::values.custom_layout == true) { | ||||
|     if (Settings::values.custom_layout.GetValue() == true) { | ||||
|         layout = Layout::CustomFrameLayout(width, height); | ||||
|     } else { | ||||
|         width = std::max(width, min_size.first); | ||||
|         height = std::max(height, min_size.second); | ||||
| 
 | ||||
|         // If in portrait mode, only the MobilePortrait option really makes sense
 | ||||
|         const Settings::LayoutOption layout_option = is_portrait_mode | ||||
|                                                          ? Settings::LayoutOption::MobilePortrait | ||||
|                                                          : Settings::values.layout_option; | ||||
|         const Settings::LayoutOption layout_option = | ||||
|             is_portrait_mode ? Settings::LayoutOption::MobilePortrait | ||||
|                              : Settings::values.layout_option.GetValue(); | ||||
| 
 | ||||
|         switch (layout_option) { | ||||
|         case Settings::LayoutOption::SingleScreen: | ||||
|             layout = Layout::SingleFrameLayout(width, height, Settings::values.swap_screen, | ||||
|                                                Settings::values.upright_screen); | ||||
|             layout = | ||||
|                 Layout::SingleFrameLayout(width, height, Settings::values.swap_screen.GetValue(), | ||||
|                                           Settings::values.upright_screen.GetValue()); | ||||
|             break; | ||||
|         case Settings::LayoutOption::LargeScreen: | ||||
|             layout = Layout::LargeFrameLayout(width, height, Settings::values.swap_screen, | ||||
|                                               Settings::values.upright_screen); | ||||
|             layout = | ||||
|                 Layout::LargeFrameLayout(width, height, Settings::values.swap_screen.GetValue(), | ||||
|                                          Settings::values.upright_screen.GetValue()); | ||||
|             break; | ||||
|         case Settings::LayoutOption::SideScreen: | ||||
|             layout = Layout::SideFrameLayout(width, height, Settings::values.swap_screen, | ||||
|                                              Settings::values.upright_screen); | ||||
|             layout = Layout::SideFrameLayout(width, height, Settings::values.swap_screen.GetValue(), | ||||
|                                              Settings::values.upright_screen.GetValue()); | ||||
|             break; | ||||
| #ifndef ANDROID | ||||
|         case Settings::LayoutOption::SeparateWindows: | ||||
|             layout = Layout::SeparateWindowsLayout(width, height, is_secondary, | ||||
|                                                    Settings::values.upright_screen); | ||||
|                                                    Settings::values.upright_screen.GetValue()); | ||||
|             break; | ||||
| #endif | ||||
|         case Settings::LayoutOption::MobilePortrait: | ||||
|             layout = Layout::MobilePortraitFrameLayout(width, height, Settings::values.swap_screen); | ||||
|             layout = Layout::MobilePortraitFrameLayout(width, height, | ||||
|                                                        Settings::values.swap_screen.GetValue()); | ||||
|             break; | ||||
|         case Settings::LayoutOption::MobileLandscape: | ||||
|             layout = Layout::MobileLandscapeFrameLayout(width, height, Settings::values.swap_screen, | ||||
|                                                         2.25f, false); | ||||
|             layout = Layout::MobileLandscapeFrameLayout( | ||||
|                 width, height, Settings::values.swap_screen.GetValue(), 2.25f, false); | ||||
|             break; | ||||
|         case Settings::LayoutOption::Default: | ||||
|         default: | ||||
|             layout = Layout::DefaultFrameLayout(width, height, Settings::values.swap_screen, | ||||
|                                                 Settings::values.upright_screen); | ||||
|             layout = | ||||
|                 Layout::DefaultFrameLayout(width, height, Settings::values.swap_screen.GetValue(), | ||||
|                                            Settings::values.upright_screen.GetValue()); | ||||
|             break; | ||||
|         } | ||||
|         UpdateMinimumWindowSize(min_size); | ||||
|     } | ||||
|     if (Settings::values.render_3d == Settings::StereoRenderOption::CardboardVR) { | ||||
|     if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::CardboardVR) { | ||||
|         layout = Layout::GetCardboardSettings(layout); | ||||
|     } | ||||
|     NotifyFramebufferLayoutChanged(layout); | ||||
|  |  | |||
|  | @ -5,9 +5,9 @@ | |||
| #include <cmath> | ||||
| 
 | ||||
| #include "common/assert.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/3ds.h" | ||||
| #include "core/frontend/framebuffer_layout.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| namespace Layout { | ||||
| 
 | ||||
|  | @ -355,12 +355,14 @@ FramebufferLayout CustomFrameLayout(u32 width, u32 height) { | |||
| 
 | ||||
|     FramebufferLayout res{width, height, true, true, {}, {}, !Settings::values.upright_screen}; | ||||
| 
 | ||||
|     Common::Rectangle<u32> top_screen{ | ||||
|         Settings::values.custom_top_left, Settings::values.custom_top_top, | ||||
|         Settings::values.custom_top_right, Settings::values.custom_top_bottom}; | ||||
|     Common::Rectangle<u32> bot_screen{ | ||||
|         Settings::values.custom_bottom_left, Settings::values.custom_bottom_top, | ||||
|         Settings::values.custom_bottom_right, Settings::values.custom_bottom_bottom}; | ||||
|     Common::Rectangle<u32> top_screen{Settings::values.custom_top_left.GetValue(), | ||||
|                                       Settings::values.custom_top_top.GetValue(), | ||||
|                                       Settings::values.custom_top_right.GetValue(), | ||||
|                                       Settings::values.custom_top_bottom.GetValue()}; | ||||
|     Common::Rectangle<u32> bot_screen{Settings::values.custom_bottom_left.GetValue(), | ||||
|                                       Settings::values.custom_bottom_top.GetValue(), | ||||
|                                       Settings::values.custom_bottom_right.GetValue(), | ||||
|                                       Settings::values.custom_bottom_bottom.GetValue()}; | ||||
| 
 | ||||
|     res.top_screen = top_screen; | ||||
|     res.bottom_screen = bot_screen; | ||||
|  | @ -369,20 +371,21 @@ FramebufferLayout CustomFrameLayout(u32 width, u32 height) { | |||
| 
 | ||||
| FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale, bool is_secondary) { | ||||
|     FramebufferLayout layout; | ||||
|     if (Settings::values.custom_layout == true) { | ||||
|         layout = CustomFrameLayout( | ||||
|             std::max(Settings::values.custom_top_right, Settings::values.custom_bottom_right), | ||||
|             std::max(Settings::values.custom_top_bottom, Settings::values.custom_bottom_bottom)); | ||||
|     if (Settings::values.custom_layout.GetValue() == true) { | ||||
|         layout = CustomFrameLayout(std::max(Settings::values.custom_top_right.GetValue(), | ||||
|                                             Settings::values.custom_bottom_right.GetValue()), | ||||
|                                    std::max(Settings::values.custom_top_bottom.GetValue(), | ||||
|                                             Settings::values.custom_bottom_bottom.GetValue())); | ||||
|     } else { | ||||
|         int width, height; | ||||
|         switch (Settings::values.layout_option) { | ||||
|         switch (Settings::values.layout_option.GetValue()) { | ||||
|         case Settings::LayoutOption::SingleScreen: | ||||
| #ifndef ANDROID | ||||
|         case Settings::LayoutOption::SeparateWindows: | ||||
| #endif | ||||
|         { | ||||
|             const bool swap_screens = is_secondary || Settings::values.swap_screen; | ||||
|             if (Settings::values.upright_screen) { | ||||
|             const bool swap_screens = is_secondary || Settings::values.swap_screen.GetValue(); | ||||
|             if (Settings::values.upright_screen.GetValue()) { | ||||
|                 if (swap_screens) { | ||||
|                     width = Core::kScreenBottomHeight * res_scale; | ||||
|                     height = Core::kScreenBottomWidth * res_scale; | ||||
|  | @ -399,13 +402,13 @@ FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale, bool is_secondar | |||
|                     height = Core::kScreenTopHeight * res_scale; | ||||
|                 } | ||||
|             } | ||||
|             layout = | ||||
|                 SingleFrameLayout(width, height, swap_screens, Settings::values.upright_screen); | ||||
|             layout = SingleFrameLayout(width, height, swap_screens, | ||||
|                                        Settings::values.upright_screen.GetValue()); | ||||
|             break; | ||||
|         } | ||||
|         case Settings::LayoutOption::LargeScreen: | ||||
|             if (Settings::values.upright_screen) { | ||||
|                 if (Settings::values.swap_screen) { | ||||
|             if (Settings::values.upright_screen.GetValue()) { | ||||
|                 if (Settings::values.swap_screen.GetValue()) { | ||||
|                     width = Core::kScreenBottomHeight * res_scale; | ||||
|                     height = (Core::kScreenBottomWidth + Core::kScreenTopWidth / 4) * res_scale; | ||||
|                 } else { | ||||
|  | @ -413,7 +416,7 @@ FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale, bool is_secondar | |||
|                     height = (Core::kScreenTopWidth + Core::kScreenBottomWidth / 4) * res_scale; | ||||
|                 } | ||||
|             } else { | ||||
|                 if (Settings::values.swap_screen) { | ||||
|                 if (Settings::values.swap_screen.GetValue()) { | ||||
|                     width = (Core::kScreenBottomWidth + Core::kScreenTopWidth / 4) * res_scale; | ||||
|                     height = Core::kScreenBottomHeight * res_scale; | ||||
|                 } else { | ||||
|  | @ -421,51 +424,52 @@ FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale, bool is_secondar | |||
|                     height = Core::kScreenTopHeight * res_scale; | ||||
|                 } | ||||
|             } | ||||
|             layout = LargeFrameLayout(width, height, Settings::values.swap_screen, | ||||
|                                       Settings::values.upright_screen); | ||||
|             layout = LargeFrameLayout(width, height, Settings::values.swap_screen.GetValue(), | ||||
|                                       Settings::values.upright_screen.GetValue()); | ||||
|             break; | ||||
|         case Settings::LayoutOption::SideScreen: | ||||
|             if (Settings::values.upright_screen) { | ||||
|             if (Settings::values.upright_screen.GetValue()) { | ||||
|                 width = Core::kScreenTopHeight * res_scale; | ||||
|                 height = (Core::kScreenTopWidth + Core::kScreenBottomWidth) * res_scale; | ||||
|             } else { | ||||
|                 width = (Core::kScreenTopWidth + Core::kScreenBottomWidth) * res_scale; | ||||
|                 height = Core::kScreenTopHeight * res_scale; | ||||
|             } | ||||
|             layout = SideFrameLayout(width, height, Settings::values.swap_screen, | ||||
|                                      Settings::values.upright_screen); | ||||
|             layout = SideFrameLayout(width, height, Settings::values.swap_screen.GetValue(), | ||||
|                                      Settings::values.upright_screen.GetValue()); | ||||
|             break; | ||||
|         case Settings::LayoutOption::MobilePortrait: | ||||
|             width = Core::kScreenTopWidth * res_scale; | ||||
|             height = (Core::kScreenTopHeight + Core::kScreenBottomHeight) * res_scale; | ||||
|             layout = MobilePortraitFrameLayout(width, height, Settings::values.swap_screen); | ||||
|             layout = | ||||
|                 MobilePortraitFrameLayout(width, height, Settings::values.swap_screen.GetValue()); | ||||
|             break; | ||||
|         case Settings::LayoutOption::MobileLandscape: | ||||
|             if (Settings::values.swap_screen) { | ||||
|             if (Settings::values.swap_screen.GetValue()) { | ||||
|                 width = (Core::kScreenBottomWidth + Core::kScreenTopWidth / 2.25f) * res_scale; | ||||
|                 height = Core::kScreenBottomHeight * res_scale; | ||||
|             } else { | ||||
|                 width = (Core::kScreenTopWidth + Core::kScreenBottomWidth / 2.25f) * res_scale; | ||||
|                 height = Core::kScreenTopHeight * res_scale; | ||||
|             } | ||||
|             layout = MobileLandscapeFrameLayout(width, height, Settings::values.swap_screen, 2.25f, | ||||
|                                                 false); | ||||
|             layout = MobileLandscapeFrameLayout( | ||||
|                 width, height, Settings::values.swap_screen.GetValue(), 2.25f, false); | ||||
|             break; | ||||
|         case Settings::LayoutOption::Default: | ||||
|         default: | ||||
|             if (Settings::values.upright_screen) { | ||||
|             if (Settings::values.upright_screen.GetValue()) { | ||||
|                 width = (Core::kScreenTopHeight + Core::kScreenBottomHeight) * res_scale; | ||||
|                 height = Core::kScreenTopWidth * res_scale; | ||||
|             } else { | ||||
|                 width = Core::kScreenTopWidth * res_scale; | ||||
|                 height = (Core::kScreenTopHeight + Core::kScreenBottomHeight) * res_scale; | ||||
|             } | ||||
|             layout = DefaultFrameLayout(width, height, Settings::values.swap_screen, | ||||
|                                         Settings::values.upright_screen); | ||||
|             layout = DefaultFrameLayout(width, height, Settings::values.swap_screen.GetValue(), | ||||
|                                         Settings::values.upright_screen.GetValue()); | ||||
|             break; | ||||
|         } | ||||
|     } | ||||
|     if (Settings::values.render_3d == Settings::StereoRenderOption::CardboardVR) { | ||||
|     if (Settings::values.render_3d.GetValue() == Settings::StereoRenderOption::CardboardVR) { | ||||
|         layout = Layout::GetCardboardSettings(layout); | ||||
|     } | ||||
|     return layout; | ||||
|  | @ -478,17 +482,17 @@ FramebufferLayout GetCardboardSettings(FramebufferLayout layout) { | |||
|     float bottom_screen_left = 0; | ||||
|     float bottom_screen_top = 0; | ||||
| 
 | ||||
|     float cardboardScreenScale = Settings::values.cardboard_screen_size / 100.0f; | ||||
|     float cardboardScreenScale = Settings::values.cardboard_screen_size.GetValue() / 100.0f; | ||||
|     float top_screen_width = layout.top_screen.GetWidth() / 2.0f * cardboardScreenScale; | ||||
|     float top_screen_height = layout.top_screen.GetHeight() / 2.0f * cardboardScreenScale; | ||||
|     float bottom_screen_width = layout.bottom_screen.GetWidth() / 2.0f * cardboardScreenScale; | ||||
|     float bottom_screen_height = layout.bottom_screen.GetHeight() / 2.0f * cardboardScreenScale; | ||||
|     bool is_swapped = Settings::values.swap_screen; | ||||
|     bool is_portrait = layout.height > layout.width; | ||||
|     const bool is_swapped = Settings::values.swap_screen.GetValue(); | ||||
|     const bool is_portrait = layout.height > layout.width; | ||||
| 
 | ||||
|     float cardboardScreenWidth; | ||||
|     float cardboardScreenHeight; | ||||
|     switch (Settings::values.layout_option) { | ||||
|     switch (Settings::values.layout_option.GetValue()) { | ||||
|     case Settings::LayoutOption::MobileLandscape: | ||||
|     case Settings::LayoutOption::SideScreen: | ||||
|         // If orientation is portrait, only use MobilePortrait
 | ||||
|  | @ -524,9 +528,11 @@ FramebufferLayout GetCardboardSettings(FramebufferLayout layout) { | |||
|         break; | ||||
|     } | ||||
|     float cardboardMaxXShift = (layout.width / 2.0f - cardboardScreenWidth) / 2.0f; | ||||
|     float cardboardUserXShift = (Settings::values.cardboard_x_shift / 100.0f) * cardboardMaxXShift; | ||||
|     float cardboardUserXShift = | ||||
|         (Settings::values.cardboard_x_shift.GetValue() / 100.0f) * cardboardMaxXShift; | ||||
|     float cardboardMaxYShift = ((float)layout.height - cardboardScreenHeight) / 2.0f; | ||||
|     float cardboardUserYShift = (Settings::values.cardboard_y_shift / 100.0f) * cardboardMaxYShift; | ||||
|     float cardboardUserYShift = | ||||
|         (Settings::values.cardboard_y_shift.GetValue() / 100.0f) * cardboardMaxYShift; | ||||
| 
 | ||||
|     // Center the screens and apply user Y shift
 | ||||
|     newLayout.top_screen.left = top_screen_left + cardboardMaxXShift; | ||||
|  |  | |||
|  | @ -5,7 +5,7 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include "common/math_util.h" | ||||
| #include "core/settings.h" | ||||
| #include "common/settings.h" | ||||
| 
 | ||||
| namespace Layout { | ||||
| 
 | ||||
|  |  | |||
|  | @ -11,6 +11,7 @@ | |||
| #include "common/assert.h" | ||||
| #include "common/common_types.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/core.h" | ||||
| #include "core/hle/kernel/config_mem.h" | ||||
| #include "core/hle/kernel/memory.h" | ||||
|  | @ -19,7 +20,6 @@ | |||
| #include "core/hle/kernel/vm_manager.h" | ||||
| #include "core/hle/result.h" | ||||
| #include "core/memory.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| ////////////////////////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
|  | @ -52,7 +52,7 @@ enum N3DSMode : u8 { | |||
| void KernelSystem::MemoryInit(u32 mem_type, u8 n3ds_mode) { | ||||
|     ASSERT(mem_type != 1); | ||||
| 
 | ||||
|     const bool is_new_3ds = Settings::values.is_new_3ds; | ||||
|     const bool is_new_3ds = Settings::values.is_new_3ds.GetValue(); | ||||
|     u32 reported_mem_type = mem_type; | ||||
|     if (is_new_3ds) { | ||||
|         if (n3ds_mode == MemoryMode::Mode6 || n3ds_mode == MemoryMode::Mode6_2) { | ||||
|  |  | |||
|  | @ -6,12 +6,12 @@ | |||
| #include <cstring> | ||||
| #include "common/archives.h" | ||||
| #include "common/assert.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/core.h" | ||||
| #include "core/core_timing.h" | ||||
| #include "core/hle/kernel/shared_page.h" | ||||
| #include "core/hle/service/ptm/ptm.h" | ||||
| #include "core/movie.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| ////////////////////////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
|  | @ -37,7 +37,7 @@ static std::chrono::seconds GetInitTime() { | |||
|         return std::chrono::seconds(override_init_time); | ||||
|     } | ||||
| 
 | ||||
|     switch (Settings::values.init_clock) { | ||||
|     switch (Settings::values.init_clock.GetValue()) { | ||||
|     case Settings::InitClock::SystemTime: { | ||||
|         auto now = std::chrono::system_clock::now(); | ||||
|         // If the system time is in daylight saving, we give an additional hour to console time
 | ||||
|  | @ -47,7 +47,7 @@ static std::chrono::seconds GetInitTime() { | |||
|             now = now + std::chrono::hours(1); | ||||
| 
 | ||||
|         // add the offset
 | ||||
|         s64 init_time_offset = Settings::values.init_time_offset; | ||||
|         s64 init_time_offset = Settings::values.init_time_offset.GetValue(); | ||||
|         long long days_offset = init_time_offset / 86400; | ||||
|         long long days_offset_in_seconds = days_offset * 86400; // h/m/s truncated
 | ||||
|         unsigned long long seconds_offset = | ||||
|  | @ -58,9 +58,9 @@ static std::chrono::seconds GetInitTime() { | |||
|         return std::chrono::duration_cast<std::chrono::seconds>(now.time_since_epoch()); | ||||
|     } | ||||
|     case Settings::InitClock::FixedTime: | ||||
|         return std::chrono::seconds(Settings::values.init_time); | ||||
|         return std::chrono::seconds(Settings::values.init_time.GetValue()); | ||||
|     default: | ||||
|         UNREACHABLE_MSG("Invalid InitClock value ({})", Settings::values.init_clock); | ||||
|         UNREACHABLE_MSG("Invalid InitClock value ({})", Settings::values.init_clock.GetValue()); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | @ -85,7 +85,7 @@ Handler::Handler(Core::Timing& timing) : timing(timing) { | |||
|                                              std::bind(&Handler::UpdateTimeCallback, this, _1, _2)); | ||||
|     timing.ScheduleEvent(0, update_time_event, 0, 0); | ||||
| 
 | ||||
|     float slidestate = Settings::values.factor_3d / 100.0f; | ||||
|     float slidestate = Settings::values.factor_3d.GetValue() / 100.0f; | ||||
|     shared_page.sliderstate_3d = static_cast<float_le>(slidestate); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -8,6 +8,7 @@ | |||
| #include "common/common_paths.h" | ||||
| #include "common/file_util.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/core.h" | ||||
| #include "core/file_sys/archive_ncch.h" | ||||
| #include "core/file_sys/file_backend.h" | ||||
|  | @ -28,7 +29,6 @@ | |||
| #include "core/hle/service/service.h" | ||||
| #include "core/hw/aes/ccm.h" | ||||
| #include "core/hw/aes/key.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| SERVICE_CONSTRUCT_IMPL(Service::APT::Module) | ||||
| 
 | ||||
|  |  | |||
|  | @ -6,6 +6,7 @@ | |||
| #include "common/archives.h" | ||||
| #include "common/bit_set.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/core.h" | ||||
| #include "core/core_timing.h" | ||||
| #include "core/frontend/camera/factory.h" | ||||
|  | @ -19,7 +20,6 @@ | |||
| #include "core/hle/service/cam/cam_s.h" | ||||
| #include "core/hle/service/cam/cam_u.h" | ||||
| #include "core/memory.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| SERVICE_CONSTRUCT_IMPL(Service::CAM::Module) | ||||
| 
 | ||||
|  |  | |||
|  | @ -12,6 +12,7 @@ | |||
| #include "common/archives.h" | ||||
| #include "common/file_util.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/settings.h" | ||||
| #include "common/string_util.h" | ||||
| #include "common/swap.h" | ||||
| #include "core/core.h" | ||||
|  | @ -25,7 +26,6 @@ | |||
| #include "core/hle/service/cfg/cfg_nor.h" | ||||
| #include "core/hle/service/cfg/cfg_s.h" | ||||
| #include "core/hle/service/cfg/cfg_u.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| SERIALIZE_EXPORT_IMPL(Service::CFG::Module) | ||||
| 
 | ||||
|  | @ -189,10 +189,10 @@ void Module::Interface::GetCountryCodeID(Kernel::HLERequestContext& ctx) { | |||
| } | ||||
| 
 | ||||
| u32 Module::GetRegionValue() { | ||||
|     if (Settings::values.region_value == Settings::REGION_VALUE_AUTO_SELECT) | ||||
|     if (Settings::values.region_value.GetValue() == Settings::REGION_VALUE_AUTO_SELECT) | ||||
|         return preferred_region_code; | ||||
| 
 | ||||
|     return Settings::values.region_value; | ||||
|     return Settings::values.region_value.GetValue(); | ||||
| } | ||||
| 
 | ||||
| void Module::Interface::SecureInfoGetRegion(Kernel::HLERequestContext& ctx, u16 id) { | ||||
|  | @ -654,7 +654,7 @@ void Module::SetPreferredRegionCodes(const std::vector<u32>& region_codes) { | |||
|     preferred_region_code = region; | ||||
|     LOG_INFO(Service_CFG, "Preferred region code set to {}", preferred_region_code); | ||||
| 
 | ||||
|     if (Settings::values.region_value == Settings::REGION_VALUE_AUTO_SELECT) { | ||||
|     if (Settings::values.region_value.GetValue() == Settings::REGION_VALUE_AUTO_SELECT) { | ||||
|         if (current_language != adjusted_language) { | ||||
|             LOG_WARNING(Service_CFG, "System language {} does not fit the region. Adjusted to {}", | ||||
|                         current_language, adjusted_language); | ||||
|  |  | |||
|  | @ -9,6 +9,7 @@ | |||
| #include "common/file_util.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/scope_exit.h" | ||||
| #include "common/settings.h" | ||||
| #include "common/string_util.h" | ||||
| #include "core/core.h" | ||||
| #include "core/file_sys/errors.h" | ||||
|  | @ -25,7 +26,6 @@ | |||
| #include "core/hle/service/am/am.h" | ||||
| #include "core/hle/service/fs/archive.h" | ||||
| #include "core/hle/service/fs/fs_user.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| SERVICE_CONSTRUCT_IMPL(Service::FS::FS_USER) | ||||
| SERIALIZE_EXPORT_IMPL(Service::FS::FS_USER) | ||||
|  | @ -350,7 +350,7 @@ void FS_USER::IsSdmcDetected(Kernel::HLERequestContext& ctx) { | |||
|     IPC::RequestParser rp(ctx, 0x817, 0, 0); | ||||
|     IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); | ||||
|     rb.Push(RESULT_SUCCESS); | ||||
|     rb.Push(Settings::values.use_virtual_sd); | ||||
|     rb.Push(Settings::values.use_virtual_sd.GetValue()); | ||||
| } | ||||
| 
 | ||||
| void FS_USER::IsSdmcWriteable(Kernel::HLERequestContext& ctx) { | ||||
|  | @ -358,7 +358,7 @@ void FS_USER::IsSdmcWriteable(Kernel::HLERequestContext& ctx) { | |||
|     IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); | ||||
|     rb.Push(RESULT_SUCCESS); | ||||
|     // If the SD isn't enabled, it can't be writeable...else, stubbed true
 | ||||
|     rb.Push(Settings::values.use_virtual_sd); | ||||
|     rb.Push(Settings::values.use_virtual_sd.GetValue()); | ||||
|     LOG_DEBUG(Service_FS, " (STUBBED)"); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -218,8 +218,9 @@ void Module::UpdatePadCallback(std::uintptr_t user_data, s64 cycles_late) { | |||
| 
 | ||||
|     // TODO(xperia64): How the 3D Slider is updated by the HID module needs to be RE'd
 | ||||
|     // and possibly moved to its own Core::Timing event.
 | ||||
|     mem->pad.sliderstate_3d = (Settings::values.factor_3d / 100.0f); | ||||
|     system.Kernel().GetSharedPageHandler().Set3DSlider(Settings::values.factor_3d / 100.0f); | ||||
|     mem->pad.sliderstate_3d = (Settings::values.factor_3d.GetValue() / 100.0f); | ||||
|     system.Kernel().GetSharedPageHandler().Set3DSlider(Settings::values.factor_3d.GetValue() / | ||||
|                                                        100.0f); | ||||
| 
 | ||||
|     // Reschedule recurrent event
 | ||||
|     system.CoreTiming().ScheduleEvent(pad_update_ticks - cycles_late, pad_update_event); | ||||
|  | @ -406,7 +407,7 @@ void Module::Interface::GetGyroscopeLowCalibrateParam(Kernel::HLERequestContext& | |||
| void Module::Interface::GetSoundVolume(Kernel::HLERequestContext& ctx) { | ||||
|     IPC::RequestParser rp{ctx, 0x17, 0, 0}; | ||||
| 
 | ||||
|     const u8 volume = static_cast<u8>(0x3F * Settings::values.volume); | ||||
|     const u8 volume = static_cast<u8>(0x3F * Settings::values.volume.GetValue()); | ||||
| 
 | ||||
|     IPC::RequestBuilder rb = rp.MakeBuilder(2, 0); | ||||
|     rb.Push(RESULT_SUCCESS); | ||||
|  |  | |||
|  | @ -13,10 +13,10 @@ | |||
| #include "common/bit_field.h" | ||||
| #include "common/common_funcs.h" | ||||
| #include "common/common_types.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/core_timing.h" | ||||
| #include "core/frontend/input.h" | ||||
| #include "core/hle/service/service.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| namespace Core { | ||||
| class System; | ||||
|  |  | |||
|  | @ -3,12 +3,12 @@ | |||
| // Refer to the license.txt file included.
 | ||||
| 
 | ||||
| #include "common/alignment.h" | ||||
| #include "common/settings.h" | ||||
| #include "common/string_util.h" | ||||
| #include "core/core.h" | ||||
| #include "core/core_timing.h" | ||||
| #include "core/hle/service/ir/extra_hid.h" | ||||
| #include "core/movie.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| namespace Service::IR { | ||||
| 
 | ||||
|  |  | |||
|  | @ -5,6 +5,7 @@ | |||
| #include <boost/serialization/base_object.hpp> | ||||
| #include <boost/serialization/shared_ptr.hpp> | ||||
| #include "common/archives.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/core.h" | ||||
| #include "core/core_timing.h" | ||||
| #include "core/hle/ipc_helpers.h" | ||||
|  | @ -13,7 +14,6 @@ | |||
| #include "core/hle/service/hid/hid.h" | ||||
| #include "core/hle/service/ir/ir_rst.h" | ||||
| #include "core/movie.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| SERIALIZE_EXPORT_IMPL(Service::IR::IR_RST) | ||||
| SERVICE_CONSTRUCT_IMPL(Service::IR::IR_RST) | ||||
|  |  | |||
|  | @ -5,6 +5,7 @@ | |||
| #include <boost/serialization/weak_ptr.hpp> | ||||
| #include "common/archives.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/core.h" | ||||
| #include "core/frontend/mic.h" | ||||
| #include "core/hle/ipc.h" | ||||
|  | @ -14,7 +15,6 @@ | |||
| #include "core/hle/kernel/kernel.h" | ||||
| #include "core/hle/kernel/shared_memory.h" | ||||
| #include "core/hle/service/mic_u.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| SERVICE_CONSTRUCT_IMPL(Service::MIC::MIC_U) | ||||
| SERIALIZE_EXPORT_IMPL(Service::MIC::MIC_U) | ||||
|  | @ -350,12 +350,12 @@ struct MIC_U::Impl { | |||
| 
 | ||||
|     void CreateMic() { | ||||
|         std::unique_ptr<Frontend::Mic::Interface> new_mic; | ||||
|         switch (Settings::values.mic_input_type) { | ||||
|         switch (Settings::values.mic_input_type.GetValue()) { | ||||
|         case Settings::MicInputType::None: | ||||
|             new_mic = std::make_unique<Frontend::Mic::NullMic>(); | ||||
|             break; | ||||
|         case Settings::MicInputType::Real: | ||||
|             new_mic = Frontend::Mic::CreateRealMic(Settings::values.mic_input_device); | ||||
|             new_mic = Frontend::Mic::CreateRealMic(Settings::values.mic_input_device.GetValue()); | ||||
|             break; | ||||
|         case Settings::MicInputType::Static: | ||||
|             new_mic = std::make_unique<Frontend::Mic::StaticMic>(); | ||||
|  |  | |||
|  | @ -7,6 +7,7 @@ | |||
| #include "common/common_paths.h" | ||||
| #include "common/file_util.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/core.h" | ||||
| #include "core/file_sys/archive_extsavedata.h" | ||||
| #include "core/file_sys/errors.h" | ||||
|  | @ -17,7 +18,6 @@ | |||
| #include "core/hle/service/ptm/ptm_sets.h" | ||||
| #include "core/hle/service/ptm/ptm_sysm.h" | ||||
| #include "core/hle/service/ptm/ptm_u.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| SERIALIZE_EXPORT_IMPL(Service::PTM::Module) | ||||
| 
 | ||||
|  | @ -118,7 +118,7 @@ void Module::Interface::GetSoftwareClosedFlag(Kernel::HLERequestContext& ctx) { | |||
| } | ||||
| 
 | ||||
| void CheckNew3DS(IPC::RequestBuilder& rb) { | ||||
|     const bool is_new_3ds = Settings::values.is_new_3ds; | ||||
|     const bool is_new_3ds = Settings::values.is_new_3ds.GetValue(); | ||||
| 
 | ||||
|     rb.Push(RESULT_SUCCESS); | ||||
|     rb.Push(is_new_3ds); | ||||
|  |  | |||
|  | @ -12,6 +12,7 @@ | |||
| #include "common/atomic_ops.h" | ||||
| #include "common/common_types.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/settings.h" | ||||
| #include "common/swap.h" | ||||
| #include "core/arm/arm_interface.h" | ||||
| #include "core/core.h" | ||||
|  | @ -20,7 +21,6 @@ | |||
| #include "core/hle/kernel/process.h" | ||||
| #include "core/hle/lock.h" | ||||
| #include "core/memory.h" | ||||
| #include "core/settings.h" | ||||
| #include "video_core/renderer_base.h" | ||||
| #include "video_core/video_core.h" | ||||
| 
 | ||||
|  | @ -289,7 +289,7 @@ private: | |||
|     friend class boost::serialization::access; | ||||
|     template <class Archive> | ||||
|     void serialize(Archive& ar, const unsigned int file_version) { | ||||
|         bool save_n3ds_ram = Settings::values.is_new_3ds; | ||||
|         bool save_n3ds_ram = Settings::values.is_new_3ds.GetValue(); | ||||
|         ar& save_n3ds_ram; | ||||
|         ar& boost::serialization::make_binary_object(vram.get(), Memory::VRAM_SIZE); | ||||
|         ar& boost::serialization::make_binary_object( | ||||
|  |  | |||
|  | @ -601,8 +601,8 @@ void Movie::PrepareForPlayback(const std::string& movie_file) { | |||
| } | ||||
| 
 | ||||
| void Movie::PrepareForRecording() { | ||||
|     if (Settings::values.init_clock == Settings::InitClock::SystemTime) { | ||||
|         long long init_time_offset = Settings::values.init_time_offset; | ||||
|     if (Settings::values.init_clock.GetValue() == Settings::InitClock::SystemTime) { | ||||
|         long long init_time_offset = Settings::values.init_time_offset.GetValue(); | ||||
|         long long days_offset = init_time_offset / 86400; | ||||
|         unsigned long long seconds_offset = | ||||
|             std::abs(init_time_offset) - std::abs(days_offset * 86400); | ||||
|  | @ -610,7 +610,7 @@ void Movie::PrepareForRecording() { | |||
|         init_time = | ||||
|             Common::Timer::GetTimeSinceJan1970().count() + seconds_offset + (days_offset * 86400); | ||||
|     } else { | ||||
|         init_time = Settings::values.init_time; | ||||
|         init_time = Settings::values.init_time.GetValue(); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -12,9 +12,9 @@ | |||
| #include <fmt/chrono.h> | ||||
| #include <fmt/format.h> | ||||
| #include "common/file_util.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/hw/gpu.h" | ||||
| #include "core/perf_stats.h" | ||||
| #include "core/settings.h" | ||||
| 
 | ||||
| using namespace std::chrono_literals; | ||||
| using DoubleSecs = std::chrono::duration<double, std::chrono::seconds::period>; | ||||
|  | @ -136,14 +136,9 @@ void FrameLimiter::DoFrameLimiting(microseconds current_system_time_us) { | |||
|     } | ||||
| 
 | ||||
|     auto now = Clock::now(); | ||||
|     double sleep_scale = Settings::values.frame_limit / 100.0; | ||||
|     double sleep_scale = Settings::values.frame_limit.GetValue() / 100.0; | ||||
| 
 | ||||
|     if (Settings::values.use_frame_limit_alternate) { | ||||
|         if (Settings::values.frame_limit_alternate == 0) { | ||||
|             return; | ||||
|         } | ||||
|         sleep_scale = Settings::values.frame_limit_alternate / 100.0; | ||||
|     } else if (Settings::values.frame_limit == 0) { | ||||
|     if (Settings::values.frame_limit.GetValue() == 0) { | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,168 +0,0 @@ | |||
| // Copyright 2014 Citra Emulator Project
 | ||||
| // Licensed under GPLv2 or any later version
 | ||||
| // Refer to the license.txt file included.
 | ||||
| 
 | ||||
| #include <string_view> | ||||
| #include <utility> | ||||
| #include "audio_core/dsp_interface.h" | ||||
| #include "core/core.h" | ||||
| #include "core/gdbstub/gdbstub.h" | ||||
| #include "core/hle/kernel/shared_page.h" | ||||
| #include "core/hle/service/cam/cam.h" | ||||
| #include "core/hle/service/hid/hid.h" | ||||
| #include "core/hle/service/ir/ir_rst.h" | ||||
| #include "core/hle/service/ir/ir_user.h" | ||||
| #include "core/hle/service/mic_u.h" | ||||
| #include "core/settings.h" | ||||
| #include "video_core/renderer_base.h" | ||||
| #include "video_core/video_core.h" | ||||
| 
 | ||||
| namespace Settings { | ||||
| 
 | ||||
| Values values = {}; | ||||
| 
 | ||||
| void Apply() { | ||||
|     GDBStub::SetServerPort(values.gdbstub_port); | ||||
|     GDBStub::ToggleServer(values.use_gdbstub); | ||||
| 
 | ||||
|     VideoCore::g_hw_renderer_enabled = values.use_hw_renderer; | ||||
|     VideoCore::g_shader_jit_enabled = values.use_shader_jit; | ||||
|     VideoCore::g_hw_shader_enabled = values.use_hw_shader; | ||||
|     VideoCore::g_separable_shader_enabled = values.separable_shader; | ||||
|     VideoCore::g_hw_shader_accurate_mul = values.shaders_accurate_mul; | ||||
|     VideoCore::g_use_disk_shader_cache = values.use_disk_shader_cache; | ||||
| 
 | ||||
| #ifndef ANDROID | ||||
|     if (VideoCore::g_renderer) { | ||||
|         VideoCore::g_renderer->UpdateCurrentFramebufferLayout(); | ||||
|     } | ||||
| #endif | ||||
| 
 | ||||
|     VideoCore::g_renderer_bg_color_update_requested = true; | ||||
|     VideoCore::g_renderer_sampler_update_requested = true; | ||||
|     VideoCore::g_renderer_shader_update_requested = true; | ||||
|     VideoCore::g_texture_filter_update_requested = true; | ||||
| 
 | ||||
|     auto& system = Core::System::GetInstance(); | ||||
|     if (system.IsPoweredOn()) { | ||||
|         system.CoreTiming().UpdateClockSpeed(values.cpu_clock_percentage); | ||||
|         Core::DSP().SetSink(values.sink_id, values.audio_device_id); | ||||
|         Core::DSP().EnableStretching(values.enable_audio_stretching); | ||||
| 
 | ||||
|         auto hid = Service::HID::GetModule(system); | ||||
|         if (hid) { | ||||
|             hid->ReloadInputDevices(); | ||||
|         } | ||||
| 
 | ||||
|         auto sm = system.ServiceManager(); | ||||
|         auto ir_user = sm.GetService<Service::IR::IR_USER>("ir:USER"); | ||||
|         if (ir_user) | ||||
|             ir_user->ReloadInputDevices(); | ||||
|         auto ir_rst = sm.GetService<Service::IR::IR_RST>("ir:rst"); | ||||
|         if (ir_rst) | ||||
|             ir_rst->ReloadInputDevices(); | ||||
| 
 | ||||
|         auto cam = Service::CAM::GetModule(system); | ||||
|         if (cam) { | ||||
|             cam->ReloadCameraDevices(); | ||||
|         } | ||||
| 
 | ||||
|         Service::MIC::ReloadMic(system); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void LogSettings() { | ||||
|     const auto log_setting = [](std::string_view name, const auto& value) { | ||||
|         LOG_INFO(Config, "{}: {}", name, value); | ||||
|     }; | ||||
| 
 | ||||
|     LOG_INFO(Config, "Citra Configuration:"); | ||||
|     log_setting("Core_UseCpuJit", values.use_cpu_jit); | ||||
|     log_setting("Core_CPUClockPercentage", values.cpu_clock_percentage); | ||||
|     log_setting("Renderer_UseGLES", values.use_gles); | ||||
|     log_setting("Renderer_UseHwRenderer", values.use_hw_renderer); | ||||
|     log_setting("Renderer_UseHwShader", values.use_hw_shader); | ||||
|     log_setting("Renderer_SeparableShader", values.separable_shader); | ||||
|     log_setting("Renderer_ShadersAccurateMul", values.shaders_accurate_mul); | ||||
|     log_setting("Renderer_UseShaderJit", values.use_shader_jit); | ||||
|     log_setting("Renderer_UseResolutionFactor", values.resolution_factor); | ||||
|     log_setting("Renderer_FrameLimit", values.frame_limit); | ||||
|     log_setting("Renderer_UseFrameLimitAlternate", values.use_frame_limit_alternate); | ||||
|     log_setting("Renderer_FrameLimitAlternate", values.frame_limit_alternate); | ||||
|     log_setting("Renderer_VSyncNew", values.use_vsync_new); | ||||
|     log_setting("Renderer_PostProcessingShader", values.pp_shader_name); | ||||
|     log_setting("Renderer_FilterMode", values.filter_mode); | ||||
|     log_setting("Renderer_TextureFilterName", values.texture_filter_name); | ||||
|     log_setting("Stereoscopy_Render3d", values.render_3d); | ||||
|     log_setting("Stereoscopy_Factor3d", values.factor_3d); | ||||
|     log_setting("Stereoscopy_MonoRenderLeftEye", values.mono_render_left_eye); | ||||
|     log_setting("Layout_LayoutOption", values.layout_option); | ||||
|     log_setting("Layout_SwapScreen", values.swap_screen); | ||||
|     log_setting("Layout_UprightScreen", values.upright_screen); | ||||
|     log_setting("Utility_DumpTextures", values.dump_textures); | ||||
|     log_setting("Utility_CustomTextures", values.custom_textures); | ||||
|     log_setting("Utility_UseDiskShaderCache", values.use_disk_shader_cache); | ||||
|     log_setting("Audio_EnableDspLle", values.enable_dsp_lle); | ||||
|     log_setting("Audio_EnableDspLleMultithread", values.enable_dsp_lle_multithread); | ||||
|     log_setting("Audio_OutputEngine", values.sink_id); | ||||
|     log_setting("Audio_EnableAudioStretching", values.enable_audio_stretching); | ||||
|     log_setting("Audio_OutputDevice", values.audio_device_id); | ||||
|     log_setting("Audio_InputDeviceType", values.mic_input_type); | ||||
|     log_setting("Audio_InputDevice", values.mic_input_device); | ||||
|     using namespace Service::CAM; | ||||
|     log_setting("Camera_OuterRightName", values.camera_name[OuterRightCamera]); | ||||
|     log_setting("Camera_OuterRightConfig", values.camera_config[OuterRightCamera]); | ||||
|     log_setting("Camera_OuterRightFlip", values.camera_flip[OuterRightCamera]); | ||||
|     log_setting("Camera_InnerName", values.camera_name[InnerCamera]); | ||||
|     log_setting("Camera_InnerConfig", values.camera_config[InnerCamera]); | ||||
|     log_setting("Camera_InnerFlip", values.camera_flip[InnerCamera]); | ||||
|     log_setting("Camera_OuterLeftName", values.camera_name[OuterLeftCamera]); | ||||
|     log_setting("Camera_OuterLeftConfig", values.camera_config[OuterLeftCamera]); | ||||
|     log_setting("Camera_OuterLeftFlip", values.camera_flip[OuterLeftCamera]); | ||||
|     log_setting("DataStorage_UseVirtualSd", values.use_virtual_sd); | ||||
|     log_setting("DataStorage_UseCustomStorage", values.use_custom_storage); | ||||
|     if (values.use_custom_storage) { | ||||
|         log_setting("DataStorage_SdmcDir", FileUtil::GetUserPath(FileUtil::UserPath::SDMCDir)); | ||||
|         log_setting("DataStorage_NandDir", FileUtil::GetUserPath(FileUtil::UserPath::NANDDir)); | ||||
|     } | ||||
|     log_setting("System_IsNew3ds", values.is_new_3ds); | ||||
|     log_setting("System_RegionValue", values.region_value); | ||||
|     log_setting("Debugging_UseGdbstub", values.use_gdbstub); | ||||
|     log_setting("Debugging_GdbstubPort", values.gdbstub_port); | ||||
| } | ||||
| 
 | ||||
| float Volume() { | ||||
|     if (values.audio_muted) { | ||||
|         return 0.0f; | ||||
|     } | ||||
|     return values.volume; | ||||
| } | ||||
| 
 | ||||
| void LoadProfile(int index) { | ||||
|     Settings::values.current_input_profile = Settings::values.input_profiles[index]; | ||||
|     Settings::values.current_input_profile_index = index; | ||||
| } | ||||
| 
 | ||||
| void SaveProfile(int index) { | ||||
|     Settings::values.input_profiles[index] = Settings::values.current_input_profile; | ||||
| } | ||||
| 
 | ||||
| void CreateProfile(std::string name) { | ||||
|     Settings::InputProfile profile = values.current_input_profile; | ||||
|     profile.name = std::move(name); | ||||
|     Settings::values.input_profiles.push_back(std::move(profile)); | ||||
|     Settings::values.current_input_profile_index = | ||||
|         static_cast<int>(Settings::values.input_profiles.size()) - 1; | ||||
|     Settings::LoadProfile(Settings::values.current_input_profile_index); | ||||
| } | ||||
| 
 | ||||
| void DeleteProfile(int index) { | ||||
|     Settings::values.input_profiles.erase(Settings::values.input_profiles.begin() + index); | ||||
|     Settings::LoadProfile(0); | ||||
| } | ||||
| 
 | ||||
| void RenameCurrentProfile(std::string new_name) { | ||||
|     Settings::values.current_input_profile.name = std::move(new_name); | ||||
| } | ||||
| 
 | ||||
| } // namespace Settings
 | ||||
|  | @ -1,268 +0,0 @@ | |||
| // Copyright 2014 Citra Emulator Project
 | ||||
| // Licensed under GPLv2 or any later version
 | ||||
| // Refer to the license.txt file included.
 | ||||
| 
 | ||||
| #pragma once | ||||
| 
 | ||||
| #include <array> | ||||
| #include <atomic> | ||||
| #include <string> | ||||
| #include <unordered_map> | ||||
| #include <vector> | ||||
| #include "common/common_types.h" | ||||
| #include "core/hle/service/cam/cam_params.h" | ||||
| 
 | ||||
| namespace Settings { | ||||
| 
 | ||||
| enum class InitClock { | ||||
|     SystemTime = 0, | ||||
|     FixedTime = 1, | ||||
| }; | ||||
| 
 | ||||
| enum class LayoutOption { | ||||
|     Default, | ||||
|     SingleScreen, | ||||
|     LargeScreen, | ||||
|     SideScreen, | ||||
| #ifndef ANDROID | ||||
|     SeparateWindows, | ||||
| #endif | ||||
|     // Similiar to default, but better for mobile devices in portrait mode. Top screen in clamped to
 | ||||
|     // the top of the frame, and the bottom screen is enlarged to match the top screen.
 | ||||
|     MobilePortrait, | ||||
| 
 | ||||
|     // Similiar to LargeScreen, but better for mobile devices in landscape mode. The screens are
 | ||||
|     // clamped to the top of the frame, and the bottom screen is a bit bigger.
 | ||||
|     MobileLandscape, | ||||
| }; | ||||
| 
 | ||||
| enum class MicInputType { | ||||
|     None, | ||||
|     Real, | ||||
|     Static, | ||||
| }; | ||||
| 
 | ||||
| enum class StereoRenderOption { | ||||
|     Off, | ||||
|     SideBySide, | ||||
|     Anaglyph, | ||||
|     Interlaced, | ||||
|     ReverseInterlaced, | ||||
|     CardboardVR | ||||
| }; | ||||
| 
 | ||||
| namespace NativeButton { | ||||
| enum Values { | ||||
|     A, | ||||
|     B, | ||||
|     X, | ||||
|     Y, | ||||
|     Up, | ||||
|     Down, | ||||
|     Left, | ||||
|     Right, | ||||
|     L, | ||||
|     R, | ||||
|     Start, | ||||
|     Select, | ||||
|     Debug, | ||||
|     Gpio14, | ||||
| 
 | ||||
|     ZL, | ||||
|     ZR, | ||||
| 
 | ||||
|     Home, | ||||
| 
 | ||||
|     NumButtons, | ||||
| }; | ||||
| 
 | ||||
| constexpr int BUTTON_HID_BEGIN = A; | ||||
| constexpr int BUTTON_IR_BEGIN = ZL; | ||||
| constexpr int BUTTON_NS_BEGIN = Home; | ||||
| 
 | ||||
| constexpr int BUTTON_HID_END = BUTTON_IR_BEGIN; | ||||
| constexpr int BUTTON_IR_END = BUTTON_NS_BEGIN; | ||||
| constexpr int BUTTON_NS_END = NumButtons; | ||||
| 
 | ||||
| constexpr int NUM_BUTTONS_HID = BUTTON_HID_END - BUTTON_HID_BEGIN; | ||||
| constexpr int NUM_BUTTONS_IR = BUTTON_IR_END - BUTTON_IR_BEGIN; | ||||
| constexpr int NUM_BUTTONS_NS = BUTTON_NS_END - BUTTON_NS_BEGIN; | ||||
| 
 | ||||
| static const std::array<const char*, NumButtons> mapping = {{ | ||||
|     "button_a", | ||||
|     "button_b", | ||||
|     "button_x", | ||||
|     "button_y", | ||||
|     "button_up", | ||||
|     "button_down", | ||||
|     "button_left", | ||||
|     "button_right", | ||||
|     "button_l", | ||||
|     "button_r", | ||||
|     "button_start", | ||||
|     "button_select", | ||||
|     "button_debug", | ||||
|     "button_gpio14", | ||||
|     "button_zl", | ||||
|     "button_zr", | ||||
|     "button_home", | ||||
| }}; | ||||
| } // namespace NativeButton
 | ||||
| 
 | ||||
| namespace NativeAnalog { | ||||
| enum Values { | ||||
|     CirclePad, | ||||
|     CStick, | ||||
| 
 | ||||
|     NumAnalogs, | ||||
| }; | ||||
| 
 | ||||
| static const std::array<const char*, NumAnalogs> mapping = {{ | ||||
|     "circle_pad", | ||||
|     "c_stick", | ||||
| }}; | ||||
| } // namespace NativeAnalog
 | ||||
| 
 | ||||
| struct InputProfile { | ||||
|     std::string name; | ||||
|     std::array<std::string, NativeButton::NumButtons> buttons; | ||||
|     std::array<std::string, NativeAnalog::NumAnalogs> analogs; | ||||
|     std::string motion_device; | ||||
|     std::string touch_device; | ||||
|     bool use_touch_from_button; | ||||
|     int touch_from_button_map_index; | ||||
|     std::string udp_input_address; | ||||
|     u16 udp_input_port; | ||||
|     u8 udp_pad_index; | ||||
| }; | ||||
| 
 | ||||
| struct TouchFromButtonMap { | ||||
|     std::string name; | ||||
|     std::vector<std::string> buttons; | ||||
| }; | ||||
| 
 | ||||
| struct Values { | ||||
|     // CheckNew3DS
 | ||||
|     bool is_new_3ds; | ||||
| 
 | ||||
|     // Controls
 | ||||
|     InputProfile current_input_profile;       ///< The current input profile
 | ||||
|     int current_input_profile_index;          ///< The current input profile index
 | ||||
|     std::vector<InputProfile> input_profiles; ///< The list of input profiles
 | ||||
|     std::vector<TouchFromButtonMap> touch_from_button_maps; | ||||
| 
 | ||||
|     // Core
 | ||||
|     bool use_cpu_jit; | ||||
|     int cpu_clock_percentage; | ||||
| 
 | ||||
|     // Data Storage
 | ||||
|     bool use_virtual_sd; | ||||
|     bool use_custom_storage; | ||||
| 
 | ||||
|     // System
 | ||||
|     int region_value; | ||||
|     InitClock init_clock; | ||||
|     u64 init_time; | ||||
|     s64 init_time_offset; | ||||
| 
 | ||||
|     // Renderer
 | ||||
|     bool use_gles; | ||||
|     bool use_hw_renderer; | ||||
|     bool use_hw_shader; | ||||
|     bool separable_shader; | ||||
|     bool use_disk_shader_cache; | ||||
|     bool shaders_accurate_mul; | ||||
|     bool use_shader_jit; | ||||
|     u16 resolution_factor; | ||||
|     bool use_frame_limit_alternate; | ||||
|     u16 frame_limit; | ||||
|     u16 frame_limit_alternate; | ||||
|     std::string texture_filter_name; | ||||
| 
 | ||||
|     LayoutOption layout_option; | ||||
|     bool swap_screen; | ||||
|     bool upright_screen; | ||||
|     bool custom_layout; | ||||
|     u16 custom_top_left; | ||||
|     u16 custom_top_top; | ||||
|     u16 custom_top_right; | ||||
|     u16 custom_top_bottom; | ||||
|     u16 custom_bottom_left; | ||||
|     u16 custom_bottom_top; | ||||
|     u16 custom_bottom_right; | ||||
|     u16 custom_bottom_bottom; | ||||
| 
 | ||||
|     float bg_red; | ||||
|     float bg_green; | ||||
|     float bg_blue; | ||||
| 
 | ||||
|     StereoRenderOption render_3d; | ||||
|     std::atomic<u8> factor_3d; | ||||
| 
 | ||||
|     bool mono_render_left_eye; | ||||
| 
 | ||||
|     int cardboard_screen_size; | ||||
|     int cardboard_x_shift; | ||||
|     int cardboard_y_shift; | ||||
| 
 | ||||
|     bool filter_mode; | ||||
|     std::string pp_shader_name; | ||||
| 
 | ||||
|     bool dump_textures; | ||||
|     bool custom_textures; | ||||
|     bool preload_textures; | ||||
| 
 | ||||
|     bool use_vsync_new; | ||||
| 
 | ||||
|     // Audio
 | ||||
|     bool audio_muted; | ||||
|     bool enable_dsp_lle; | ||||
|     bool enable_dsp_lle_multithread; | ||||
|     std::string sink_id; | ||||
|     bool enable_audio_stretching; | ||||
|     std::string audio_device_id; | ||||
|     float volume; | ||||
|     MicInputType mic_input_type; | ||||
|     std::string mic_input_device; | ||||
| 
 | ||||
|     // Camera
 | ||||
|     std::array<std::string, Service::CAM::NumCameras> camera_name; | ||||
|     std::array<std::string, Service::CAM::NumCameras> camera_config; | ||||
|     std::array<int, Service::CAM::NumCameras> camera_flip; | ||||
| 
 | ||||
|     // Debugging
 | ||||
|     bool record_frame_times; | ||||
|     bool use_gdbstub; | ||||
|     u16 gdbstub_port; | ||||
|     std::string log_filter; | ||||
|     std::unordered_map<std::string, bool> lle_modules; | ||||
| 
 | ||||
|     // Video Dumping
 | ||||
|     std::string output_format; | ||||
|     std::string format_options; | ||||
| 
 | ||||
|     std::string video_encoder; | ||||
|     std::string video_encoder_options; | ||||
|     u64 video_bitrate; | ||||
| 
 | ||||
|     std::string audio_encoder; | ||||
|     std::string audio_encoder_options; | ||||
|     u64 audio_bitrate; | ||||
| } extern values; | ||||
| 
 | ||||
| float Volume(); | ||||
| 
 | ||||
| // a special value for Values::region_value indicating that citra will automatically select a region
 | ||||
| // value to fit the region lockout info of the game
 | ||||
| static constexpr int REGION_VALUE_AUTO_SELECT = -1; | ||||
| 
 | ||||
| void Apply(); | ||||
| void LogSettings(); | ||||
| 
 | ||||
| // Input profiles
 | ||||
| void LoadProfile(int index); | ||||
| void SaveProfile(int index); | ||||
| void CreateProfile(std::string name); | ||||
| void DeleteProfile(int index); | ||||
| void RenameCurrentProfile(std::string new_name); | ||||
| } // namespace Settings
 | ||||
|  | @ -9,8 +9,8 @@ | |||
| #include "common/file_util.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "common/scm_rev.h" | ||||
| #include "common/settings.h" | ||||
| #include "core/core.h" | ||||
| #include "core/settings.h" | ||||
| #include "core/telemetry_session.h" | ||||
| #include "network/network_settings.h" | ||||
| 
 | ||||
|  | @ -124,35 +124,37 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader) { | |||
|     Telemetry::AppendOSInfo(field_collection); | ||||
| 
 | ||||
|     // Log user configuration information
 | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Audio_SinkId", Settings::values.sink_id); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Audio_SinkId", Settings::values.sink_id.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Audio_EnableAudioStretching", | ||||
|              Settings::values.enable_audio_stretching); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Core_UseCpuJit", Settings::values.use_cpu_jit); | ||||
|              Settings::values.enable_audio_stretching.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Core_UseCpuJit", | ||||
|              Settings::values.use_cpu_jit.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_ResolutionFactor", | ||||
|              Settings::values.resolution_factor); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_FrameLimit", Settings::values.frame_limit); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_UseFrameLimitAlternate", | ||||
|              Settings::values.use_frame_limit_alternate); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_FrameLimitAlternate", | ||||
|              Settings::values.frame_limit_alternate); | ||||
|              Settings::values.resolution_factor.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_FrameLimit", | ||||
|              Settings::values.frame_limit.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_UseHwRenderer", | ||||
|              Settings::values.use_hw_renderer); | ||||
|              Settings::values.use_hw_renderer.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_UseHwShader", | ||||
|              Settings::values.use_hw_shader); | ||||
|              Settings::values.use_hw_shader.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_ShadersAccurateMul", | ||||
|              Settings::values.shaders_accurate_mul); | ||||
|              Settings::values.shaders_accurate_mul.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_UseShaderJit", | ||||
|              Settings::values.use_shader_jit); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_UseVsync", Settings::values.use_vsync_new); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_FilterMode", Settings::values.filter_mode); | ||||
|              Settings::values.use_shader_jit.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_UseVsync", | ||||
|              Settings::values.use_vsync_new.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_FilterMode", | ||||
|              Settings::values.filter_mode.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_Render3d", | ||||
|              static_cast<int>(Settings::values.render_3d)); | ||||
|              static_cast<int>(Settings::values.render_3d.GetValue())); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_Factor3d", | ||||
|              Settings::values.factor_3d.load()); | ||||
|              Settings::values.factor_3d.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "Renderer_MonoRenderLeftEye", | ||||
|              Settings::values.mono_render_left_eye); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "System_IsNew3ds", Settings::values.is_new_3ds); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "System_RegionValue", Settings::values.region_value); | ||||
|              Settings::values.mono_render_left_eye.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "System_IsNew3ds", | ||||
|              Settings::values.is_new_3ds.GetValue()); | ||||
|     AddField(Telemetry::FieldType::UserConfig, "System_RegionValue", | ||||
|              Settings::values.region_value.GetValue()); | ||||
| } | ||||
| 
 | ||||
| bool TelemetrySession::SubmitTestcase() { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue