mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-11-03 23:28:48 +00:00 
			
		
		
		
	Applets: Reworked how the Applet update event is handled.
Applets are now cleaned up in AppletUpdateEvent after calling their respective Update method.
This commit is contained in:
		
							parent
							
								
									621ee10eae
								
							
						
					
					
						commit
						725d5eea78
					
				
					 7 changed files with 61 additions and 35 deletions
				
			
		| 
						 | 
				
			
			@ -44,7 +44,7 @@ static u32 cpu_percent; ///< CPU time available to the running application
 | 
			
		|||
/// Parameter data to be returned in the next call to Glance/ReceiveParameter
 | 
			
		||||
static MessageParameter next_parameter;
 | 
			
		||||
 | 
			
		||||
void SendParameter(MessageParameter const& parameter) {
 | 
			
		||||
void SendParameter(const MessageParameter& parameter) {
 | 
			
		||||
    next_parameter = parameter;
 | 
			
		||||
    // Signal the event to let the application know that a new parameter is ready to be read
 | 
			
		||||
    parameter_event->Signal();
 | 
			
		||||
| 
						 | 
				
			
			@ -338,7 +338,7 @@ void StartLibraryApplet(Service::Interface* self) {
 | 
			
		|||
    u32* cmd_buff = Kernel::GetCommandBuffer();
 | 
			
		||||
    AppletId applet_id = static_cast<AppletId>(cmd_buff[1]);
 | 
			
		||||
    std::shared_ptr<HLE::Applets::Applet> applet = HLE::Applets::Applet::Get(applet_id);
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    LOG_DEBUG(Service_APT, "called applet_id=%08X", applet_id);
 | 
			
		||||
 | 
			
		||||
    if (applet == nullptr) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -63,7 +63,7 @@ enum class AppletId : u32 {
 | 
			
		|||
};
 | 
			
		||||
 | 
			
		||||
/// Send a parameter to the currently-running application, which will read it via ReceiveParameter
 | 
			
		||||
void SendParameter(MessageParameter const& parameter);
 | 
			
		||||
void SendParameter(const MessageParameter& parameter);
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * APT::Initialize service function
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -176,7 +176,7 @@ void SignalInterrupt(InterruptId interrupt_id);
 | 
			
		|||
void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info);
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Retrieves the framebuffer info stored in the GSP shared memory for the 
 | 
			
		||||
 * Retrieves the framebuffer info stored in the GSP shared memory for the
 | 
			
		||||
 * specified screen index and thread id.
 | 
			
		||||
 * @param thread_id GSP thread id of the process that accesses the structure that we are requesting.
 | 
			
		||||
 * @param screen_index Index of the screen we are requesting (Top = 0, Bottom = 1).
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue