mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-10-30 15:39:02 -05:00 
			
		
		
		
	nvflinger: Fix for BufferQueue event handling.
This commit is contained in:
		| @@ -29,7 +29,8 @@ void SessionRequestHandler::ClientDisconnected(SharedPtr<ServerSession> server_s | ||||
|  | ||||
| SharedPtr<Event> HLERequestContext::SleepClientThread(SharedPtr<Thread> thread, | ||||
|                                                       const std::string& reason, u64 timeout, | ||||
|                                                       WakeupCallback&& callback) { | ||||
|                                                       WakeupCallback&& callback, | ||||
|                                                       Kernel::SharedPtr<Kernel::Event> event) { | ||||
|  | ||||
|     // Put the client thread to sleep until the wait event is signaled or the timeout expires. | ||||
|     thread->wakeup_callback = | ||||
| @@ -41,7 +42,12 @@ SharedPtr<Event> HLERequestContext::SleepClientThread(SharedPtr<Thread> thread, | ||||
|         return true; | ||||
|     }; | ||||
|  | ||||
|     auto event = Kernel::Event::Create(Kernel::ResetType::OneShot, "HLE Pause Event: " + reason); | ||||
|     if (!event) { | ||||
|         // Create event if not provided | ||||
|         event = Kernel::Event::Create(Kernel::ResetType::OneShot, "HLE Pause Event: " + reason); | ||||
|     } | ||||
|  | ||||
|     event->Clear(); | ||||
|     thread->status = THREADSTATUS_WAIT_HLE_EVENT; | ||||
|     thread->wait_objects = {event}; | ||||
|     event->AddWaitingThread(thread); | ||||
|   | ||||
| @@ -118,10 +118,12 @@ public: | ||||
|      * @param callback Callback to be invoked when the thread is resumed. This callback must write | ||||
|      * the entire command response once again, regardless of the state of it before this function | ||||
|      * was called. | ||||
|      * @param event Event to use to wake up the thread. If unspecified, an event will be created. | ||||
|      * @returns Event that when signaled will resume the thread and call the callback function. | ||||
|      */ | ||||
|     SharedPtr<Event> SleepClientThread(SharedPtr<Thread> thread, const std::string& reason, | ||||
|                                        u64 timeout, WakeupCallback&& callback); | ||||
|                                        u64 timeout, WakeupCallback&& callback, | ||||
|                                        Kernel::SharedPtr<Kernel::Event> event = nullptr); | ||||
|  | ||||
|     void ParseCommandBuffer(u32_le* src_cmdbuf, bool incoming); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 bunnei
					bunnei