-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
LV2/cellPad: Implement priority-based connection updates #14458
Conversation
This value is saved and loaded from cellPadInit as is.
This also fixes The Godfather: Don's Edition [BLUS30023] pad detection. It no longer requires the pad to be disconnected and reconnected to progress. |
5a9b624
to
80cffd6
Compare
I need regression testing with other games, possibly disconecting and reconnecting controller fast to see if anything breaks. |
rpcs3/Emu/Cell/Modules/sys_io_.cpp
Outdated
// Wakeup | ||
ppu.check_state(); | ||
|
||
[[maybe_unused]] const u64 arg1 = ppu.gpr[5]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why maybe unused.
Makes no sense
rpcs3/Emu/Cell/Modules/cellPad.h
Outdated
return std::min<u32>(max_connect, CELL_PAD_MAX_PORT_NUM); | ||
} | ||
|
||
bool may_be_connected(u32 port_no) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the may_be is necessary.
From a cell perspective it's either true or not.
It doesn't matter what the game thinks here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this is an old result from thread, it does not reflect the state of cellPadGetData which also executes hid syscalls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well then it's probably more fitting to say confirmed_connected or something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because it is not a confirmation, it is a merely a cached result that may be inaccuarte if the game's thread prority is lower than 512. I renamed to "is_reportedly_connected".
rpcs3/Emu/Cell/Modules/cellPad.cpp
Outdated
info->reported_statuses[index] = (state & CELL_PAD_STATUS_CONNECTED) | CELL_PAD_STATUS_ASSIGN_CHANGES; | ||
} | ||
|
||
extern void PadStateNotifyStateChange(u32 index, u32 state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
snake_case
ecd1bcd
to
6d8bac6
Compare
Btw I do not touch cellPadPeriphGetInfo for now because it seems more accurate on first glance, but this optimization exists in cellPadPeriphGeData. |
Hi, ever since I updated the application's been having issues with multimonitor setups. Can't fullscreen on main monitor, it defaults to the second monitor, and same thing happens with drop down menus on the emulator UI itself. |
Already reported on #14405, don't post on unrelated PRs |
I went along and implemented this functionality HLE style for LV2, I think this probably has more uses.Written in LLE style with event queue in the end.This fixes input in The Simpsons Game which expects controller readings to report disconnected at first then connected.
Fixes #6093