mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	common: Remove dependency from core
This commit is contained in:
		
							parent
							
								
									ba98bf058a
								
							
						
					
					
						commit
						9527bfffed
					
				
					 14 changed files with 105 additions and 96 deletions
				
			
		|  | @ -176,5 +176,5 @@ if (CITRA_USE_PRECOMPILED_HEADERS) | |||
|     target_precompile_headers(citra_common PRIVATE precompiled_headers.h) | ||||
| endif() | ||||
| if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND CMAKE_CXX_COMPILER_ID STREQUAL GNU) | ||||
|   target_link_libraries(citra_common PRIVATE backtrace) | ||||
|   target_link_libraries(citra_common PRIVATE backtrace dl) | ||||
| endif() | ||||
|  |  | |||
|  | @ -5,18 +5,8 @@ | |||
| #include <string_view> | ||||
| #include <utility> | ||||
| #include "audio_core/dsp_interface.h" | ||||
| #include "common/file_util.h" | ||||
| #include "common/settings.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/hle/service/plgldr/plgldr.h" | ||||
| #include "video_core/renderer_base.h" | ||||
| #include "video_core/video_core.h" | ||||
| 
 | ||||
| namespace Settings { | ||||
| 
 | ||||
|  | @ -75,64 +65,6 @@ std::string_view GetTextureFilterName(TextureFilter filter) { | |||
| Values values = {}; | ||||
| static bool configuring_global = true; | ||||
| 
 | ||||
| void Apply() { | ||||
|     GDBStub::SetServerPort(values.gdbstub_port.GetValue()); | ||||
|     GDBStub::ToggleServer(values.use_gdbstub.GetValue()); | ||||
| 
 | ||||
|     VideoCore::g_shader_jit_enabled = values.use_shader_jit.GetValue(); | ||||
|     VideoCore::g_hw_shader_enabled = values.use_hw_shader.GetValue(); | ||||
|     VideoCore::g_hw_shader_accurate_mul = values.shaders_accurate_mul.GetValue(); | ||||
| 
 | ||||
| #ifndef ANDROID | ||||
|     if (VideoCore::g_renderer) { | ||||
|         VideoCore::g_renderer->UpdateCurrentFramebufferLayout(); | ||||
|     } | ||||
| #endif | ||||
| 
 | ||||
|     if (VideoCore::g_renderer) { | ||||
|         auto& settings = VideoCore::g_renderer->Settings(); | ||||
|         settings.bg_color_update_requested = true; | ||||
|         settings.sampler_update_requested = true; | ||||
|         settings.shader_update_requested = true; | ||||
|         settings.texture_filter_update_requested = true; | ||||
|     } | ||||
| 
 | ||||
|     auto& system = Core::System::GetInstance(); | ||||
|     if (system.IsPoweredOn()) { | ||||
|         system.CoreTiming().UpdateClockSpeed(values.cpu_clock_percentage.GetValue()); | ||||
|         Core::DSP().SetSink(values.output_type.GetValue(), values.output_device.GetValue()); | ||||
|         Core::DSP().EnableStretching(values.enable_audio_stretching.GetValue()); | ||||
| 
 | ||||
|         auto hid = Service::HID::GetModule(system); | ||||
|         if (hid) { | ||||
|             hid->ReloadInputDevices(); | ||||
|         } | ||||
| 
 | ||||
|         auto apt = Service::APT::GetModule(system); | ||||
|         if (apt) { | ||||
|             apt->GetAppletManager()->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); | ||||
|     } | ||||
| 
 | ||||
|     Service::PLGLDR::PLG_LDR::SetEnabled(values.plugin_loader_enabled.GetValue()); | ||||
|     Service::PLGLDR::PLG_LDR::SetAllowGameChangeState(values.allow_plugin_loader.GetValue()); | ||||
| } | ||||
| 
 | ||||
| void LogSettings() { | ||||
|     const auto log_setting = [](std::string_view name, const auto& value) { | ||||
|         LOG_INFO(Config, "{}: {}", name, value); | ||||
|  |  | |||
|  | @ -525,7 +525,6 @@ void SetConfiguringGlobal(bool is_global); | |||
| 
 | ||||
| float Volume(); | ||||
| 
 | ||||
| void Apply(); | ||||
| void LogSettings(); | ||||
| 
 | ||||
| // Restore the global state of all applicable settings in the Values struct
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue