mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	core: Add VideoDumper to System
This commit is contained in:
		
							parent
							
								
									3f64aaabbd
								
							
						
					
					
						commit
						f2880b08d1
					
				
					 2 changed files with 26 additions and 0 deletions
				
			
		|  | @ -16,6 +16,7 @@ | ||||||
| #include "core/cheats/cheats.h" | #include "core/cheats/cheats.h" | ||||||
| #include "core/core.h" | #include "core/core.h" | ||||||
| #include "core/core_timing.h" | #include "core/core_timing.h" | ||||||
|  | #include "core/dumping/backend.h" | ||||||
| #include "core/gdbstub/gdbstub.h" | #include "core/gdbstub/gdbstub.h" | ||||||
| #include "core/hle/kernel/client_port.h" | #include "core/hle/kernel/client_port.h" | ||||||
| #include "core/hle/kernel/kernel.h" | #include "core/hle/kernel/kernel.h" | ||||||
|  | @ -274,6 +275,14 @@ const Cheats::CheatEngine& System::CheatEngine() const { | ||||||
|     return *cheat_engine; |     return *cheat_engine; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | VideoDumper::Backend& System::VideoDumper() { | ||||||
|  |     return *video_dumper; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | const VideoDumper::Backend& System::VideoDumper() const { | ||||||
|  |     return *video_dumper; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void System::RegisterMiiSelector(std::shared_ptr<Frontend::MiiSelector> mii_selector) { | void System::RegisterMiiSelector(std::shared_ptr<Frontend::MiiSelector> mii_selector) { | ||||||
|     registered_mii_selector = std::move(mii_selector); |     registered_mii_selector = std::move(mii_selector); | ||||||
| } | } | ||||||
|  | @ -306,6 +315,10 @@ void System::Shutdown() { | ||||||
|     timing.reset(); |     timing.reset(); | ||||||
|     app_loader.reset(); |     app_loader.reset(); | ||||||
| 
 | 
 | ||||||
|  |     if (video_dumper->IsDumping()) { | ||||||
|  |         video_dumper->StopDumping(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     if (auto room_member = Network::GetRoomMember().lock()) { |     if (auto room_member = Network::GetRoomMember().lock()) { | ||||||
|         Network::GameInfo game_info{}; |         Network::GameInfo game_info{}; | ||||||
|         room_member->SendGameInfo(game_info); |         room_member->SendGameInfo(game_info); | ||||||
|  |  | ||||||
|  | @ -49,6 +49,10 @@ namespace Cheats { | ||||||
| class CheatEngine; | class CheatEngine; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | namespace VideoDumper { | ||||||
|  | class Backend; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| namespace Core { | namespace Core { | ||||||
| 
 | 
 | ||||||
| class Timing; | class Timing; | ||||||
|  | @ -206,6 +210,12 @@ public: | ||||||
|     /// Gets a const reference to the cheat engine
 |     /// Gets a const reference to the cheat engine
 | ||||||
|     const Cheats::CheatEngine& CheatEngine() const; |     const Cheats::CheatEngine& CheatEngine() const; | ||||||
| 
 | 
 | ||||||
|  |     /// Gets a reference to the video dumper backend
 | ||||||
|  |     VideoDumper::Backend& VideoDumper(); | ||||||
|  | 
 | ||||||
|  |     /// Gets a const reference to the video dumper backend
 | ||||||
|  |     const VideoDumper::Backend& VideoDumper() const; | ||||||
|  | 
 | ||||||
|     PerfStats perf_stats; |     PerfStats perf_stats; | ||||||
|     FrameLimiter frame_limiter; |     FrameLimiter frame_limiter; | ||||||
| 
 | 
 | ||||||
|  | @ -276,6 +286,9 @@ private: | ||||||
|     /// Cheats manager
 |     /// Cheats manager
 | ||||||
|     std::unique_ptr<Cheats::CheatEngine> cheat_engine; |     std::unique_ptr<Cheats::CheatEngine> cheat_engine; | ||||||
| 
 | 
 | ||||||
|  |     /// Video dumper backend
 | ||||||
|  |     std::unique_ptr<VideoDumper::Backend> video_dumper; | ||||||
|  | 
 | ||||||
|     /// RPC Server for scripting support
 |     /// RPC Server for scripting support
 | ||||||
|     std::unique_ptr<RPC::RPCServer> rpc_server; |     std::unique_ptr<RPC::RPCServer> rpc_server; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue