mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Minor tidying up
This commit is contained in:
		
							parent
							
								
									26e90a99cd
								
							
						
					
					
						commit
						cf985631e0
					
				
					 7 changed files with 27 additions and 14 deletions
				
			
		|  | @ -31,6 +31,7 @@ | |||
| #include "core/hle/kernel/process.h" | ||||
| #include "core/hle/kernel/thread.h" | ||||
| #include "core/hle/service/fs/archive.h" | ||||
| #include "core/hle/service/gsp/gsp.h" | ||||
| #include "core/hle/service/service.h" | ||||
| #include "core/hle/service/sm/sm.h" | ||||
| #include "core/hw/gpu.h" | ||||
|  | @ -213,8 +214,8 @@ System::ResultStatus System::Init(Frontend::EmuWindow& emu_window, u32 system_mo | |||
| 
 | ||||
|     timing = std::make_unique<Timing>(); | ||||
| 
 | ||||
|     kernel = std::make_unique<Kernel::KernelSystem>(*memory, *timing, | ||||
|                                                     [this] { PrepareReschedule(); }, system_mode); | ||||
|     kernel = std::make_unique<Kernel::KernelSystem>( | ||||
|         *memory, *timing, [this] { PrepareReschedule(); }, system_mode); | ||||
| 
 | ||||
|     if (Settings::values.use_cpu_jit) { | ||||
| #ifdef ARCHITECTURE_x86_64 | ||||
|  | @ -413,6 +414,9 @@ void System::serialize(Archive& ar, const unsigned int file_version) { | |||
|     ar & dsp_core->GetDspMemory(); | ||||
|     ar&* memory.get(); | ||||
|     ar&* kernel.get(); | ||||
| 
 | ||||
|     // This needs to be set from somewhere - might as well be here!
 | ||||
|     Service::GSP::SetGlobalModule(*this); | ||||
| } | ||||
| 
 | ||||
| void System::Save(std::ostream& stream) const { | ||||
|  |  | |||
|  | @ -830,8 +830,7 @@ private: | |||
|             ar& completion_event; | ||||
|             ar& buffer_error_interrupt_event; | ||||
|             ar& vsync_interrupt_event; | ||||
|             // TODO: Check if this is ever needed:
 | ||||
|             // ar & capture_result;
 | ||||
|             // Ignore capture_result. In-progress captures might be affected but this is OK.
 | ||||
|             ar& dest_process; | ||||
|             ar& dest; | ||||
|             ar& dest_size; | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ | |||
| 
 | ||||
| namespace Service::GSP { | ||||
| 
 | ||||
| static std::weak_ptr<GSP_GPU> gsp_gpu; // TODO: Fix this for the love of god
 | ||||
| static std::weak_ptr<GSP_GPU> gsp_gpu; | ||||
| 
 | ||||
| void SignalInterrupt(InterruptId interrupt_id) { | ||||
|     auto gpu = gsp_gpu.lock(); | ||||
|  | @ -27,4 +27,8 @@ void InstallInterfaces(Core::System& system) { | |||
|     std::make_shared<GSP_LCD>()->InstallAsService(service_manager); | ||||
| } | ||||
| 
 | ||||
| void SetGlobalModule(Core::System& system) { | ||||
|     gsp_gpu = system.ServiceManager().GetService<GSP_GPU>("gsp::Gpu"); | ||||
| } | ||||
| 
 | ||||
| } // namespace Service::GSP
 | ||||
|  |  | |||
|  | @ -23,4 +23,6 @@ namespace Service::GSP { | |||
| void SignalInterrupt(InterruptId interrupt_id); | ||||
| 
 | ||||
| void InstallInterfaces(Core::System& system); | ||||
| 
 | ||||
| void SetGlobalModule(Core::System& system); | ||||
| } // namespace Service::GSP
 | ||||
|  |  | |||
|  | @ -444,6 +444,7 @@ private: | |||
| 
 | ||||
|     template <class Archive> | ||||
|     void serialize(Archive& ar, const unsigned int) { | ||||
|         ar& boost::serialization::base_object<Kernel::SessionRequestHandler>(*this); | ||||
|         ar& shared_memory; | ||||
|         ar& active_thread_id; | ||||
|         ar& first_initialization; | ||||
|  |  | |||
|  | @ -18,6 +18,7 @@ | |||
| #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" | ||||
| 
 | ||||
|  | @ -84,15 +85,17 @@ private: | |||
|     friend class boost::serialization::access; | ||||
|     template <class Archive> | ||||
|     void serialize(Archive& ar, const unsigned int file_version) { | ||||
|         ar& boost::serialization::make_binary_object(fcram.get(), Memory::FCRAM_N3DS_SIZE); | ||||
|         bool save_n3ds_ram = Settings::values.is_new_3ds; | ||||
|         ar& save_n3ds_ram; | ||||
|         ar& boost::serialization::make_binary_object(vram.get(), Memory::VRAM_SIZE); | ||||
|         // TODO: When n3ds support is added, put this back in
 | ||||
|         // ar& boost::serialization::make_binary_object(n3ds_extra_ram.get(),
 | ||||
|         //                                              Memory::N3DS_EXTRA_RAM_SIZE);
 | ||||
|         ar& current_page_table; | ||||
|         ar& boost::serialization::make_binary_object( | ||||
|             fcram.get(), save_n3ds_ram ? Memory::FCRAM_N3DS_SIZE : Memory::FCRAM_SIZE); | ||||
|         ar& boost::serialization::make_binary_object( | ||||
|             n3ds_extra_ram.get(), save_n3ds_ram ? Memory::N3DS_EXTRA_RAM_SIZE : 0); | ||||
|         ar& cache_marker; | ||||
|         ar& page_table_list; | ||||
|         // dsp is set from Core::System at startup
 | ||||
|         // current page table set from current process?
 | ||||
|     } | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue