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

Netplay: Fix 2nd session on Wiimote netplay #3992

Merged

Conversation

mimimi085181
Copy link
Contributor

@mimimi085181 mimimi085181 commented Jul 8, 2016

This replaces a static variable with a variable, that is reset properly for every session.

This pr also includes a small more or less related change(Make tries a u32), i hope that's ok.


This change is Reviewable

@mimimi085181 mimimi085181 force-pushed the wiimote-netplay-fix-second-session branch from 05d79ee to 1575b2f Compare July 8, 2016 21:27
A static var is not a good idea, when the value needs to be reset for every session. Also, the variable holds the data size, so it makes sense to set the data size, where the data is added.
Before this variable was an u8, which could theoretically result in desyncs with a large buffer(greater than 255*120/200=153) filled with blank inputs. If this could actually happen, i don't know. But this part of the code on its own looks like it could break.
@mimimi085181 mimimi085181 force-pushed the wiimote-netplay-fix-second-session branch from 1575b2f to de7b2f9 Compare July 8, 2016 21:30
@delroth delroth merged commit 1be5f23 into dolphin-emu:master Jul 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants