Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pad interception #6031

Merged
merged 3 commits into from Jun 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions rpcs3/Emu/Cell/Modules/cellMsgDialog.cpp
Expand Up @@ -389,7 +389,7 @@ error_code cellMsgDialogAbort()
{
if (auto dlg = manager->get<rsx::overlays::message_dialog>())
{
dlg->close();
dlg->close(false);
return CELL_OK;
}
}
Expand All @@ -406,7 +406,9 @@ error_code cellMsgDialogAbort()
return CELL_SYSUTIL_ERROR_BUSY;
}

verify(HERE), fxm::remove<MsgDialogBase>();
verify(HERE), fxm::remove<MsgDialogBase>(); // this shouldn't call on_close
pad::SetIntercepted(false); // so we need to reenable the pads here

return CELL_OK;
}

Expand Down
8 changes: 8 additions & 0 deletions rpcs3/Emu/Cell/Modules/cellPad.cpp
Expand Up @@ -131,6 +131,14 @@ error_code cellPadGetData(u32 port_no, vm::ptr<CellPadData> data)
if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
return CELL_PAD_ERROR_NO_DEVICE;

const PadInfo& rinfo = handler->GetInfo();

if (rinfo.system_info & CELL_PAD_INFO_INTERCEPTED)
{
data->len = CELL_PAD_LEN_NO_CHANGE;
return CELL_OK;
}

u16 d1Initial, d2Initial;
d1Initial = pad->m_digital_1;
d2Initial = pad->m_digital_2;
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/RSX/Overlays/overlays.cpp
Expand Up @@ -305,7 +305,7 @@ namespace rsx
return 0;
}

void user_interface::close()
void user_interface::close(bool use_callback)
{
// Force unload
exit = true;
Expand All @@ -322,7 +322,7 @@ namespace rsx

pad::SetIntercepted(false);

if (on_close)
if (on_close && use_callback)
on_close(return_code);
}

Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/Overlays/overlays.h
Expand Up @@ -89,7 +89,7 @@ namespace rsx
close();
}

void close();
void close(bool use_callback = true);

s32 run_input_loop();
};
Expand Down