strat: use sf::NativeHandle for ipc templating

This commit is contained in:
Michael Scire 2021-10-05 00:11:36 -07:00
parent d97e97258e
commit 69777cf792
41 changed files with 447 additions and 454 deletions

View file

@ -181,10 +181,11 @@ namespace ams::gpio {
Result BindInterrupt(os::SystemEventType *event, GpioPadSession *session) {
AMS_ASSERT(session->_event == nullptr);
ams::sf::CopyHandle handle;
ams::sf::NativeHandle handle;
R_TRY(GetInterface(session)->BindInterrupt(std::addressof(handle)));
os::AttachReadableHandleToSystemEvent(event, handle.GetValue(), true, os::EventClearMode_ManualClear);
os::AttachReadableHandleToSystemEvent(event, handle.GetOsHandle(), handle.IsManaged(), os::EventClearMode_ManualClear);
handle.Detach();
session->_event = event;
return ResultSuccess();

View file

@ -74,7 +74,7 @@ namespace ams::gpio {
Result BindInterrupt(ams::sf::OutCopyHandle out) {
::Event ev;
R_TRY(::gpioPadBindInterrupt(std::addressof(this->srv), std::addressof(ev)));
out.SetValue(ev.revent);
out.SetValue(ev.revent, true);
return ResultSuccess();
}