mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu.git
				synced 2025-05-12 00:45:25 +00:00 
			
		
		
		
	nvdrv: Fix QueryEvent for libnx.
This commit is contained in:
		
							parent
							
								
									576f0cf027
								
							
						
					
					
						commit
						22caeee64f
					
				@ -78,11 +78,10 @@ void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) {
 | 
				
			|||||||
    u32 event_id = rp.Pop<u32>();
 | 
					    u32 event_id = rp.Pop<u32>();
 | 
				
			||||||
    LOG_WARNING(Service_NVDRV, "(STUBBED) called, fd=%x, event_id=%x", fd, event_id);
 | 
					    LOG_WARNING(Service_NVDRV, "(STUBBED) called, fd=%x, event_id=%x", fd, event_id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    IPC::ResponseBuilder rb{ctx, 2, 1};
 | 
					    IPC::ResponseBuilder rb{ctx, 3, 1};
 | 
				
			||||||
    rb.Push(RESULT_SUCCESS);
 | 
					    rb.Push(RESULT_SUCCESS);
 | 
				
			||||||
    auto event = Kernel::Event::Create(Kernel::ResetType::Pulse, "NVEvent");
 | 
					    rb.PushCopyObjects(query_event);
 | 
				
			||||||
    event->Signal();
 | 
					    rb.Push<u32>(0);
 | 
				
			||||||
    rb.PushCopyObjects(event);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void NVDRV::SetClientPID(Kernel::HLERequestContext& ctx) {
 | 
					void NVDRV::SetClientPID(Kernel::HLERequestContext& ctx) {
 | 
				
			||||||
@ -113,6 +112,8 @@ NVDRV::NVDRV(std::shared_ptr<Module> nvdrv, const char* name)
 | 
				
			|||||||
        {13, &NVDRV::FinishInitialize, "FinishInitialize"},
 | 
					        {13, &NVDRV::FinishInitialize, "FinishInitialize"},
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    RegisterHandlers(functions);
 | 
					    RegisterHandlers(functions);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    query_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "NVDRV::query_event");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
} // namespace Nvidia
 | 
					} // namespace Nvidia
 | 
				
			||||||
 | 
				
			|||||||
@ -6,6 +6,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#include <memory>
 | 
					#include <memory>
 | 
				
			||||||
#include <string>
 | 
					#include <string>
 | 
				
			||||||
 | 
					#include "core/hle/kernel/event.h"
 | 
				
			||||||
#include "core/hle/service/nvdrv/nvdrv.h"
 | 
					#include "core/hle/service/nvdrv/nvdrv.h"
 | 
				
			||||||
#include "core/hle/service/service.h"
 | 
					#include "core/hle/service/service.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -29,6 +30,8 @@ private:
 | 
				
			|||||||
    std::shared_ptr<Module> nvdrv;
 | 
					    std::shared_ptr<Module> nvdrv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    u64 pid{};
 | 
					    u64 pid{};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Kernel::SharedPtr<Kernel::Event> query_event;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
} // namespace Nvidia
 | 
					} // namespace Nvidia
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user