-
-
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
cellGem: Update controllers at 10 Hz in separate thread #16528
base: master
Are you sure you want to change the base?
Conversation
205f62b
to
dabcd46
Compare
dabcd46
to
8720341
Compare
|
||
void wait_for_result() | ||
{ | ||
if (!m_done) |
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.
Should be a while loop, code should not assume that wait is accurate and won't wake up spuriously
} | ||
} | ||
|
||
gem_config_data& operator=(thread_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.
noexcept
gem_config_data& operator=(thread_state) | ||
{ | ||
wake_up(); | ||
done(); |
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.
shouldn't done() be called exclusive by the thread? In case of emulation stop, PPUs should check their own state and not depend on notifications from others.
- Use thread_ctrl::wait_on() instead of atomic_t::wait
- Check ppu_thread::state if stopped before wait.
- Remove this line.
- If PPU wakes up prematurely on emulation stopping, add cpu_state::again to 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.
I'm assuming the = operators aren't necessary anymore then
Some games don't use cellGemGetInfo. Which means we had to reboot the game if the controller wasn't connected on boot. Updating controllers outside of the cell functions fixes this problem.
8720341
to
93bdd96
Compare
Some games don't use cellGemGetInfo, which means we had to reboot the game if the controller wasn't connected on boot.
Updating controllers outside of the cell functions fixes this problem.