mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-04 07:38:47 +00:00 
			
		
		
		
	Minor frontend fixes to savestates (#5430)
This commit is contained in:
		
							parent
							
								
									66846836bc
								
							
						
					
					
						commit
						6a77547bde
					
				
					 3 changed files with 24 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -26,11 +26,16 @@ SERVICE_CONSTRUCT_IMPL(Service::CAM::Module)
 | 
			
		|||
namespace Service::CAM {
 | 
			
		||||
 | 
			
		||||
template <class Archive>
 | 
			
		||||
void Module::serialize(Archive& ar, const unsigned int) {
 | 
			
		||||
void Module::serialize(Archive& ar, const unsigned int file_version) {
 | 
			
		||||
    ar& cameras;
 | 
			
		||||
    ar& ports;
 | 
			
		||||
    ar& is_camera_reload_pending;
 | 
			
		||||
    if (Archive::is_loading::value) {
 | 
			
		||||
    if (file_version > 0) {
 | 
			
		||||
        ar& initialized;
 | 
			
		||||
    } else {
 | 
			
		||||
        initialized = true;
 | 
			
		||||
    }
 | 
			
		||||
    if (Archive::is_loading::value && initialized) {
 | 
			
		||||
        for (int i = 0; i < NumCameras; i++) {
 | 
			
		||||
            LoadCameraImplementation(cameras[i], i);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -1077,6 +1082,8 @@ void Module::Interface::DriverInitialize(Kernel::HLERequestContext& ctx) {
 | 
			
		|||
        port.Clear();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    cam->initialized = true;
 | 
			
		||||
 | 
			
		||||
    rb.Push(RESULT_SUCCESS);
 | 
			
		||||
 | 
			
		||||
    LOG_DEBUG(Service_CAM, "called");
 | 
			
		||||
| 
						 | 
				
			
			@ -1093,6 +1100,8 @@ void Module::Interface::DriverFinalize(Kernel::HLERequestContext& ctx) {
 | 
			
		|||
        camera.impl = nullptr;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    cam->initialized = false;
 | 
			
		||||
 | 
			
		||||
    rb.Push(RESULT_SUCCESS);
 | 
			
		||||
 | 
			
		||||
    LOG_DEBUG(Service_CAM, "called");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -757,6 +757,7 @@ private:
 | 
			
		|||
    void LoadCameraImplementation(CameraConfig& camera, int camera_id);
 | 
			
		||||
 | 
			
		||||
    Core::System& system;
 | 
			
		||||
    bool initialized{};
 | 
			
		||||
    std::array<CameraConfig, NumCameras> cameras;
 | 
			
		||||
    std::array<PortConfig, 2> ports;
 | 
			
		||||
    Core::TimingEventType* completion_event_callback;
 | 
			
		||||
| 
						 | 
				
			
			@ -764,7 +765,7 @@ private:
 | 
			
		|||
    std::atomic<bool> is_camera_reload_pending{false};
 | 
			
		||||
 | 
			
		||||
    template <class Archive>
 | 
			
		||||
    void serialize(Archive& ar, const unsigned int);
 | 
			
		||||
    void serialize(Archive& ar, const unsigned int file_version);
 | 
			
		||||
    friend class boost::serialization::access;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -775,4 +776,5 @@ void InstallInterfaces(Core::System& system);
 | 
			
		|||
} // namespace Service::CAM
 | 
			
		||||
 | 
			
		||||
SERVICE_CONSTRUCT(Service::CAM::Module)
 | 
			
		||||
BOOST_CLASS_VERSION(Service::CAM::Module, 1)
 | 
			
		||||
BOOST_CLASS_VERSION(Service::CAM::Module::CameraConfig, 1)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue